gpr

gpr

keys distribution between processes

Hi. I have the following task:
I have a server, which support subscription to different topics. One connection supports subscription for up to some limited number of topics, say 1000. I want to subscribe to, say, up to 10000 topics, so I use pool of up to 10 connections. Connections can fail and be restarted. The task is to distribute topics between connections and I would like to avoid manual tracking of which topic belongs to which connection. If number of subscribed topics is low, I would like to migrate topics between connections and shutdown some connections.

If I abstract from topics/connections, task sounds like distributing keys (topics) between processes with some configuration of limits, migration strategy, etc. I’m doing it manually now, but code is more complex than I wanted it to be, and I’m wondering, if there are some libraries in erlang/elixir which support such key distribution algorithms.
ANy suggestions are welcome.

First Post!

dmitrykleymenov

dmitrykleymenov

I’m not completely sure what you mean, but if i’ve understood correctly, consistent hashing is what you need. If so, this may help.

Where Next?

Popular in Questions Top

jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
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
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
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
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31525 112
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
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement