[Rails] "Offline" rails app?

Jeff Cohen cohen.jeff at gmail.com
Wed Jan 11 05:54:29 GMT 2006


Hope this question doesn't sound too strange.  This is a typical 
synchronization scenario, and I've done this a lot with .Net "rich 
clients", but I'm fairly new to web programming and to rails.

I'm developing browser-based applications that will sometimes have to be 
disconnected from the internet.  One example is a browser-based app for 
conference registrations.  At the hotel, I'd like to provide laptops 
with my app hosted locally, since there may not be internet connections 
available.  I would use MySQL on the client, etc. so that to the rails 
app, everything seems normal.

But when there is an internet connection, I would want to push to the 
"master" database any new rows that have been added to certain tables, 
and to pull down and updates that have been made to the master since 
that client last connected.

MySQL only seems to support one-way replication, from slave (the client) 
up to the master.  So I'm thinking I need to write some code to perform 
the synchronization myself.

My questions are:
- is there any advice on a "canonical" way to switch the rails app from 
offline mode to online mode?  Would SwitchTower be of any use here?
- can anyone confirm/deny my fears that MySQL can't do this for me 
automatically?
- is there something really obvious that I'm missing here?

Thanks!
Jeff

-- 
Posted via http://www.ruby-forum.com/.


More information about the Rails mailing list