Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow any term to be a coordinator name #183

Merged
merged 2 commits into from
May 15, 2024

Conversation

NelsonVides
Copy link
Collaborator

This comes from when the name was the name of a registered process, and
hence the Erlang registry required it be an atom, but now it is an
opaque term stored in a persistent term, hence allowing the flexibility
for it to be any term allows us to create coordinators dynamically.

One example of when this might be desired is when coordinating members
of a groupchat: when the groupchat is created, a coordinator is created
with the name of the groupchat, and the members will add themselves to
this coordinator. This way, they can coordinate setting presences and
messages within the namespace of that room alone.

This comes from when the name was the name of a registered process, and
hence the Erlang registry required it be an atom, but now it is an
opaque term stored in a persistent term, hence allowing the flexibility
for it to be any term allows us to create coordinators dynamically.

One example of when this might be desired is when coordinating members
of a groupchat: when the groupchat is created, a coordinator is created
with the name of the groupchat, and the members will add themselves to
this coordinator. This way, they can coordinate setting presences and
messages within the namespace of that room alone.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.10%. Comparing base (0d47028) to head (a89e5c1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #183      +/-   ##
==========================================
- Coverage   75.21%   75.10%   -0.11%     
==========================================
  Files          31       31              
  Lines        1166     1165       -1     
==========================================
- Hits          877      875       -2     
- Misses        289      290       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DenysGonchar DenysGonchar merged commit 887e312 into master May 15, 2024
6 checks passed
@DenysGonchar DenysGonchar deleted the coordinator/arbitrary_names branch May 15, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants