gavid

gavid

Horde (and other dist. super.): Managing module versions

(This question is phrased in an abstract way, because it seems to me to be a general problem. But I can create a small example on request.)

So with Horde, a supervised process can be restarted on any node.

Say I have a cluster with three nodes: A, B and C.

I also have a number of GenServers running using the Foo.V_1 module (all under a Horde.DynamicSupervisor). They each starts up other workers under another Supervisor using the Bar.V_1 module.

But, at no point do I know, if a process has been restarted before and on which node it is currently running.

Say I deploy changes to Node A, creating a Foo.V_2 module that starts up Bar.V_2 workers. I create a GenServer with Foo.V_2 called MyWorker. But, before I can deploy changes to the other two nodes, Node A crashes. So now, the Horde.DynamicSupervisor will restart MyWorker on either Node B or Node C.

The trouble is, neither Node B or Node C has the Foo.V_2 nor Bar.V_2 modules.

If I understand correctly (and please feel free to demonstrate my ignorance), then Horde will be able to use the Foo.V_2 to create the worker, but what about Bar.V_2?

Wouldn’t I now get errors from Foo.V_2 because it is trying to use Bar.V_2 to create workers but Bar.V_2 is undefined?

If I understand the situation correctly, what is the best practice for dealing with this?

First Post!

LostKobrakai

LostKobrakai

A simple solution can be having distinct cookies between deployed versions, so clustering only happens between nodes of the same version.

Where Next?

Popular in Questions Top

lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
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
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
hpopp
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New

Other popular topics Top

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
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
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
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New

We're in Beta

About us Mission Statement