Module communication

Post here if you want to help developing something for FAF.

Module communication

Postby Dragonfire » 26 Feb 2014, 00:03

Atm the clanapp is standalone ...
I can implement a email notification if you agree,
but it would be cool to have more connections ...

1. webserver <-> notification system:
  • livestreams, e.g. your ones
  • events
  • clan invitation
  • new map
  • ...

For live events, we send it direct over json to the faf.lobby ...

For persistent events, like clan invites, new maps, ...
I have another solution:

We have a event table:
Code: Select all
CREATE TABLE `event` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `data` VARCHAR(256) NOT NULL,
  `time` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`));

(data is a json decoded dict)
Each startup the client ask for all events since the last logout time and show it, maybe persistent ...

2. name changes:
For performance reason we copy the player_name from the login table to a clan app table ...
Only if a player login again we check the original name and update it, if changed ...
Can I add a hook to the change_name.php script, that automatically updates the name?
My native language is not english, please correct me, because I want to improve my skills # Resource Overview
User avatar
Dragonfire
Evaluator
 
Posts: 559
Joined: 19 Dec 2013, 10:18
Has liked: 39 times
Been liked: 61 times
FAF User Name: Dragonfire

Re: Module communication

Postby Ze_PilOt » 26 Feb 2014, 00:25

1. I have to think about it.

2. Why aren't using using the login table directly?
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Module communication

Postby Dragonfire » 26 Feb 2014, 00:36

Ze_PilOt wrote:2. Why aren't using using the login table directly?

As I wrote I consider about it ...
My excuse: thebeej did it xD

But if the amount of users increase it is a nice performance increase ... because we query the tabe A LOT.
(some kind of materialized view...)
My native language is not english, please correct me, because I want to improve my skills # Resource Overview
User avatar
Dragonfire
Evaluator
 
Posts: 559
Joined: 19 Dec 2013, 10:18
Has liked: 39 times
Been liked: 61 times
FAF User Name: Dragonfire

Re: Module communication

Postby Aulex » 26 Feb 2014, 00:46

[VoR]Aulex:
ya i saw it
[VoR]Aulex:
thanks
[VoR]Aulex:
i think that would be a great idea
[VoR]Aulex:
would allow information to be transferred a lot better
[VoR]Aulex:
and would probably ease a lot of zep's frustration
DEV_Dragonfire:
write that !
17:44
DEV_Dragonfire:
psot it ..
17:45
[VoR]Aulex:
fiiiine
DEV_Dragonfire:
btw. what of zep's furstation?
[VoR]Aulex:
he gets pissed when no one reads announcments
[VoR]Aulex:
that popup could say like "new post in What's New section"
"Let's start beating ass and die" - drunk TA4Life

"Just because you have a d*** doesn't mean you need to be one...pussy" -Blackdeath

SCOUTING SAVES LIVES
http://imgur.com/YGk0W0o

How to play Sup Com by Ubilaz
http://goo.gl/je83z
User avatar
Aulex
Contributor
 
Posts: 1050
Joined: 17 Nov 2012, 05:29
Has liked: 299 times
Been liked: 225 times
FAF User Name: VoR_Aulex

Re: Module communication

Postby Ze_PilOt » 26 Feb 2014, 08:49

Dragonfire wrote:
Ze_PilOt wrote:2. Why aren't using using the login table directly?

As I wrote I consider about it ...
My excuse: thebeej did it xD

But if the amount of users increase it is a nice performance increase ... because we query the tabe A LOT.
(some kind of materialized view...)


I don't think it's necessary at all.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Module communication

Postby Dragonfire » 26 Feb 2014, 10:39

Ze_PilOt wrote:I don't think it's necessary at all.

Then I change the implementation, maybe thebeej can say something about his decision (wait 2 weeks), but more important is question 1.
My native language is not english, please correct me, because I want to improve my skills # Resource Overview
User avatar
Dragonfire
Evaluator
 
Posts: 559
Joined: 19 Dec 2013, 10:18
Has liked: 39 times
Been liked: 61 times
FAF User Name: Dragonfire

Re: Module communication

Postby Ze_PilOt » 26 Feb 2014, 10:48

I think he did it that way because he had no access to the FAF database to begin with.

Also, it forces me to do a join in the request to get the right clan tag at user login (as your table use different UIDs), and that's probably triggered more often than the page display :)
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Module communication

Postby Dragonfire » 26 Feb 2014, 11:00

Ze_PilOt wrote:I think he did it that way because he had no access to the FAF database to begin with.

Also, it forces me to do a join in the request to get the right clan tag at user login (as your table use different UIDs), and that's probably triggered more often than the page display :)

Yeah, we can optimize it later xd
If I have time I redesign it ;)
Hope the game_stats materialized colum increases the performance.

1. what are your cons again the server<-> notification thing?

3. server <-> friendlist:
Should I store, friendgroup and some properties locally or on server?
My native language is not english, please correct me, because I want to improve my skills # Resource Overview
User avatar
Dragonfire
Evaluator
 
Posts: 559
Joined: 19 Dec 2013, 10:18
Has liked: 39 times
Been liked: 61 times
FAF User Name: Dragonfire

Re: Module communication

Postby burnstreet » 26 Feb 2014, 15:55

Dragonfire wrote:3. server <-> friendlist:
Should I store, friendgroup and some properties locally or on server?

On the server please, better for people who use multiple computers.
burnstreet
Crusader
 
Posts: 36
Joined: 23 Mar 2013, 00:36
Has liked: 2 times
Been liked: 3 times
FAF User Name: Burnstreet

Re: Module communication

Postby Ze_PilOt » 26 Feb 2014, 16:06

Dragonfire wrote:
Ze_PilOt wrote:I think he did it that way because he had no access to the FAF database to begin with.

Also, it forces me to do a join in the request to get the right clan tag at user login (as your table use different UIDs), and that's probably triggered more often than the page display :)

Yeah, we can optimize it later xd
If I have time I redesign it ;)
Hope the game_stats materialized colum increases the performance.

1. what are your cons again the server<-> notification thing?

3. server <-> friendlist:
Should I store, friendgroup and some properties locally or on server?


No. Please don't store anything locally. It's really not needed and will lead to more problems than it solve.

For notifications, it's probably easier and more effective to program a bot able to do it in the chat.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Next

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest