RFC: smart server protocol change for 0.16

Wouter van Heyst larstiq at larstiq.dyndns.org
Thu Apr 12 16:38:42 BST 2007


On Wed, Apr 11, 2007 at 10:36:50AM -0500, John Arbash Meinel wrote:
> Robert Collins wrote:
> > One of the things I noticed while hacking on RemoteGraph was that error
> > handling really needs to be improved a little. After chatting with
> > Martin, we agreed that a nice improvement to the protocol would be that
> > all responses have a success/fail prefix.
> > 
> > That is, rather than using 'ok' for boolean results and 'resultX' for
> > non boolean, we'd return responses like:
> > 'ok', 'True'
> > or
> > 'ok', 'resultX'
> > for success, and
> > 'error', 'ErrorClass', ...
> > for errors.
> > 
> > This would make it unambigous about whether a given result is an error
> > or not, and allow us to centralise the error handling as it would no
> > longer be per-verb.
> > 
> > If we do this consistently, its a API break - but I think its a
> > worthwhile one. We could add synonyms for all the current verbs which
> > return the older style reponses, but personally I dont think thats worth
> > it.
> > 
> > -Rob
> 
> I think this is much cleaner in the protocol, and worth breaking for.
> Better to break now and get a nice protocol (before it is widespread)
> than being hobbled from here out.
> 
> But if we are going to break, I think we should include things like the
> client version that Martin has mentioned. (Of course, I've always been
> in favor of versioned commands, so my view is a bit skewed in this regard).

It's been a while, but I agree with John here.

Wouter van Heyst



More information about the bazaar mailing list