top | item 111677

Ask YC: Which is easier to deploy/maintain: Python or Ruby apps?

7 points| rob | 18 years ago | reply

In your opinion, assuming you have full control over the server, which is easier to deploy and maintain (server-wise, sure as making sure everything is set up properly and running smoothly): Ruby apps (e.g., merb, ramaze, rails) or Python apps (e.g., Djano, Pylons, TurboGears)?

From what I can gather, Python apps seem easier to deploy and maintain: usually you run a static server up front (such as nginx) and proxy it to Apache running either mod_python or mod_wsgi, or even use Apache by itself. It looks like Ruby apps usually use nginx in the front and proxy their app to a bunch of Mongrels running in the backend.

I've played around with both languages and have no objections to using either one, but I'd like to know if anyone has experience in deploying a web app in either language and how it went? Or even which setup uses more memory?

Thanks for any help.

14 comments

order
[+] nickb|18 years ago|reply
It takes me ~10 min to deploy a Rails app (production ready) on a freshly installed Ubuntu server. To do that, I have to issue a SINGLE command that includes the IP, ssh port, and a password of the machine. The process includes setting up the server, downloading all of the necessary files, security updates, compiling and setting up the server (nginx), setting up rails, setting up database, loading database dump from the remote server, grabbing the app from svn, etc etc anything I want really. I issue the command and just forget about it and work on something else for ~10min. When I come back, the app is up and running and production ready! Wanna setup 10 servers? Just open up 10 terminals and you'll have 10 servers in 10min.

How? Through the magic of capistrano: http://www.capify.org/getting-started/rails

I've never seen anything else even come close to this level of simplicity.

Seriously, that should be the LAST of your criteria as to which language, and more importantly, framework to pick. We went with Rails since it has better plugins/gems than Django. We don't want to waste our time re-implementing basics and Rails currently has the cutting edge libraries for web work... stuff that you will have to do yourself in other frameworks.

[+] craigbellot|18 years ago|reply
I agree, that should be the last thing to worry about. Rails and I am in love.
[+] chaostheory|18 years ago|reply
man no wonder you have time to submit 10,000 articles a day hehe
[+] robmnl|18 years ago|reply
I've found python much easier to deploy.

Rails is just a pain.

Python has a longer history on the web. Give cherrypy a try, which, although not as powerful as Rails, is lightning fast.

[+] chaostheory|18 years ago|reply
why not django or turbogears?
[+] thingsilearned|18 years ago|reply
Here's a recipe for deploying django on ubuntu.

http://www.jeffbaier.com/2007/07/26/installing-django-on-an-...

Its really simple and takes negligible time. Django is also easily scaled as all sessions are stored on the database.

I chose python because I had been using it for years and love the language. It also has a ton of libraries and support obviously.

I chose Django after a horrible stint with Zope3. Especially now, django has some great documentation and a super helpful IRC channel.

[+] jsnx|18 years ago|reply
Deploy: Ruby things. GEMs work better than EGGs, in part because there are fewer of them. Ruby makes OO easier.

Maintain: Python things. There are so many EGGs! If you need a new package for something or other -- the JSON parser isn't fast enough or something -- someone has made an alternative already. Performance matters for maintenance -- scalable deployment is still not easy, or cheap -- and it helps that Python has a fast core and syntactic shortcuts to things like generators (memory efficient) and list comprehensions (CPU efficient).

[+] ivankirigin|18 years ago|reply
Django has a less advanced schema evolution framework compared to ROR, making database updates harder. You need to kill the process to update the code, as opposed to ROR (i think).

Python is a better language than Ruby. Python has better libraries for more advanced processing because it is so close to C.

[+] ardit33|18 years ago|reply
I don't think Django is a great example. Python it'self is by far superior to Ruby. It is one of those kind of languages, where frameworks are optional. something like web.py or cherrypy are just enough.

The problem with python, is that there is plethora of frameworks, but not one is close to perfect. So, sometimes you don't know what too choose.

While with Ruby, you are stuck with one main framework (well, there are few less popular ones), which creates more synergy and knowledge towards that framework/way of web developing, but limits choice.

[+] xirium|18 years ago|reply
This is from a minimal install of FreeBSD 6.2-RELEASE:

> ruby ruby: Command not found. > python Python 2.4.3 (#2, Aug 11 2007, 18:44:16) [GCC 3.4.6 [FreeBSD] 20060305] on freebsd6 Type "help", "copyright", "credits" or "license" for more information. >>>

[+] inklesspen|18 years ago|reply
I run several Python webapps, and I wouldn't bother with mod_python or mod_wsgi. They're bad ideas (I can go into more detail on why if anyone cares).

Instead, I proxy from my front-end server to a standalone Mongrel-like webserver that speaks WSGI. paste.httpserver and cherrypy's wsgi server are the frontrunners for this purpose. Pylons is threadsafe, and paste.httpserver is rock solid, so I'm very happy with just a single paste.httpserver instance, but I can scale easily by adding more instances if need be.