-
Notifications
You must be signed in to change notification settings - Fork 36
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
Implementation #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great. let's get this merged and take it from here
return | ||
} | ||
|
||
switch *req.Type { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk if it's necessary for this PR, but we can definitely abstract this to support handler functions of the variety
func (req *pb.Request) *pb.Response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah well it seems it doesn't perfectly map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, the stream breaks the abstraction. Also, notifications later on.
Can we somehow extract this transport to a go-libp2p-unix-transport? |
We could do that I guess, although I am not sure how it would work for the control protocol (that's missing currently!). |
My thinking was that we'd have:
That means applications would have to implement:
We could also, in theory, make protocol negotiation transport specific (like we've done with stream muxing and security) but we'd have to think carefully about that. |
Not objecting, just not rushing. |
👍 I'd just also like to optimize for fewer abstractions. That is, if we can get away with reusing existing abstractions, we should. However, we do have to balance that with simplicity and fit. |
Initial implementation with a unix socket protocol; provides just enough to open connections and streams.