Live data from Hacker News

Ask HN: Building a large webapp today - what language for the backend, and why?

news.ycombinator.com

11–20 of 64 posts

Re: Ask HN: Building a large webapp today - what language for the backend, and why?

#11

Just to put this out there -- since nobody has really mentioned it -- ruby (as a language) doesn't have the greatest performance. You can do some tricks with GC to speed it up (Ruby EE might be a faster option), but you're still looking at 50x slower than C (python is 40x, Java 7 is around 2x, Javascript on V8 -- Node-- is 4x). So if you're planning on doing a lot on the backend, you might want to consider breaking o…

I agree that ruby is slow, and I actually recommended Java, but ruby execution is not going to be the bottleneck for a webapp, the database is.

Re: Ask HN: Building a large webapp today - what language for the backend, and why?

#12
Rails is nice, but it's really really slow. At my job we use Jetty as the server with Play or Lift as the framework -- I think most of the devs like Play better, though. Really easy to run as an unprivileged user and do backends through nginx as well.

Re: Ask HN: Building a large webapp today - what language for the backend, and why?

#15

Just to put this out there -- since nobody has really mentioned it -- ruby (as a language) doesn't have the greatest performance. You can do some tricks with GC to speed it up (Ruby EE might be a faster option), but you're still looking at 50x slower than C (python is 40x, Java 7 is around 2x, Javascript on V8 -- Node-- is 4x). So if you're planning on doing a lot on the backend, you might want to consider breaking o…

Do you have any sources for these performance comparisons? It would be great to see actual speed benchmarks for these different languages.

Re: Ask HN: Building a large webapp today - what language for the backend, and why?

#17
Python (Tornado or Twisted) + Riak.

Why? You can scale very easily, write code in a higher level language that has lots and lots of libraries, have map reduce out of the box, but you don't need to really worry about your DB dying on you.

Here is what you do need to worry about in this set up: Eventual consistency. But I would argue that any web app at scale needs to worry about it. So if you are coming from a company that already has lots of users and you are writing a new app that will be in the hands of lots of people very quickly, go with Riak + Tornado/Twisted. You'll probably want to set R = 1 or 2 and pay special attention to conflict resolution.

Re: Ask HN: Building a large webapp today - what language for the backend, and why?

#19
post #11

Just to put this out there -- since nobody has really mentioned it -- ruby (as a language) doesn't have the greatest performance. You can do some tricks with GC to speed it up (Ruby EE might be a faster option), but you're still looking at 50x slower than C (python is 40x, Java 7 is around 2x, Javascript on V8 -- Node-- is 4x). So if you're planning on doing a lot on the backend, you might want to consider breaking o…

I agree that ruby is slow, and I actually recommended Java, but ruby execution is not going to be the bottleneck for a webapp, the database is.

On the other hand, if you put your DB on SSDs, back to square one.

Re: Ask HN: Building a large webapp today - what language for the backend, and why?

#20
post #11

Just to put this out there -- since nobody has really mentioned it -- ruby (as a language) doesn't have the greatest performance. You can do some tricks with GC to speed it up (Ruby EE might be a faster option), but you're still looking at 50x slower than C (python is 40x, Java 7 is around 2x, Javascript on V8 -- Node-- is 4x). So if you're planning on doing a lot on the backend, you might want to consider breaking o…

I agree that ruby is slow, and I actually recommended Java, but ruby execution is not going to be the bottleneck for a webapp, the database is.

I disagree that the slow part of a RoR app is the database - from my anecdotal experience, the slowest part is rendering views and the string manipulation there-in, probalby caused by GC. For a Rails 2.3 App with REE and MySQL, time is ~25% GC, ~25% DB and 50% ruby (from NewRelic).

However, premature optimization and all that, don't choose Java because its faster than Ruby in some arbitrary benchmark. Choose Ruby because it makes you happy and you can meet business objectives faster and easier with it.

Post reply on HN