views:

220

answers:

2

Hi all,

I'm very new to web programming (or actually, very old to it, since the last time I messed with the web was HTML 1.1), but now need to deploy a web application quickly. It seems like every time I turn around, there's new acronyms and technologies to learn (JSON, XMLRPC, GWT, Javascript, Rails, etc).

Here's what my app must do:

  1. Given a username and password, authenticate (easy enough, everything does that, apparently).
  2. Allow the user to upload a large glob of data for processing.
  3. Process that data.
  4. Allow the user to download their processed data.

I've already got Java scripts and a database for handling the data. On one machine, I can run a series of command-line programs to process an incoming datablock and put the results back into a mysql database. That is already present and working.

I want to construct a web front-end to this task, using these existing and tested methods. I'm currently leaning to this approach:

  1. Have two machines, a database machine and a web server. That approach allows for later scalability, if necessary, but also requires that I can't assume that the programs that I use to access the data and manipulate it are locally stored.
  2. Use a Ruby DRb application to create a server and a client. The client would pass data to the server which would in turn call these applications.
  3. Use some other Ruby interface to interact with the DRb for the web frontend.

Here's my problem: it looks like most Ruby applications for the web automatically try to build some kind of local database. All the Rails tutorials I've found start with making your own database and interacting with that, which is exactly what I don't want to do.

Is Rails the right technology for me, or using Ruby DRb? Is there some other technology I should be exploring?

If Rails or Ruby is the Right Thing here, what should I be looking at? I already have the Programming Ruby book, and have used that for some of the backend stuff as well as getting basic DRb stuff working.

+1  A: 

Rails is fine. You can have development and test databases on your local machine and the production database on a remote machine. It doesn't have to be the web server. Get a copy of Agile Web Development with Rails. It'll teach you all you need to know.

Mick Sharpe
Rails is fine, even though I do not want to use any of the database functionality of Rails? What is Rails, then, if the data is not stored in a database?
mmr
Rails is a framework built around the Model-View-Controller architectural pattern, but the model part is very much pluggable. The ORM that Rails uses as the model layer, ActiveRecord, can be completely disabled, leaving you just with controllers and views. What you use for data storage then, is up to you.
Shtééf
+14  A: 

Sounds like Rails might be a bit heavyweight for your situation. Perhaps Sinatra might be a better fit? It's an ultra-lightweight framework: a hello world app might look something like:

require 'sinatra'
get '/' do
  "Hello World!"
end
Mike Woodhouse
Wow, Sinatra looks completely awesome! I've already got a nine line program that calls a remote program via drb and posts the results to a webpage.
mmr
@mmr It is pretty great. Be sure to read the book! (http://www.sinatrarb.com/book.html)
Tyler Smith