GuSuku

GuSuku

Standard library for restoring process state and messages on restart

I am new to Elixir and have found some good resources (lie this one) on strategies for preserving state on restarting a failed process.

I would like to know what standard well-maintained libraries exist to help with this common need, before deciding to hand-rolling a custom one.

Most Liked

OvermindDL1

OvermindDL1

It’s all very situationally specific to what the process does and how it should handle failure, so if you have a specific example? :slight_smile:

LostKobrakai

LostKobrakai

What if the current state or msg queue is the reason for the failure? One central requirement for the self healing properties of the beam is to always start a process into a known to work state, which you don‘t do if you keep state or messages around.

LostKobrakai

LostKobrakai

This requires the fact that you can safely discard messages, so it doesn’t invalidate the following messages.

Also keep in mind that a process might be restarted not because its own state/queue had problems within the process boundries, but it might be part of a bigger supervision tree, which doesn’t work with the current state and therefore some supervisor above the current process does initiate the restart. So to your process things can seems very fine, but if another process has problems with your process’s state you still need to have a way to resolve the problem.

tty

tty

IMHO this isn’t that much a common need and unfortunately the devil is in the details. I’ve had coded this maybe trice and each instance there wasn’t much commonality besides the grand idea of storing/restoring state.

I suspect you would be hand-rolling your own solution.

Where Next?

Popular in Questions Top

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement