[Box Backup-dev] Thinking of the future...

Chris Wilson boxbackup-dev@fluffy.co.uk
Sat, 28 Jan 2006 12:18:18 +0000 (GMT)


Hi Ben,

> Probably a bit premature, but I have the following code in my own repository 
> which *could* be contributed, and might be useful to others. All in the Box 
> house style.

Thanks for telling us about this stuff. It all sounds really useful.

> * Database interface
>
> Combination of autogenerated code and standard C++ style code which allows 
> easy, type-safe and fully named access to databases. Includes drivers for 
> MySQL, Postgresql (text and binary mode) and Sqlite, with a system for 
> abstracting out the differences in SQL syntax. Two lines of code to run a 
> query and get the results.

I'm not sure how we would use this in Box - maybe backing up live 
databases?

For other projects, I'm quite interested in the wxWidgets database 
framework, which seems to support a lot of databases and is well 
supported [http://www.wxwidgets.org/manuals/2.6.2/wx_odbcoverview.html]. 
It would be interesting to compare the wx framework with your own and 
combine the best features of both, for simplicity and power.

Do you support parametrised queries? This is a personal bugbear of mine. I 
hate inserting data directly into a SQL query as it's dangerous and 
difficult to get right.

> * Web application framework
>
> This is a bit of a "version one learning experience", but it's a load of 
> perl which writes C++ which complies into a standalone HTTP server. 
> Basically, it writes all the boring boilerplate code for forms, 
> internationalisation, and data binding to database queries. Could be 
> used for writing a nice cross-platform UI for bbackupd/bbackupquery. Not 
> perfect, but usable, if a bit weird to get into.

This could be very cool. I might not take on the cross-platform UI for 
bbackupd/bbackupquery, as I'm already working on one :-) but I might be 
interested in writing one for bbstored.

> Class for easily sending email via STMP servers, and validating emails 
> addresses (including looking up the RHS in DNS). Might be handy for 
> sending notifications direct, instead of via the dodgy perl script.

I'm not sure about this, I don't really like emails for notifications, 
especially as the current ones contain so little information. If they 
could be made more informative, and the current capability to call a 
script could be maintained as well, that would be very nice.

> I hope the developers have noticed that Box Backup is mostly a generic 
> framework for writing UNIX daemons and clients really quickly and 
> easily.

I had noticed, but it's not something I do every day :-)

The autogen protocol libraries are potentially a big time and bug saver, 
but I'd really like to find out how it works in great detail before I'd be 
comfortable using it.

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |