[erlang-questions] atom (symbol) interning across distributed instances of runtime
Lukas Larsson
lukas@REDACTED
Tue Feb 6 18:06:30 CET 2018
There is an atom caching algorithm that is used. It is described here:
http://erlang.org/doc/apps/erts/erl_ext_dist.html#distribution_header
tldr; atoms are integers inside the same VM. atoms are strings when sending
in-between nodes, but there is a cache that uses the integers of the remote
node to send atoms.
Lukas
On Tue, Feb 6, 2018 at 5:13 PM, Glenn Kasten <gkasten@REDACTED> wrote:
> I'm curious about the implementation of message-passing of atoms (symbols)
> among unrelated runtime instances, in particular how the atoms are
> interned.
> I would assume that among a single runtime instance, atoms are passed
> as small integers rather than strings, yet that would not work between
> unrelated runtime instances
> unless the atoms are interned to a consistent value per atoms.
> For example, at first connection between runtimes, do the runtimes undergo
> an atom negotiation protocol so they can agree on the interned values?
> Or something else?
>
> https://en.wikipedia.org/wiki/Symbol_(programming)
> https://en.wikipedia.org/wiki/String_interning
>
> Thanks,
> Glenn
>
>
>
>
>
>
> --
> Glenn Kasten
> Android Media
> x35392
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180206/3cf0a46a/attachment.htm>
More information about the erlang-questions
mailing list