[erlang-questions] Data in state records
Mon Mar 12 18:05:53 CET 2012
Many of my processes (gen_servers) need to store some kind of indexed data in the state record. Usually this involves creating a set/dict/ets table in the init/1 function, assigning it to an element in the state record and using the data on each handle_call/cast/info.
My usual strategy is anything that is 100% private to my gen_server and will contain less than 50 or so records I will use sets/gb_trees or similar. In all other cases I would use an ETS table. Is there an official recommendation?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions