ostinelli / syn

A scalable global Process Registry and Process Group manager for Erlang and Elixir.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request (anycast)

hissssst opened this issue · comments

I found myself implementing this feature many times and I think that this feature would be useful to be shipped with syn.
By anycast I mean sending message to one process of the group which is choosen with some algorithm.

Possible algorithms:

  • Random member of group
  • Round robin
  • Random process on the same node

I don't think that in would be useful, but anycall would make sense too

I'm currently working on v3 so I'm reviewing all open issues.

I think that choosing a process randomly in a group to send a message is an application-specific matter, as the type of algorithm might have a relation with the reason one is choosing a process from a group.

It looks to me this can be left to the developer, by retrieving the processes (and eventually, getting only the local ones) and selecting one as they please.

Is there a specific and common use case that you'd like to share to see whether this can become part of the core?

Thank you for your suggestion.

Closing.