This branch adds a rough, but basically working, implementation of an
initial MGNP protocol library, including a connection-management state
machine and routing. I've written a single integration test with two
peers running in separate Tokio tasks and communicating over a Tokio
MPSC of frames, where one peer connects to a "hello world" service on
the remote and they exchange "hello world" messages with each other, and
that seems to basically work.
Some things that aren't done yet include:
[ ] More tests, obviously, especially around the various edge cases of
creating/closing connections.
[ ] Currently, when a local connect is initiated, the client just
immediately gets a BiDi, regardless of whether the connect succeeds or
fails. We need to add a oneshot channel type thing so that the client
can wait for the connection to be handshaked and receive an error if
the handshake failed, but I haven't done that yet.
[ ] The registry service identity design is a kind of rough sketch
that needs more love.
[ ] The interface exposed by outbound frames to the Wire is quite
awkward, and needs to be reworked to make writing out serialized
messages easier. This is a bit tough with the current tricky-pipe
and postcard interfaces.
I'd prefer to save all of this work for follow-up branches and get the
current working impl merged, so that we can move forward with what we
have currently.
This branch adds a rough, but basically working, implementation of an initial MGNP protocol library, including a connection-management state machine and routing. I've written a single integration test with two peers running in separate Tokio tasks and communicating over a Tokio MPSC of frames, where one peer connects to a "hello world" service on the remote and they exchange "hello world" messages with each other, and that seems to basically work.
Some things that aren't done yet include:
Wire
is quite awkward, and needs to be reworked to make writing out serialized messages easier. This is a bit tough with the currenttricky-pipe
andpostcard
interfaces.I'd prefer to save all of this work for follow-up branches and get the current working impl merged, so that we can move forward with what we have currently.