Skip to content

Conversation

@rosalogia
Copy link
Contributor

This PR tries to address #51 by moving certain "background processes" such as sending messages for failure detection and dissemination out of the server and into an Lwt.async call. This means the server can block as much as it wants waiting for new messages and handling them before continuing. The original reason for this was to remove the fixed interval between server iterations due to the fact that messages were being received/handled in a separate thread which was not being awaited. However, I have found that this approach does not actually allow us to remove the fixed interval. It is still necessary for the interval to be there in the function called with Lwt.async, or things begin to stall. I am not sure if this change is desirable.

rosalogia and others added 29 commits May 27, 2022 14:52
* Add post category
* Derive show for debugging purposes
* Add timestamp for checking if message is out of date
* Make recipients an Address.t list so that messages can be constructed without recipients, then have recipients added later on
* Add message hashing for easily checking if a message has been seen
  before
This module is essentially a "dissemination manager". It keeps track
 of plenty of useful state info regarding what
messages are being sent out, for how long
they should continue to be sent out, and which
messages shouldn't be interacted with anymore.
…ve certain modules/functions to testing submodules
@rosalogia rosalogia requested a review from Gau-thier June 10, 2022 21:36
@rosalogia rosalogia force-pushed the @rosalogia/async-background-processes branch from ed11dde to 0906408 Compare June 10, 2022 21:56
Copy link
Collaborator

@Gau-thier Gau-thier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good change!
I accept, but tests seems to fail, once they are fixed, this can be merged.

@rosalogia rosalogia force-pushed the @rosalogia/gossip-dissemination branch from a9866a3 to ec351dc Compare June 29, 2022 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants