libraft
libraft copied to clipboard
Calling RaftNetworkClient.start() after RaftNetworkClient.stop() will fail
Ideally, the caller should be able to start/stop a component multiple times. This may not be possible with RaftNetworkClient
because the internal ChannelFactory
instances have shutdown
called on them. It's unclear to me whether the caller would have to re-initialize the system in order for everything to work.
I have inconsistent management of components within libraft-core, libraft-agent and kayvee.
Ideally all components should have the following lifecycle:
+-----------------+
| |
| |
| initialize |
| |
| |
+--------+--------+
|
|
+--------v--------+
| |
| |
+----------> start |
| | |
| | |
| +--------+--------+
| |
| |
| +--------v--------+
| | |
| | |
+----------+ stop |
| |
| |
+--------+--------+
|
|
+--------v--------+
| |
| |
| teardown |
| |
| |
+-----------------+