News for hackers. Stuff that matters.
Re:Ask HN: So, what's up with Phoenix (web framework)? by bostonvaulter2 on Saturday August 20, 2022 @09:29PM (#32536619)
I'm not super familiar with channels in Go, but one way to avoid the need to synchronize state in Elixir is to use ETS (Erlang Term Storage) which is a way to store data (terms) in memory.

If the state is in ETS than (optionally) any process on the node can read the state. Often this is paired with a single process that is allowed to update the state so that the state is always updated atomically. Often this pattern means that you don't need to distribute the same state to multiple processes, because instead they can just read the state they need from ETS (which is pretty fast/cheap).

There are no comments on this comment yet.