[erlang-questions] Noddy question on hashing

Rick Payne rickp@REDACTED
Thu Jul 25 18:58:16 CEST 2013


--On 25 July 2013 12:38:29 -0400 Siraaj Khandkar <siraaj@REDACTED> 
wrote:

> Erlang joke: "To have fault-tolerant objects, you must have at least
> two
> copies of each object." :)

:)

> Generally one does not approach things this was in Erlang. Space
> efficiency was not its motivation, fault-tolerance was, and thus
> redundancy is the law of the land.

Right - for sure part of my problem is not being able to see things 
with the right mindset yet.

> That said, if you have some large blob that you want several objects
> or
> even processes to point to, instead of copying, you could use ETS,
> which
> is basically a shared hash table.

Ok, I think I need to spend some more time thinking about the problem. 
Maybe its a case of mapping attributes to a process id, and its the 
process which holds the state and processes it. Hmm - you've got me 
thinking...

> If you're interested in correctness and want those attributes to be
> enums - you could use atoms as values and tell Dialyzer what each is
> expected to be, like so:

Yup, already breaking the attributes up into atoms and lists of values 
in a somewhat sane way.

Thanks for the pointers.

Cheers,
Rick



More information about the erlang-questions mailing list