[Box Backup] Win32 port (was: BoxBackup Server Side Management Specs (Draft0.01))

Ben Summers boxbackup@fluffy.co.uk
Sat, 9 Oct 2004 09:53:48 +0100


On 8 Oct 2004, at 21:45, Chris Wilson wrote:

[snip]
>
>> It's only provided on login, or when a specific command is sent to
>> retrieve it in more detail.
>
> Then presumably bbackupd must query the server occasionally to 
> determine
> that it's not over limit? If so, would you be happy for it to cache the
> responses, to help the GUI client?

Actually, it just uploads stuff and if there's too much, the server 
returns an error.

[ XML discussion ]

I think Alaric answered this quite well.


> 	stream << "file\t";
> 	stream << Escape(File->ID) << "\t";
> 	stream << Escape(File->Parent) << "\t";
> 	stream << Escape(File->Name) << "\t";
> 	stream << Escape(File->Age) << "\t";
> 	stream << Escape(File->State) << "\t";
> 	stream << Escaoe(File->Error) << "\n";

This is appalling C++. I'm sure that In The Beginning, people writing 
introductory texts wondered what they could do with operator 
overloading, and how to illustrate how the language could be totally 
mutated. So they decided to use operator overloading for I/O! And then 
ever since, this bizarre and confusing syntax has been used for I/O.

Operator overloading is bad, except in some very isolated incidents. 
The reason is simply that, given an arbitrary class, can you tell 
instinctively what + or << should do? And that's before precedence 
raises it's ugly head.

End rant.


>> No XML will not be integrated into the backup engine, sorry.
>
> I'm having difficulty understanding whether your objection to XML is
> philosophical or practical.

It's inappropriate for the required purpose.

>  Myself, I think that its practical benefits
> far outweigh its disadvantages, in all but the most extreme 
> circumstances
> (tiny systems, huge systems, huge data volume; of which this protocol
> needs none), and I don't understand a philosophical objection. XML 
> became
> popular for a reason, not because it was popular.
>
> I really dislike over-simple protocols that make too little concession 
> to
> being easy for both humans and machines to read, future-proofing or
> robustness. A little effort at design time makes it possible to satisfy
> all these criteria. The only happy medium that I have found is XML (and
> YAML, but it's almost the same as XML). Everybody is using it. It's not
> big or ugly or heavy if you do it right. Good libraries are available.
> What's not to like?

See Alaric's post.


>
>> It might be worth sending me an early copy to make sure the design 
>> fits
>> in with everything else.
>
> I certainly will send you something when I have got it to compile! 
> Right
> now I'm trying to add support for multiple UNIX sockets into bbackupd 
> in a
> reasonably clean way.

Are you sure this is really necessary?

>  I will be happy to send you a patch early if you
> prefer, but it's in a real mess right now.

OK!

>
>> Thanks for your efforts!
>
> Thank you for writing Box in the first place, without which my project
> would be two years behind where it is now. I only hope that I can 
> persuade
> you on the merits of XML, or another generic encapsulation language, 
> for
> this status protocol.

You can try...

Ben