Thanks Matt… I like the idea of using router servers… now, pardon my ignorance on this one:
For my implimentation I would have users select maybe 4 - 10 chat buddies that they would need presence info for.
Main user is on Server A
User1 is on Server B
User2 is on Server C etc.
If every time a user’'s status changed their status was recorded in a MySQL database then when Main User adds User1 to her one to one chat list, the availability can be looked up in the db based on username and displayed appropriately.
Along with availability, we could ask the MySQL db WHICH server User1 was on, and then send a private chat from MainUser@ServerA.com to User1@ServerB.com
Although realtime availability info would be ideal, I would settle for a 1 or even 2 second lag between updates, just to have relatively up to date availability info displayed.
All messages would be stored in a MySQL database anyway, so even if a user was not available at the time of sending, the message would still be there when they returned.
I am probably missing some major performance hurdle in here. Basically, we are talking about shifting the responsibility of presence to a MySQL server which would get a request for presence info up to 5 times a second per user.
Can MySQL handle that? 50,000 request for data a second? Surely there are clustering solutions for MySQL that will allow us to get the performance we would need to up the capacity…
Is the whole idea a clumsy hack?