[Box Backup] Box Backup on Rails

Ben Summers boxbackup@fluffy.co.uk
Tue, 27 Feb 2007 08:45:57 +0000


On 26 Feb 2007, at 17:02, Stefan Norlin wrote:

> We have created a Ruby driver for Box Backup and implemented
> a web application based on Ruby on Rails (http://www.rubyonrails.org).
> It can be used for browsing server stores (like bbackupquery) and
> we will soon add functionality to restore/extract files.


Good stuff!

I'm especially interested in your use of the protocol file to  
generate a Ruby driver. That sounds like something which might be  
useful elsewhere.

A couple of thoughts.

1) Pages which require communication with the server take a lot  
longer to appear than other pages. Are you logging in to the server  
each time? If so, look into DRb. You might find you can do connection  
pooling across multiple Ruby server instances with no code changes,  
apart from the initial acquisition of the connection object.

2) Would it be possible to create a 'local' version? Freeze the gems  
into the rails app so you only depend on Ruby, fudge the data model  
to not require a database (fixtures?), and then you might be able to  
offer something which you download, unpack and run, and it uses the  
files in /etc/box/bbackupd to connect to the local machine's backup  
account. This one could just run as a single Rails process, so you  
wouldn't need to bother with DRb to keep the connection open; there's  
only one Rails thread.

Ben