[erlang-questions] Process Dictionary limitations??

Attila Rajmund Nohl attila.r.nohl@REDACTED
Thu Oct 11 11:20:52 CEST 2012


2012/10/11 Charles Hixson <charleshixsn@REDACTED>:
> I'm choosing a language to implement a ... well, neural network is wrong,
> and so is cellular automaton, but it gives the idea.  Anyway, I'm going to
> need, in each cell, a few stateful items, e.g. activation level.
>
> When I look at what Erlang can do, I see that the Process Dictionary looks
> as if it would serve my needs, but then I am immediately warned not to use
> it, that it will cause bugs.  These stateful terms will not be exported from
> the cell within which they are resident.  Is this still likely to cause
> problems?  Is there some better approach to maintaining state?  (I can't
> just generate a new process, because other cells will need to know how to
> access this one, or to test that it has been rolled out.)

I don't really understand why you can't generate a new process for
each cell - just send a message to the neighbouring cells that there's
a new cell. I think each cell needs to know its neighbours anyway.



More information about the erlang-questions mailing list