ChainSafe / ChainSafe/gossamer

feat(dot/parachain): manage communication between different parachain subsystems (i.e., build overseer)

Open
#3,418 4 comments 0 reactions 0 assignees View on GitHub
Epic S-subsystems-overseer
Dominant language
Go
Stars
454
Forks
144
PR merge metrics
No merged PRs in 30d

Description

## Issue summary
`lib/parachain` has a bunch of subsystems that need to run in parallel and there are more of these subsystems that will get added.

Many of them need to communicate with each other by say calling some function or fetching some data.

It would not be a nice design to connect two parachain subsystems directly, because
- It would require us to manage a lot of links/connections for each subsystems
- we might need to add extra logic to make these communication non-blocking

It would be nicer to have say a separate subsystem to manage these communications (equivalent to polkadot's overseer subsystem). The idea is that
- each subsystem will only communicate with overseer subsystem only.
- each subsystem will send their request to a overseer and continue with rest of its task without waiting for a reply. overseer will send a reply whenever it is ready.

Because overseer would mandate each subsystem to perform some common task, we could create an interface say `SubSystem` that could have tasks like
- receive requests for overseer
- process them and send a response.

Feel free to do these task as separate function or as part of the same function based on your best judgement.

I will update this issue as I go and make my understanding more clear.
## Sub Issues
- [x] #3495

## Other information and links

- Polkadot's implementation of overseer https://github.com/paritytech/polkadot/blob/153543b0c8c582e73f520e5c08cbe33bddfb5f69/node/overseer/src/lib.rs
- Explanation in node implementer's guide https://paritytech.github.io/polkadot/book/node/overseer.html

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.