Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Shards naming scheme #59

Closed
Tracked by #28
adlrocha opened this issue Oct 29, 2021 · 1 comment
Closed
Tracked by #28

Shards naming scheme #59

adlrocha opened this issue Oct 29, 2021 · 1 comment

Comments

@adlrocha
Copy link
Collaborator

adlrocha commented Oct 29, 2021

In its current implementation, the ID of a shard is determined by computing the CID of the path of the shard using as suffix in the path the name selected for the shard (i.e. root/parent/<user_defined_name). The shard actor at the shard where the shard is being spawned checks before assigning the ID if another shard with the same name already exists.

According to the initial spec, instead of assigning the suffix of the path from the user-defined name, the shard actor will assign a new int suffix sequentially to every new shard spawned. This makes discovery and interaction with shards deterministic, and the traversal of the full hierarchy more efficient. (i.e. root/i/j

In the future we may chose to include a DNS-like service for the discovery of shards by name.

@adlrocha
Copy link
Collaborator Author

adlrocha commented Nov 12, 2021

In the latest update of the spec, we don't use sequential number anymore but /root/parent/<ID of shard actor>, including the ID of the shard actor that implements the ShardingInterface for the shard. See #61, #62.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants