Host/Service interface design
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.9k
- Forks
- 1.3k
- Avg merge
- 13d 21h
- Merged PRs (30d)
- 1
Description
It is becoming apparent that our `Host` interface needs to be extended with the concept of services and possibly an event bus.
For instance, the autorelay module in https://github.com/libp2p/go-libp2p/pull/454 needs access to the `Identify` service in `BasicHost` in order to push address updates. It also needs to be able to override the address factory, which necessitates the `AutoRelay` host wrapping a `BasicHost` directly.
On top of that, it embeds the ambient autonat service, which we would like to expose to other parts of the system.
Additional considerations include the ability to emit events about things like peer identification completing and other internal state changes that are now handled with delays.
This issue is here to discuss the evolution of our Host interface and drive future refactoring.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Host and BasicHost interfaces, the AutoRelay host wrapper, and the linked autorelay pull request. Map how Identify, ambient AutoNAT, address-factory overrides, and delayed state changes currently interact. Done means the project has an agreed Host evolution and a concrete refactoring plan, but this issue does not define that design.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems, networking
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100