Dev Diary: replication/ebt
I've been working on my grant, getting ebt ready for full deployment.
I feel the grant process gives me license not to just do the most expedient thing, but do the right thing which has so far involved rewriting the muxrpc internals.
And, this part is half finished, but rewriting epidemic-broadcast-trees. I didn't rewrite for the hell of it. Firstly, there where various tests in ssb-ebt that were too complicated, and I didn't understand why they weren't passing. Secondly, the low level features where provided by the epidemic-broadcast-trees
module, then that was ment to be glued to ssb in the ssb-ebt
module... except far too much functionality ended up in ssb-ebt, and it needed it's own tests! ebt uses a data structure oriented programming style, with a deterministic simulation for tests, but because of the glue layer I wasn't able to test ssb-ebt that way. So, I realized I really needed to just rewrite ebt. EBT is probably the 3rd or 4th time I rewrote scuttlebutt replication (if you include the original "insecure" scuttlebutt module.
This time the state model encompasses the fact the you may be replicating the multiple peers at one time, and connecting and disconnecting with them. I havn't got to this yet, but could also make tests that include randomly connecting and disconnecting to peers.