Astarno
Most commonly used abstraction on top of Process
Hi there,
I have a curiousity question. I know there are different abstractions built on top of Process, such as Agent, GenServer, Registry, Supervisor and Task. I know each of them has their specific use-case. However, what do you think (or know) to be the most commonly used and generally most important abstraction?
On the forums I notice that the GenServer tag is tracked most often, which could be an indication this is the answer to my question. It is also my hunch that GenServers are the answer to my question. But I am curious if someone who knows Elixir better can formulate a substantiated answer.
Most Liked
al2o3cr
Agent and Registry are both made of GenServers:
https://github.com/elixir-lang/elixir/blob/main/lib/elixir/lib/agent/server.ex#L1-L4
Supervisor uses the underlying Erlang :supervisor machinery, which… also behaves like a :gen_server:
https://github.com/erlang/otp/blob/master/lib/stdlib/src/supervisor.erl#L20-L22
Out of that list, Task is special because it’s intended to have a very different lifecycle.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









