Skip to content

gsvarovsky/clocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status stability-wip

clocks

ordered message delivery

Foundational classes for establishing ordered delivery of messages to concurrent processes, with Vector Clock and Tree Clock implementations and process examples.

Feedback and contributions welcome!

usage

The main building block is a MessageService, which is intended to be interposed between an application process (such as an Actor or Verticle) and the message transport (such as a realtime channel, websocket, or queue consumer).

The MessageService maintains an internal clock state to determine the correct delivery order for incoming messages. It relies on the process to call its send and receive methods when sending or receiving a message from the transport; in doing so, the clock is suitably updated, and the message payload can be wrapped up or unwrapped and delivered, respectively.

An example process is provided, as a generic Java class for the update of a CRDT requiring causal delivery, and further subclassed in a very naive fashion to implement an OR-Set (Observed-Removed-Set).

Two MessageService implementations are provided: a Vector Clock service and a Tree Clock service, which is more efficient for dynamic systems.

biblio

vector clocks

interval tree clocks

other implementations

About

causally-ordered message delivery

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages