Live data from Hacker News

Web Applications Should Be Compiled

ediblepet.net

81–90 of 177 posts

Re: Web Applications Should Be Compiled

#81
post #79

Earlier quoted context omitted.

I don't think it's a troll, but just someone who is really in to performance, like I do, and I agree with him on some points. But what I don't agree is using just C. C is too low level and is a horrific unfit task for web development. Instead C++ would be a good fit (and writing in C mixed in). The STL/Boost provide a wonderful abstraction layer that does pretty much anything you throw at it with ease, plus there are…

I've been hacking C++ long enough to agree C++/STL/Boost is good and fast... but I can't remember the last time I heard anyone accuse C++ of being easy ...

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.

Re: Web Applications Should Be Compiled

#82
post #80

I will live to be a happy old man if I never read another blog post telling me in absolute terms what I must do and why I'm an idiot if I don't. I blame Joel Spolsky for this, his tone and style seems to have kicked off an entire sub-culture of blogging where the posts read like a lunatic standing on a street corner demanding that we repent before the end of the world and the coming of the messiah. Bloggers, please t…

I agree, but TBH there have been a lot of ridiculously overhyped blog posts/articles telling us how totally awesome every scripting language is, and how it's completely a 'game changer' and how you can do completely revolutionary things in them really easily. I guess this is just a reaction to the froth+hype. Both sides need to step away from the keyboard, and calm down.

If a blog post says "wonderful, amazing, fun, life-affirming," we can always respond with "oh? what about..." My thought is that there's no need for a post saying "You're gonna die if you try to build a social bookmarking site in Lisp" regardless of how much fun other people are having doing it.

What have people got against enthusiasm, any ways? There's some kind of weird puritanical thing going around programming culture that seems to view youthful exuberance as some kind of a sin, like wearing buttons on a frock coat. Yeah, some twenty-somthing year-old has discovered something way-cool really neat amazing thing while hacking on a macbook in the café. Isn't that exactly the attitude you're supposed to have in your twenties? How would anything ever change if people didn't get super-excited beyond all rational limit?

Can you imagine Wozniak and Jobs trying to blog about microcomputers these days? They'd get flamed as hippies fiddling with toys :-)

Re: Web Applications Should Be Compiled

#83
post #81
post #79

Earlier quoted context omitted.

I've been hacking C++ long enough to agree C++/STL/Boost is good and fast... but I can't remember the last time I heard anyone accuse C++ of being easy ...

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.

Re: Web Applications Should Be Compiled

#84

I will live to be a happy old man if I never read another blog post telling me in absolute terms what I must do and why I'm an idiot if I don't. I blame Joel Spolsky for this, his tone and style seems to have kicked off an entire sub-culture of blogging where the posts read like a lunatic standing on a street corner demanding that we repent before the end of the world and the coming of the messiah. Bloggers, please t…

> I will live to be a happy old man if I never read another blog post ...

I wish all I had to do to be happy for the rest of my life was to never use a computer again.

Re: Web Applications Should Be Compiled

#86
post #57

If you must write web apps in C then consider writing it as an Apache module. But how much traffic would you need to justify this? Web app developers have an unhealthy obsession with performance and scalability that distracts them from building what really matters: features. Twitter proved you can be just as successful if you work on features now and scalability later.

"Twitter proved you can be just as successful if you work on a feature now and scalability later"

fixed that for you ;)

Re: Web Applications Should Be Compiled

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

>> "99% of apps never scale to "large numbers of users". "

Maybe because they don't get past the scaling issues ;)

Re: Web Applications Should Be Compiled

#88
post #7

In web the model is different: You develop an app, push it live and find out what works and what does not, change and iterate. This means that doing the iterations with minimum time and effort are important than worrying about scalability and performance. You can always throw hardware at the perfortmace problem. If you get enough traffic to become worried about performace, that itself is the mark of success. But to b…

You can always throw hardware at the performance problem. No, you can't. That's what scalability means . If you don't have scalability, then additional hardware will only take you so far before you begin wasting it.

Many dynamic-languages frameworks (notably PHP) are more scalable than writing a custom webapp in C. This is because C encourages you to store state in memory on the server, because it's really easy when everything is a single long-lived process. Good for performance, terrible for scalability.

PHP (and Rails/Django, if you ignore their ORMs) encourage you to store state on some collection of backend servers and communicate via RPC to retrieve that. This is bad for performance, but good for scalability. The front-end is just a dumb intermediary that converts data into HTML, so if you need to scale, just add more of them. Scaling the backend is more challenging, but at least you can do it without dragging all the front-end code around.

Re: Web Applications Should Be Compiled

#89
post #17

Web site performance problems usually don't have much to do with the raw executing speed of the language they're written in. The problems derive from poor understanding of how to handle concurrent connections. If your app is written in C, but is accessed through a CGI interface - starting a process for each request - then it's going to be slow. Similarly if you write a web server which makes blocking connections to a…

And then there's situations like porting a Rails app to Lift and seeing a huge improvement in performance without touching the database / storage IO: http://lambda-the-ultimate.org/node/2147

Granted, it's not from the most unbiased source, so take it with a grain ;)

Re: Web Applications Should Be Compiled

#90
post #14

Most sites aren't CPU or memory intensive. If you are lucky enough to have enough users for that to be a concern you can add more servers. Sites normally bottle neck around the database and writing front end code in C is distraction from fixing the real problem which should be scaling the database.

Why not use clearsilver(http://www.clearsilver.net/) to wrote frontend code? They do have a few large projects using clearsilver.
Post reply on HN