> A tube is a small raft, delightfully used for 

> floating down rivers on a sunny summer's day 

> in some parts of the world.
I have open sourced my Go RAFT library called Tube. It is
a part of my Go RPC package (rpc25519) that provides 
"channels over the network".

https://github.com/glycerine/rpc25519/blob/master/tube/tube.go

Tube (RAFT) uses my gosimnet, https://github.com/glycerine/gosimnet, 
for testing. Gosimnet provides a simulated network environment 
for testing/synctest tests.

Probabilistic and asymmetric network faults can be injected in gosimnet.
Dropped or delayed messages can be replayed much later to simulate 
chaotic (real) networks under stress.

It was fortuitous timing that synctest was announced shortly before
I needed a facility for mocking the network for to do RAFT/Tube testing. 

I used gosimnet and the Tube implementation to do a QA pass on synctest 
before
it was finalized in Go 1.25, and I'd like to thank Damien Neil for his work 
on 
on the synctest package and for fixing the issues found. He gave a nice 
talk on synctest recently[1], which is well worth watching.

Together with gosimnet, gophers have a much stronger distributed 
systems testing story. Not quite full DST (Deterministic Simulation 
Testing)[2] yet,  because determinism within the standard Go runtime
remains elusive[3], but still highly useful and effective.

Enjoy,
Jason

[1] recent gophercon EU 2025 talk on the testing/synctest 
package: https://www.youtube.com/watch?v=oIC3zhTAOsY

[2] https://www.youtube.com/watch?v=4fFDFbi3toc Will Wilson's
2014 Strange Loop talk is a great intro to DST. He is now the CEO
of Antithesis, which provides DST as a (very pricey) cloud service.

[3] In the blog 
https://www.polarsignals.com/blog/posts/2024/05/28/mostly-dst-in-go
the Polar Signals folks apply a couple of minor patches to the Go runtime,
and use WASM -- the only single threaded Go environment -- to get 
fairly deterministic execution. Threads being scheduled 
non-deterministically
by the OS are the big problem.  For a while I thought we might be able to 
just
record and replay instead of DST, via the rr debugger, but getting 
the Go runtime initialization itself to not have race bugs is also hard ( 
https://github.com/golang/go/issues/74019 ).

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/c44a427b-7790-46f1-b043-25c13eadd8fbn%40googlegroups.com.

Reply via email to