marigold-dev / pollinate

A platform agnostic library for P2P communications using UDP and Bin_prot
22 stars 2 forks source link

Failure detector is stuffed into client module #26

Closed rosalogia closed 2 years ago

rosalogia commented 2 years ago

Summary

Currently, the failure detection module is kind of stuffed into the client module due to a cyclic dependency issue. The failure detector type must be used when defining the type of the client. However, the failure detector includes various functions that require the client as input. This can be solved by defining the failure detector types before the client type, and then defining the failure detector functions after the client type. Currently, we have achieved this by moving the entire failure detector to the client module, and moving failure detector types out of the failure detector module and above the client type. This is messy and makes navigating and finding issues in the code a real pain. If we can find a way to move things into separate files, we should.

Relevant Documentation and Links

Related PRs and Issues: