N
Nick Dr
Ive been messing around with Ruby for a few weeks now, and I'm fairly
comfortable with the language itself, but now I want to host a *very*
tiny app on the net, and I'm getting very overwhelmed with the massive
array of frameworks and technologies available.
I'll describe what I'm trying to, and maybe someone here can just point
me in the right direction and spare me weeks of wading through doc to
find out all about each of these things.
I've written a small HTML/JQuery page that displays a simple UI on a
canvas element. The user clicks on pictures of buttons and the JQuery
posts a string to the server. I need some server side code - hopefully
ruby b/c i like the syntax, and i've heard bad things about PHP - that
will take the command from the POST, hit a MySQL db, and return a string
response. The JQuery takes the string response and updates the canvas.
Really simple right? I already have the HTML/JQuery/Canvas-draw. I've
already got the Ruby code itself, including the MySQL part.
I went to host it, and figured I'd try it at home before I spent any
money. I installed Apache on my Ubuntu box, dropped the Ruby files into
the cgi-bin folder, used the ruby cgi lib in my script and it all
worked. Then the plane crashed in the mountain.
I started reading online and people said pure CGI was way too slow b/c
I'll be loading and disposing of all my code and db connections each
request. That sounds bad. So what do I do? I've be told things about
FastCGI, Passenger, mod_ruby, Rack, Sinatra, Camping, etc. and I can't
even figure out which one I need!
Can someone point me in the right direction here? My app is VERY small.
Practically no code, no HTML output. All I need is to execute the 2 or 3
Ruby functions I already have, on the net, with some basic
cookie/session support. What's the least headache(and not terribly slow)
way to do this?
comfortable with the language itself, but now I want to host a *very*
tiny app on the net, and I'm getting very overwhelmed with the massive
array of frameworks and technologies available.
I'll describe what I'm trying to, and maybe someone here can just point
me in the right direction and spare me weeks of wading through doc to
find out all about each of these things.
I've written a small HTML/JQuery page that displays a simple UI on a
canvas element. The user clicks on pictures of buttons and the JQuery
posts a string to the server. I need some server side code - hopefully
ruby b/c i like the syntax, and i've heard bad things about PHP - that
will take the command from the POST, hit a MySQL db, and return a string
response. The JQuery takes the string response and updates the canvas.
Really simple right? I already have the HTML/JQuery/Canvas-draw. I've
already got the Ruby code itself, including the MySQL part.
I went to host it, and figured I'd try it at home before I spent any
money. I installed Apache on my Ubuntu box, dropped the Ruby files into
the cgi-bin folder, used the ruby cgi lib in my script and it all
worked. Then the plane crashed in the mountain.
I started reading online and people said pure CGI was way too slow b/c
I'll be loading and disposing of all my code and db connections each
request. That sounds bad. So what do I do? I've be told things about
FastCGI, Passenger, mod_ruby, Rack, Sinatra, Camping, etc. and I can't
even figure out which one I need!
Can someone point me in the right direction here? My app is VERY small.
Practically no code, no HTML output. All I need is to execute the 2 or 3
Ruby functions I already have, on the net, with some basic
cookie/session support. What's the least headache(and not terribly slow)
way to do this?