-
Couldn't load subscription status.
- Fork 7
DSL For Common Patterns In Distributed Protocols
Two common patterns at the moment recur across the body of examples we have demonstrating the applicability of the DiSeL framework.
- A 2-way communication channel in which one end asks a question and waits for the answer, and the other end does some upon receiving the question and computing the answer. In some sense this corresponds to a remote procedure call: we are interested in some property of another node, so invoke some code on it to obtain this information.
- A 1-way communication channel in which one end notifies the other of some event occurring. In some sense this corresponds to an event-listener pattern.
Setting up an RPC in DiSeL requires a total of 4 separate transitions to be defined, along with transformations on states, pre- and post-conditions and messages, etc.
Conceivably we can invent a notation for describing such a system of communication channels, or perhaps just parts of it - and mechanically compute the definitions of the required transitions, lifting the examples size for DiSeL examples a notch.
As part of the Lease based locking protocol, a resource guarded by a lock must verify the sequence number offered by a client to be the active sequence number. So we can specify this 'transaction' as an RPC, invoked by the resource 'on' the lock.