ets vs process-based registry + local vs global dispatch

Joel Reymont joelr1@REDACTED
Wed Jul 8 19:53:12 CEST 2009

Are there any performance numbers on using ETS to keep track of  
processes vs using a process-based registry? What about local vs  
global gen_server casts?

I'm keeping track of processes associated with session tokens. I can  
globally register a process with a name that includes any term. I can  
only use an atom when registering a process locally.

I suspect that sending messages to globally registered processes  
({global, {client_proxy, Token}}) is slowing me down quite a bit. I'm  
thinking of keeping processes in a token->pid map but I'd like to know  
if ETS is generally recommended over a process wrapping a dict or  
gb_tree map.

I'm going to run tests and get some hard numbers. I'm wondering if  
there's an existing body of knowledge on this, though.

	Thanks, Joel

Mac hacker with a performance bent

More information about the erlang-questions mailing list