daviaws

daviaws

Is Horde Registry really distributed?

I was trying to address a distributed genserver, which is ensured to be unique by the Horde.DynamicSupervisor supervision tree.
I can check this with Supervisor.which_children - showing me local and remote pids.

  • I can derive recursively which_children to child supervisors of Horde and so address process remotelly.

But the Register should also do it.
“A distributed process registry.”
“Local changes to the registry will automatically be synced to other nodes in the cluster.”

But reading the code of register/lookup

It’s working over :ets.
Not only this but I can use Horde.Registry to register the same key over 3 nodes.

image
image

Not only this. For each node, Horde.Registry shows me different local pids.
Both Horde.DynamicSupervisor, and Horde.Registry on my application children list.

Am I missing something? Because :ets is a local resource. And even if the Registry is said to be distributed and it sure have deltacrdt configured on start.
I could not validate distributed behavior.

Most Liked

derekkraan

derekkraan

Hello, I’m the author and sole maintainer of Horde.

Just popping in to answer a few of your questions:

Is Horde Registry really distributed?

Yes, it is backed by DeltaCRDT, which has leaderless syncing. Updates that come in are written to an ets table for quick read access. Writes go through the CRDT.

Am I missing something?

It looks like you have configured Horde.NodeListener for your Horde.DynamicSupervisor, but not for your Horde.Registry. I checked, and the guides are not super clear on this, probably owing to the order in which things were built (Horde.NodeListener was added after the guides were written).

Others have mentioned this already, perhaps you should re-read their responses.

Unmaintained

Horde is a library that, as I have learned, has some limitations, but still remains useful to quite a few people (>9k downloads last 7 days). I don’t have the time nor the interest in large development efforts for the project, and there are not a lot of new PRs coming in to the project.

I try to stay on top of things, but the obvious bugs have been ironed out a long time ago, and aside from a few small issues, I would say that Horde is doing fine.

Finally, I will note that Horde is provided free of charge and without any kind of guarantee that it will work.

adw632

adw632

You may be referring to the old slow pg that pg2 replaced.

The docs for the ‘new’ pg in OTP/23 that deprecated pg2 explicitly states that pg is eventually consistent. The source code for pg indicates it was contributed by WhatsApp.

pg doesn’t have a long list of critical crashing problems unlike some other options mentioned here.

In theory, theory and practice are the same. In practice they are not.

anuaralfetahe

anuaralfetahe

I have been working on a comparable library ProcessHub. Although it’s still in the alpha stage, active development is ongoing.
I’m not going to mention the other libraries already pointed out but alternatively, you may want to explore Swarm.

While you could develop your implementation using the pg module, which is robust and would perform well in your described scenario, you may encounter challenges when the distribution model becomes more complex.

adw632

adw632

Make your own assessement if you believe it to be production ready.

It is unclear what problem you’re trying to solve but you should not look past the robust Erlang pg registry. There is also a distributed supervisor based on Erlang pg called pogo. It is likely to be a more robust foundation to base a solution on.

For establishing your cluster lib_cluster is excellent and offers a range of discovery methods.

If you have a large geographically dispersed cluster and need greater control over distribution there is also partisan.

daviaws

daviaws

Thank you @anuaralfetahe , but Swarm seems to be with a huge list of issues… and low maintenance, just as horde.

As for ProcessHub , congratulations for your effort, I’ll sure give it a try.

But I need some more mature and tested. And pogo seems to have a use case with whatsapp.

As for partisan . I really think the project is far too much complex for my needs. I really prefer to go with default distributed erlang for now.

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
Tee
can someone please explain to me how Enum.reduce works with maps
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
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
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
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
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
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
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement