Conversation
|
Thanks @gkelly ! I am taking a look at this now |
|
I don't have a lot of comments, to be honest - aside from the lack of documentations on public functions that I am sure you will fix eventually. The implementation is quite straightforward, and I think the abstraction is the right one (having a generic socket type would be overkill IMHO, so a new class for VSock makes sense). The example application is neat and simple. The only thing that I'd like to see more is testing and benchmarks, but I realize this can get a bit non trivial with vsock and its setup. What are the milestones you have in mind before considering ready to merge? |
|
Okay, I see now that you did add a bunch of things to the list of milestones - including testing and benchmarks. You already noticed the docs as well, so the only open comment is on how generic this should be. I don't have a preference to be honest, on the implementation. In terms of API, I like the direction you are taking with a special case top level class, instead of making the socket type a parameter. My reason for that is that in practice, almost everything is either a standard tcp or dgram socket. Any approach that parametrizes a socket puts the burden of reasoning on people using the standard socket types. |
What does this PR do?
Adds initial
vsockstream socket support toglommio. This is just to start a discussion of the approach, and is NOT ready to land.Motivation
I am working on high-throughput
vsockapplications running inside of hypervisors and am evaluatingglommioas a potential IO framework.This implementation is based heavily off of the
tcp_socketimplementation.Additional Notes
This is a draft PR, it is not yet ready to merge. It is missing the following:
SOCK_DGRAMsockets. I'm open to feedback here, but given how similar aSTREAMandDGRAMsocket behave undervsockI'm tempted to genericize the pieces across theSOCK_type.vsockexample more complete, it's currently just an echo server to prove it works.