I’m a little confused about clustering with gproc as a pubsub.
I would like to hold client sessions with gproc… It works great with one node.
However, I need to cluster the whole system.
It seems (as far as I undertand) that gproc has 2 way working with clusters, setting it as global, or using gproc_dist which seems to be a gen_leader behaviour.
Am I right so far ?
What would be the downside of each method ? (Still assuming I undertood correctly)
the gproc_dist_tests.erl already give the sample code for explanation.
I think gproc is created for solving the erlang’s process register restriction. That’s “only atom not tuple” can be used as registered key and one and only one process can be registered for one registered key.
The erlang has already provided mnesia db etc for solving client session data.
If the client session data throughout is high, I think it is not good idea to use gproc to handle it, for it will delay the process registration.