relab / gorums

Gorums simplify fault-tolerant quorum-based protocols
MIT License
138 stars 14 forks source link

thinking: Consider whether or not to use the WithBlock dial option #173

Closed meling closed 7 months ago

meling commented 9 months ago

Many of our examples use the WithBlock option to wait for client connections to be established. According to gRPC documentation, this is apparently an anit-pattern that may not be appropriate.

We need to understand how avoiding the WithBlock dial option will impact our use in combination with Gorums.

aleksander-vedvik commented 8 months ago

I think this might be part of a bigger problem: A config cannot be created if some of the nodes are not up and running.

I have linked a pull request that will create a config regardless of the status of the node (it will, however, try to connect to the node initially). Instead, it will try to connect to nodes (that are offline) for each message that is supposed to be sent to the nodes.

The solution passes all tests and have been tested "live" (i.e. in an actual implementation). It also removes the need for using WithBlock().