Open Stebalien opened 1 year ago
Hm. Well, this would require leaving goroutines open. Which isn't great.
Maybe we're really just looking for in-order messages of some form?
Hey @Stebalien. I've been working on a Go-specific side project https://github.com/celestiaorg/go-libp2p-messenger, which solves most of the annoying points you've mentioned:
Other points about Messenger:
identify
, it will only take two state management routines most of the time.go-libp2p-pubsub
, but vastly improves it
processLoop
That's exactly what I'm looking for. But I would consider suspending idle streams because we currently have to reserve fairly large receive buffers per-stream (I think?).
Ah, wait, that's what your issue is referring to.
Are there any ordering guarantees?
Yes, as I use native channels there atm
(If I understood your question correctly)
(if there are any messenger issues or feature requests, I am happy to collaborate/implement them)
Libp2p has streams, but they're really annoying:
We should consider adding user-space stream layer that can: