Hi List,

I like APE! I am new and just wondering about what design patterns I
should stick to, if any have been proposed.

Specifically I have one question in mind, I am trying to implement a
simple friends list/user online type of script.
What would be the best way to achieve this.

At the moment I have come up with the following possibilities.

1. Have a global user list js array for all connected users.
    And then when the user connects and auths -> get a list of friends
from the database and then loop the global array and send a "friend
connected" to all the currently connected users. When the user
disconnects, again, find all the friends of the user that disconnected
and then send them a "friend offline" message.

2. Channels
    When A user connects, get a list of friends, and then find out
which users are online and then pair each friend/friend combo to an
individual channel and then when someone leaves the channel send an
offline message to the other user. This one seems like it would be an
ok approach although I'm guessing having over 100,000 channels or more
activate will cause sever limitations.

Both have pros and cons.

Could someone advise please.

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to