Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add round buffer. Closes #3 #342

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Add round buffer. Closes #3 #342

wants to merge 4 commits into from

Conversation

juliangruber
Copy link
Member

@juliangruber juliangruber commented Aug 31, 2024

Closes #3.

This PR implements self healing by buffering current round's measurements on disk.

  • Write tests
  • Write round index to first line of buffer file
  • Handle when the recovered round isn't the right one (wrong index)
  • Append or create the buffer file (see test failure)

Sorry, something went wrong.

@bajtos
Copy link
Member

bajtos commented Sep 2, 2024

I am not opposed to this solution, but I'd like to propose an alternative to consider:

Upsides:

  • The service will not need any persistent volume.
  • We don't have to write & maintain complex code to manage a ringbuffer.

Downsides:

  • When there is an outage of the RPC API, or if the eth_getLogs call takes long time to complete, then spark-evaluat will need a lot of time before it starts & can handle events. (This can be mitigated, though. E.g. the startup does not have to wait until we get all events.)
  • On restart, we have to re-fetch measurements from older round events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Self-healing
2 participants