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

Multi-threaded runner #22

Open
michielbdejong opened this issue Oct 4, 2024 · 1 comment
Open

Multi-threaded runner #22

michielbdejong opened this issue Oct 4, 2024 · 1 comment

Comments

@michielbdejong
Copy link
Member

There's no good way to keep track of the message queue in the cluster.
I'm thinking therefore:

  • from the primary, start a number of probes, start with just one at at time
  • wait for the message traffic in the primary to stop (10ms passing without any messages being sent)
  • if that works, increase the number of concurrent probes, for instance one or one in each worker
  • there will immediately be a risk of probes competing over the same loops, but that's reality
@michielbdejong
Copy link
Member Author

I had a multi-threaded runner in https://github.com/ledgerloops/jerboa/blob/96776daa05112f66de177e9064ee91436061c189/src/Cluster.ts but it was quite hard to debug (e.g. one thread would refuse connections in its http server from another, leading to timeouts etc), so I stopped using it, but would be nice to still see if I can get it working properly.

@michielbdejong michielbdejong changed the title Rethink probe parallelism and runTasks for cluster Multi-threaded runner Oct 14, 2024
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

No branches or pull requests

1 participant