Life long learner. #algorithms #Database #Elixir #Rust #Go
Aug 20, 2021 • 10 tweets • 4 min read
The WebSocket architecture of @elixirphoenix #myelixirstatus1. The endpoint will start several children, we only focus on server and socket here:
* socket children
pool supervisor + a bunch of dynamic supervisors which will eventually start channel servers
the number of dynamic supervisors is the number of CPU cores of your server
Jul 30, 2021 • 6 tweets • 4 min read
Phoenix.PubSub is probably the most important component in @elixirphoenix@elixirlang .
We will benefit a lot by understanding the internals of Phoenix.PubSub.
#myelixirstatus
Here is the basic structure:
* a :pg server is started with the scope name: Pheonix.PubSub
* a pubsub supervisor supervises a registry and an adapter server
* the adapter server joins a :pg group during initialization