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

Unify all services in full-node/light-base to the same paradigms #1382

Open
6 of 11 tasks
tomaka opened this issue Nov 21, 2023 · 0 comments
Open
6 of 11 tasks

Unify all services in full-node/light-base to the same paradigms #1382

tomaka opened this issue Nov 21, 2023 · 0 comments

Comments

@tomaka
Copy link
Contributor

tomaka commented Nov 21, 2023

I've experimented a lot over time on how to design the various services.

I think that the best design, in terms of ease to follow is:

  • One background task, which we communicate with only through channels.
  • No small child tasks, as it's a bit complicated to reason about the task shutting down. FuturesUnordered is fine. The only accepted child tasks are for the networking service, so that it doesn't crash if a child task crashes.
  • One giant loop plus match block with all the wake up reasons. No code above or below this pattern.

All the services should be tweaks to conform to this:

  • full/network
  • full/network/tasks
  • full/consensus
  • full/json-rpc
  • light/network
  • light/network/tasks
  • light/sync/relay
  • light/sync/parachain
  • light/runtime
  • light/transactions
  • light/json-rpc
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