[mosh-devel] Reusing the State Synchronization Protocol

Keith Winstein keithw at MIT.EDU
Tue Aug 28 21:49:12 EDT 2012


Hello David,

Yes, you are on the right track. SSP itself is in the src/network
directory. The objects that Mosh synchronizes via SSP are in the
src/statesync directory. The required interface is marked in each
header file as "/* interface for Network::Transport */". Happy to
answer any questions -- if you can tell us more about the kinds of
state you will be synchronizing, we may be able to opine on whether
SSP is appropriate.

One difficulty you might run into is our lightweight treatment of
fragmentation. Most Mosh "diffs" consume <3 or 4 IP datagrams. If your
objects regularly create "diffs" must larger than this, you will
probably want something more sophisticated.

Good luck, and please let us know how we can help!

Best regards,
Keith

On Tue, Aug 28, 2012 at 3:00 PM, David Eriksson <david at 2good.nu> wrote:
> Hi,
>
> I'm hoping to try out the State Synchronization Protocol for a different
> purpose. I'm currently studing the mosh source code but my C++ skills seem
> to have aged a bit, and the SSP has not been factored out as a separate
> library.
>
> Would there be anyone with understanding of the implementation that could
> give me some hints on how to reuse the SSP implementation in mosh for
> synchronizing another type of state?
>
> Am I correct that this is the key to the SSP...
>
> Network::Transport< Network::UserStream, Terminal::Complete > *network;
>
> ... so I can reuse the SSP code in the src/network/ directory but I will
> need to implement my own classes instead of Network::UserStream and
> Terminal::Complete from the src/statesync/ directory?
>
> I'll try to to figure out the required interfaces for MyState and
> RemoteState now...
>
>
> Best regards,
>
> David Eriksson
>
> http://www.divideandconquer.se/
>
> _______________________________________________
> mosh-devel mailing list
> mosh-devel at mit.edu
> http://mailman.mit.edu/mailman/listinfo/mosh-devel
>



More information about the mosh-devel mailing list