solent-eng / solent

Free software sequencer architecture
GNU Lesser General Public License v3.0
7 stars 4 forks source link

consensus engine #125

Open cratuki opened 6 years ago

cratuki commented 6 years ago

:: Goal

Create a method for reliable message-delivery over the network. We will call this message-broadcast.

:: Context

[nearcasting]

Currently, we have a message nearcasting capability. This messaging fits within a single process. It is simple to achieve consensus here:

In practice, all aspiring messages become canonical messages unless there is a process crash. We do not have to think hard about whose message gets to come first, because messaging happens within a simple cooperative-multitasking context.

[broadcasting]

Consensus over broadcast is harder.

:: Structuring the work

It would be foolhardy to head into this without first having a protocol-buffer technique worked out. Hence, get issue #124 clear before going deep on this.

We should be careful to think about these concepts independently of one another,

The lingo of 'carrier layer' and 'message layer' is ad hoc, and not drawn from an external resource.

The first one is about ordered delivery of bytes. The second one is about ordered delivery of messages which are composed of the bytes. The reason this is important: it should not be necessary for the consensus engine to understand the messaging schema. At this point, something like apache kafka may be viable as a consensus engine. I would not want to "just use kafka" though. I would want to have a clear understanding of the options, and possibly to be able to switch in different types of consensus engine depending on the throughput, latency and redundancy demands of different domains.