Complex gproc queries

Pablo Platt pablo.platt@REDACTED
Fri Apr 2 17:14:08 CEST 2010


Hi,

I'm building a simple chat server and using gproc to keep track of 
online users and the process for each user session.

Basically, each online user has a process that register a unique session id and non unique user id (same user can have several clients):
gproc:add_local_name(SessionId)
gproc:add_local_property(UserId, undefined)

When a user change his presence(online/busy/offline) I need to inform all the users on his roster.
After I retrieved the roster from the db, how can I select all the processes with UserId that is a part of the roster?
Rusty Klupaus's blog about gproc note that gproc:select support QLC but I don't understand how to do it.
http://rklophaus.com/blog/2009/9/16/gproc-erlang-global-process-registry.html

Thanks


      


More information about the erlang-questions mailing list