dcurl
dcurl copied to clipboard
Determine and implement the behavior of dcurl with different remote component status
dcurl should keep working well with the different status of the remote component behind the remote interface, such as inactivation, termination or restart of RabbitMQ broker and remote worker .
- Termination: It is initialized successfully and runs for a while but somehow been closed.
- Inactivation: It is never been run, which is treated as initialization failure.
| RabbitMQ broker | Remote worker | Determined behavior |
|---|---|---|
| Inactivation Termination |
* | Use local available hardware to do the PoW Print out the warning |
| Restart | * | Use remote worker to do the PoW |
| Normal | Inactivation Termination |
Wait remote worker for a while(10 sec) and use local available hardware to do the PoW if it does not restart |
| Normal | Restart Normal |
Use remote worker to do the PoW |
The visualization of current implementation would look like:

After the RabbitMQ broker is restarted, if the connection is setup again, the dcurl can use the remote worker again.
I've found the corresponding code to setup again, but the source code execution flow should be considered carefully.