monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] merging branch to allow 'automate stdio' over the


From: Timothy Brownawell
Subject: Re: [Monotone-devel] merging branch to allow 'automate stdio' over the network
Date: Wed, 30 Sep 2009 21:04:08 -0500

On Tue, Sep 29, 2009 at 2:14 AM, Stephen Leake
<address@hidden> wrote:
> Thomas Keller <address@hidden> writes:
>
>> Timothy Brownawell wrote:
>>
>>> This splits netsync.cc into multiple files, and splits the negotiation
>>> and teardown out of the 'session' class. Then it adds 'automate_cmd'
>>> as an alternative to 'anonymous_cmd'/'auth_cmd' so that network
>>> clients can request either an automate connection or a netsync
>>> connection.
>>
>> The split is definitely welcome, what I miss (and to be honest already
>> missed before) is some chatter about the roles of the different classes
>> and their inner workings. I know that monotone's source code is mostly
>> documented, erm, "as is", so either I read and understand it or it is my
>> problem, but still I see your refactoring as chance to improve the
>> documentation of this crucial part of monotone.

I've put a few comments in the header files, does this help?

> I agree. For example, why do we need the notion of "wrapped session"?
> It would seem deriving automate_session and netsync_session from
> session would be simpler.

That would be much more convenient, but it puts the binding time too early.

On the server, a 'session' is created at accept() time. We don't know
whether that 'session' should actually be a 'netsync_session' or an
'automate_session' until we get the client's reply to our hello
packet, so we need something that can be instantiated separately and
inserted into an already-existing 'session' to give it a personality.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]