lni / dragonboat

A feature complete and high performance multi-group Raft library in Go.
Apache License 2.0
4.98k stars 533 forks source link

Custom INodeRegistry support #326

Closed tylerwilliams closed 9 months ago

tylerwilliams commented 9 months ago

I'm interested in using Dragonboat's gossip feature but I would like to be able to use a different implementation (serf) or send additional information over the gossip network.

There doesn't appear to be a way to get access to the underlying memberlist instance or to provide a custom one.

Would you be open to a pull request similar to this one that would add support for external registry functions?

lni commented 9 months ago

I am interested.

Please allow a few days so I can checkout serf. To be honest, memberlist is a headache, I had many issues with it. If serf can be used as a safer replacement, maybe just get rid of the memberlist module and use serf.

lni commented 9 months ago

it seems serf uses memberlist.

tylerwilliams commented 9 months ago

it seems serf uses memberlist.

Yeah it does :( There are other gossip libraries but I have not used them.

The main reason we want this change is to be able to send our own data via memberlist.

tylerwilliams commented 9 months ago

Alright I went ahead and sent https://github.com/lni/dragonboat/pull/327 which adds this against master. LMK what you think. Thanks