forked from schmittlauch/Hash2Pub
remove unnecessary directory level
This commit is contained in:
parent
b8be20b86e
commit
8b01ad2f37
20 changed files with 0 additions and 0 deletions
102
FediChord.asn1
Normal file
102
FediChord.asn1
Normal file
|
@ -0,0 +1,102 @@
|
|||
FediChordProtocol DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
NodeID ::= INTEGER (0..115792089237316195423570985008687907853269984665640564039457584007913129639935)
|
||||
|
||||
Domain ::= VisibleString
|
||||
|
||||
Action ::= ENUMERATED {queryID, join, leave, stabilise, ping}
|
||||
|
||||
Request ::= SEQUENCE {
|
||||
action Action,
|
||||
requestID INTEGER,
|
||||
sender NodeState,
|
||||
parts INTEGER (0..150), -- number of message parts
|
||||
part INTEGER (0..150), -- part number of this message, starts at 1
|
||||
actionPayload CHOICE {
|
||||
queryIDRequestPayload QueryIDRequestPayload,
|
||||
joinRequestPayload JoinRequestPayload,
|
||||
leaveRequestPayload LeaveRequestPayload,
|
||||
stabiliseRequestPayload StabiliseRequestPayload,
|
||||
pingRequestPayload PingRequestPayload
|
||||
} OPTIONAL -- just for symmetry reasons with response, requests without a payload have no meaning
|
||||
}
|
||||
|
||||
-- idea: different message layouts as a way of distinguishing between
|
||||
-- request and response instead of explicit flag
|
||||
|
||||
Response ::= SEQUENCE {
|
||||
responseTo INTEGER,
|
||||
senderID NodeID,
|
||||
parts INTEGER (0..150),
|
||||
part INTEGER (0..150),
|
||||
action Action,
|
||||
actionPayload CHOICE {
|
||||
queryIDResponsePayload QueryIDResponsePayload,
|
||||
joinResponsePayload JoinResponsePayload,
|
||||
leaveResponsePayload LeaveResponsePayload,
|
||||
stabiliseResponsePayload StabiliseResponsePayload,
|
||||
pingResponsePayload PingResponsePayload
|
||||
} OPTIONAL -- no payload when just ACKing a previous request
|
||||
}
|
||||
|
||||
NodeState ::= SEQUENCE {
|
||||
nid NodeID,
|
||||
domain Domain,
|
||||
ipAddr OCTET STRING (SIZE(16)),
|
||||
dhtPort INTEGER,
|
||||
apPort INTEGER,
|
||||
vServerID INTEGER (0..255)
|
||||
}
|
||||
|
||||
CacheEntry ::= SEQUENCE {
|
||||
node NodeState,
|
||||
-- use POSIX time stamp, as DATE-TIME isn't supported by the Haskell lib
|
||||
timestamp INTEGER
|
||||
}
|
||||
|
||||
NodeCache ::= SEQUENCE OF CacheEntry
|
||||
|
||||
JoinRequestPayload ::= NULL
|
||||
|
||||
JoinResponsePayload ::= SEQUENCE {
|
||||
successors SEQUENCE OF NodeID,
|
||||
predecessors SEQUENCE OF NodeID,
|
||||
cache NodeCache
|
||||
}
|
||||
|
||||
QueryResult ::= ENUMERATED { found, forward }
|
||||
|
||||
QueryIDRequestPayload ::= SEQUENCE {
|
||||
targetID NodeID,
|
||||
lBestNodes INTEGER
|
||||
}
|
||||
|
||||
QueryIDResponsePayload ::= SEQUENCE {
|
||||
result QueryResult,
|
||||
nodeData CHOICE {NodeState, NodeCache}
|
||||
}
|
||||
|
||||
StabiliseRequestPayload ::= NULL
|
||||
|
||||
StabiliseResponsePayload ::= SEQUENCE {
|
||||
successors SEQUENCE OF NodeID,
|
||||
predecessors SEQUENCE OF NodeID
|
||||
-- ToDo: transfer of handled key data, if newly responsible for it
|
||||
}
|
||||
|
||||
LeaveRequestPayload ::= SEQUENCE {
|
||||
successors SEQUENCE OF NodeID,
|
||||
predecessors SEQUENCE OF NodeID
|
||||
-- ToDo: transfer of own data to newly responsible node
|
||||
}
|
||||
|
||||
LeaveResponsePayload ::= NULL -- just a confirmation
|
||||
|
||||
PingRequestPayload ::= NULL -- do not include a node/ vserver ID, so that
|
||||
-- the node has to respond with all active ones
|
||||
|
||||
-- learning all active vserver IDs handled by the server at once
|
||||
PingResponsePayload ::= SEQUENCE OF NodeState
|
||||
|
||||
|
||||
END
|
Loading…
Add table
Add a link
Reference in a new issue