[Box Backup] Box Backup on Rails

Stefan Norlin boxbackup at fluffy.co.uk
Tue Feb 27 09:15:54 GMT 2007


> Good stuff!

Thanks! :)

> 
> 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.

Ok, that is 373 lines of Ruby code... :)

> 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.

Currently, yes. I have actually started looking at DRb, but not
had the time to figure it out, yet. But it is definitely the way to go.

> 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.

That should not be too difficult. It could even be some kind of
"default" mode if a database connection is not available. Will
think about it a bit... :)

Stefan




More information about the Boxbackup mailing list