OpenCyphal-Garage / cyraft

Raft algorithm (for pycyphal)
2 stars 2 forks source link

Add name resolution service #3

Open pavel-kirienko opened 1 year ago

pavel-kirienko commented 1 year ago
# NameToIDRequest.0.1.dsdl
# This message is published when a node desires to map a computational graph name to a numerical identifier.
# The Raft node that is currently elected as the Leader should find the entry in the log and send the response.
# If there is no such entry in the log, a new one needs to be created by the Leader ad-hoc;
# the response with the new value is then published as soon as the Raft consensus is reached (replication completed).
ResourceKind.0.1 kind
uavcan.primitive.String.1.0 name
@extent 512*8
# NameToIDResponse.0.1.dsdl
# This message is published by a name service node to inform the subscribers of the identifier associated with the named resource.
# If there is no known association, an ID has to be chosen automatically and the name table be extended ad-hoc.
# If there is no known association and it is impossible to create one at the moment, no response should be published.
uint32 id
# The requested identifier value.
ResourceKind.0.1 kind
uavcan.primitive.String.1.0 name
@extent 512*8
# ResourceKind.0.1.dsdl
# Kind of a named resource.
uint4 value
uint4 SUBJECT = 0
@sealed
pavel-kirienko commented 1 year ago

Only the Leader should participate in the name resolution exchanges. Other cluster nodes should ignore name requests.