|
|
|
|
|
by iudqnolq
1884 days ago
|
|
Don't do this unless you've got some experience with alternatives. It's definitely not the standard in the Elixir community. Also keep in mind OTP (the Erlang stdlib) is sort of one company's kitchen sink helper lib. It's got some gems, but do read other people's opinions about which are worth using. I wish it's docs included more about when not no use it. Edit: Definitely look up "contexts". They're the Phoenix word for module that handle storing/retrieving a piece of data. If you're writing an app with low perf requirements consider using the db directly for this with no in memory persistence. I did this with a low usage internal dashboard and it's was dead simple. Edit2: Thanks to reply, previously said contexts were an Elixir concept |
|
Gen_statem is erlang standard, for state machines
https://hexdocs.pm/gen_state_machine/GenStateMachine.html is a a fine wrapper for that
If u have finite states I would go for a state machine