Time-keeping Woes

Yes, we’re still talking about how Vessel + Wyrd implement something kind of like a Merkle Clock, and yet also arguably better. I wrote that the last post was supposed to be the final one in the series.

And for a general overview, that is true – this article fills in some necessary background and design detail. Call it a bonus, if you’d like.

Hardware Clock, System Timer, Monotonic Clock

So let’s get down to basics for a moment. It’ll be easier to work our way upward from there!

Computers tend to keep time across reboots. That is because they usually contain a hardware or real-time clock (RTC). In commodity hardware, this clock is kept running – and …

Extending Vessel's DAG with a Per-Event Clock

Problems

I made much ado in the last entry that time synchronization is difficult to achieve in DTN, because DTN hates round trips, and time synchronization relies on them. That is, of course, just a TL;DR – if you’d like to read a paper on the issue, Space Network Time Distribution and Synchronization Protocol Development for Mars Proximity Link has got you covered.

The problems with using Vessel’s DAG as a logical clock are twofold:

  • Exactly as Merkle CRDTs, Vessel’s DAG provide logical ordering. This is not identical to clock-based ordering, and cannot take into account whether ordering operations (A, B) or (B, A) has the same effect.
  • Additionally, Vessel lumps …
Exploring Wyrd as a Merkle-like CRDT

It turns out that this article has been sitting mostly finished in my drafts for months now. The idea was to finish exploring how Wyrd benefits from Vessel’s DAG, and what it still needs to do.

(Time) Synchronization

In an offhand remark in the last article, I wrote that using time synchronization was a bad idea, therefore logical clocks are the only way to go. This statement should be explained a little.

  1. The typical use of CRDTs are distributed systems without a central arbitration. But they have been found useful for offline-first use cases, where synchronization only occurs eventually.
  2. Use cases that are different from the are delay- and disruption-tolerant networking (DTN) uses. …
Vessel + Wyrd - a DAG-based CRDT

Yesterday, we explored the differences between a Merkle DAG and vessel’s DAG. Today’s topic revolves around how combining wyrd’s conflict-free, replicated data type (CRDT) with vessel makes a specific kind of CRDT, namely a DAG-based one.

Conflict-Free, Replicated Data Types

A quick recap on CRDTs first.

They’re data types, largely fairly simple ones, such as counters or sets. And they’re conflict-free, meaning that multiple parties can modify them concurrently, and when their respective modifications get synchronized, each party with the full set of modifications will reconstruct the same state.

This permits for both offline- or local-first operations that …