Live data from Hacker News

Web Applications Should Be Compiled

ediblepet.net

141–150 of 177 posts

Re: Web Applications Should Be Compiled

#141
post #16

It's a valid point. I wrote the Mibbit backend from scratch in Java for these reasons. I can only start to imagine the horror I would be enduring if I'd chosen a scripting language. Having said that, choose the right tool for the job. edit: Downmod me all you like. A scripted language wouldn't handle 2k req/sec on a couple of VPSs.

I think Mibbit, much like twitter, is one of those apps that is a non-traditional webapp. While its a web based frontend the traffic and distribution of chat messages is a much different beast then what most webapps do. Java is very likely a much better choice for these reasons.

But what if traditional webapps are on the way out?

Re: Web Applications Should Be Compiled

#142

Earlier quoted context omitted.

I think Mibbit, much like twitter, is one of those apps that is a non-traditional webapp. While its a web based frontend the traffic and distribution of chat messages is a much different beast then what most webapps do. Java is very likely a much better choice for these reasons.

Twitter runs under serious load using "scripting languages". The issue is runtime, not language.

Scala is not a scripting language.

Re: Web Applications Should Be Compiled

#143
post #72

Isn't that's what CGI is for? If you want a full blown web application framework in C is going to be a lot of work. String manipulation, parsing HTML with standard C libraries is not going to be easy. Java, C# and Python have pretty decent frameworks to do this I don't see the point of writing one using C.

CGI is an interface, not a library or a language.

Re: Web Applications Should Be Compiled

#144
post #94

Earlier quoted context omitted.

Your comment adds less to an intelligent discussion than does the article you're calling a troll. First, this isn't a troll. The guy posted a blog post on his own blog. He didn't post off-topic content to a thread and didn't try to provoke an argument in an otherwise civil conversation. The only possible way that you can characterize this as a troll is that he uses some crude language, and says some things that are u…

"Your comment adds less to an intelligent discussion than does the article you're calling a troll." Sometimes the truth is very simple. It can be considered a troll because it is in the tone "if you don't do as I say you are an idiot, like everyone else". Second: not all scripting languages are interpreted on the fly. In fact, many of the most popular frameworks load objects once and keep their compiled forms in memo…

This is worth repeating: only small part of request lifetime is spent in application code so you should worry about performance of the programming language only if you profiled your app and saw, that this is indeed a bottleneck.

Re: Web Applications Should Be Compiled

#145

Sweet merciful lord. Is this guy channelling Zed Shaw or what? Apart from all the hand-waving and generalizations, this guy doesn't sound like he's ever really a webapp under serious load. I'm not a Ruby guy, so I don't know how things fly with that, but I've never once had a problem with a webapp being slow because of the language it was written in. Bad database queries, unnecessary assets being loaded, definitely.…

Yeah I would like to second this... I'm no expert on web apps or frameworks, but I've heard enough that they're generally more I/O bound instead of CPU bound.

Now if he were to propose writing JUST a web application in C that has a custom HTTP server designed from sockets up to HMTL... you can streamline the sh*t out of that.

Much luck to him. Success or failure, he'll still probably be learning...

Re: Web Applications Should Be Compiled

#146
post #29

The reason why people choose to go with languages like Ruby is because the trade-off on speed is worth it. Web front-ends scale very easily. You can just add more web heads and load balance between them. Databases are much harder to scale since you need to keep data consistency and can't just throw more boxes at the problem. So, you don't need to be computationally efficient. However, you do need to develop fast. You…

I think your point is exacerbated by the fact that it's hard to get web UIs "right". I was critical of languages like python and ruby until I had to do the frontend for some company code. Box looks like it needs to be shifted a few pixels right? Modify code, compile, check. Logo looks better with an offset? Modify code, compile, check. Writing in a scripting language makes it just Modify, check. You just can't do tha…

I've done a lot of webapp development in both Java and Rails. I would agree that the iteration cycle is shorter in Rails, but it's not as bad as your description makes it sound. If you have to redeploy a jar file as part of your development process, then that's a problem with your process, not your language.

When I do Java webapp development in Eclipse, it compiles and hot-swaps my code in the background without requiring any restart or redeployments. Works pretty well.

I do have to restart occasionally because the hot-swapping has limitations, so that does slow things down a bit, but when you consider the time saved by having good compiler integration, then I don't think there's a big difference in productivity.

Re: Web Applications Should Be Compiled

#147
post #77
post #75

Earlier quoted context omitted.

Would you not agree that the web is becoming more "real time". People demand webapps to update as they view them - ajax,comet,getNextBuzzword(). Those demands place a higher load on servers, especially when you scale to large number of users.

For sure, but 99% of apps never scale to "large numbers of users". And when they do, they usually have the time to figure out how to do so without downtime. Often, that may involve rewriting part or all of the backend in a lower level language. If that's needed, so be it - but to do it before you have any performance problems is just premature optimisation.

Judging by the number of blog posts, articles and books about scaling this or that Ruby/Python/PHP framework, people seem to be very busy with "premature" optimisation right from the start, exactly _because_ those frameworks and languages are so horribly inefficient.

Why would I want to run and manage and design for a server cluster just because each and every Rails process needs to load the entire language runtime, the framework and all the libraries using 100MB of RAM for no application functionality at all? Not doing all that work is premature optimisation?

Re: Web Applications Should Be Compiled

#148
post #141

Earlier quoted context omitted.

I think Mibbit, much like twitter, is one of those apps that is a non-traditional webapp. While its a web based frontend the traffic and distribution of chat messages is a much different beast then what most webapps do. Java is very likely a much better choice for these reasons.

But what if traditional webapps are on the way out?

Actually after I wrote that post, that's something I've been tossing around. So many of the current crop of web superstars, like facebook, twitter, friendfeed etc. are built around streams of data as opposed to serving more traditional static(ish) pages.

Perhaps a new type of web framework is needed to address these breeds of apps.

Re: Web Applications Should Be Compiled

#149
post #81

Earlier quoted context omitted.

I find it easy. The bad thing about c++ is its size. It's large and that tends to make it complex. However, I find that I only use about 40 to 60 percent of what c++ can actually do. Focus on the parts that you use and you'll find a lot of the complexity goes away.

One problem is that if you work with other people in c++, the 40 to 60 percent they use won't necessarily overlap with yours.

If you work with other people, the odds of their C++ code being utterly broken, inefficient and dangerous is 99% ;-)

Re: Web Applications Should Be Compiled

#150
post #142

Earlier quoted context omitted.

Twitter runs under serious load using "scripting languages". The issue is runtime, not language.

Scala is not a scripting language.

"Scripting language" is a stupid term, but it's the term the article used.
Post reply on HN