A #GenServer is a process like any other #Elixir process and it can be used to keep state, execute code asynchronously and so on. The advantage of using a generic server process (GenServer) implemented using this module is that it will have a standard set of interface functions and include functionality for tracing and error reporting. It will also fit into a supervision tree.
https://hexdocs.pm/elixir/1.12/GenServer.html
Elixir | Elixir lang | Tutorial - Como escalar sua aplicação elixir com supervisores dinâmicos
#genserver
#MyElixirStatus https://www.youtube.com/watch?v=zEMqMkyTCGA
Supervisor経由で25万プロセス起動する負荷を現代PC+Elixir 1.11.4/OTP24で試す
https://qiita.com/piacerex/items/61f060e13e3f26650ba5?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
Supervisor経由で25万プロセス起動する負荷を現代PC+Elixir 1.13.4/OTP25で試す
https://qiita.com/piacerex/items/362363f9b517ee795e67?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
Supervisor経由で25万プロセス起動する負荷を現代PC+Elixir 1.14.4/OTP25で試す
https://qiita.com/piacerex/items/163ede68be18cdb5d8ba?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
¡Acabo de escribir un pequeño #Post en my #Blog sobre #Elixir, #MQTT y #GenServer ! https://estebanz.co/posts/client-mqtt-con-elixir-genserver/
Pa que le peguen una ojeada 😄
🌘 使用Jump Consistent Hashing進行工作分配
➤ 在分散式計算中如何確保工作只運行一次
✤ https://zacksiri.dev/posts/work-distribution-with-jump-consistent-hashing
本文介紹了如何使用Jump Consistent Hashing進行工作分配,以確保工作只運行一次。作者使用了elixir和Phoenix框架,並使用GenServer和PubSub機制來實現。作者還介紹了如何使用:jumper庫來實現Jump Consistent Hashing,以及如何在集群中均勻地分配工作。
+ 這是一篇非常有用的文章,對於分散式計算的初學者來說非常有幫助。
+ 作者的解決方案非常巧妙,使用Jump Consistent Hashing來實現工作分配是一個非常好的選擇。
#分散式計算 #Jump Consistent Hashing #elixir #Phoenix #GenServer
@solnic @codefolio I'm not sure if "state" is the right word here. You don't use that word at all in the docs: https://guides.hanamirb.org/v2.0/app/providers/
When I think of "state management" I think of sth like #redux in #javascript or #genserver in #elixir. They both have a way to update the state: reducers in redux and handle cast/call in GenServer.
Perhaps I'm not familiar with #hanami enough, but providers look to me like a wrapper API for dependencies or a low-level way to interact with Hanami's DI system.
Dropping #ecto in favour of using a #genserver with a simple async persistence only for the things that need to be persisted made a credential verification from a 50+ms ordeal into 1-ms ordeal. x50 speedup makes me hopeful about #doauth 0.4 demo making a user account in sub-100ms, compared to sub 1.5s which 0.3 shows.
Un article de blog est en cours d'écriture. On va parler #Elixir, #GenServer, #IEx et live debug en prod.