[erlang-questions] Messaging patterns

Lee Sylvester <>
Fri Mar 22 20:25:21 CET 2013


Hey guys,

I'm writing a messaging service where connected users are placed in a room.  Users can then message other users in this same room.  This is the easy part :-)

I now want to make this service distributed.  Users will be added to rooms in a service that is most "available", so it must be at the nearest datacentre with the least load.  Therefore, I need to find a pattern that allows users to communicate across services.  Essentially, users should be able to message anyone in there room regardless of what service manages their connection.  However, if I have 200 services, but only two people in a room, I'd like to avoid those other 198 services having to deal with the messages.

Question is, then, does anyone know of a pattern or best practice that supports this paradigm?

Thanks loads in advance.

Lee 


More information about the erlang-questions mailing list