-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jose Luis Lucas
committed
Dec 10, 2018
1 parent
44c066a
commit 5009afa
Showing
4 changed files
with
68 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Message passing. | ||
|
||
QED receives events as input, and outputs signed snapshots. These snapshots | ||
are inputs to any agent (publisher, monitor and auditor), so QED needs to | ||
pass batchs of signed snapshots to the agents. | ||
|
||
## Gossip | ||
|
||
QED server and agents use the [memberslist](https://github.com/hashicorp/memberlist) | ||
package from HashiCorp to create lists of servers, publishers, monitors, and | ||
auditors. | ||
|
||
Then, QED sends a batch of signed snapshots to a configurable number `N` of | ||
each agent type vía memberlist `send reliable` tcp connection, adding a TTL | ||
to each batch. | ||
|
||
Agents receive a batch of signed snapshots, perform their particular task | ||
using it, and send the batch again to other agents (not to QED), reducing the | ||
message TTL. Message passing ends when TTL is equal to 0. | ||
|
||
## Alternatives | ||
Besides of Gossip, HTTP protocol can be used for passing messages, but | ||
syncronous requests make QED to not perform as expected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## Raft | ||
QED uses `raft` for a leader election within a cluster of servers. | ||
Agents do not use raft. | ||
|
||
The leader is able to add new events or verify proofs, while | ||
followers only perform the verifiying option, to cope with read | ||
scalability requirements. | ||
|
||
Once there is a leader and some followers, QED leader replicate the | ||
finite state machine (FMI) to the followers before performing the | ||
insert operation. | ||
Only insert operations (not query operations) are stored in the FMI, | ||
since QED uses them to recover from server failures. |