

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

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)?<p>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.<p>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?<p>Thanks for any help.
======
nickb
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.

~~~
chaostheory
man no wonder you have time to submit 10,000 articles a day hehe

~~~
nickb
10K? Heh... not even close. It's all about quality and not quantity :)

------
robmnl
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
why not django or turbogears?

~~~
ardit33
ditto cherrypy, django's api is just not elegant. Tries to do everything for
you, but not exactly like you want to. It is fine for some kind of apps (the
auto autoadmin feature is nice for small or mid apps), but for large apps i'd
say start with something that you have total control on what's going on with
no magic. While for small apps, Django might be an overkill. And turbogears,
is just... how to say, too much. Pylons is alright thou.

------
thingsilearned
Here's a recipe for deploying django on ubuntu.

[http://www.jeffbaier.com/2007/07/26/installing-django-on-
an-...](http://www.jeffbaier.com/2007/07/26/installing-django-on-an-ubuntu-
linux-server/)

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

~~~
thingsilearned
lol

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

