Hmm, I'm not sure if $3k is all you'll ever need for Java hardware. If the application is big enough you're likely to have keep on spending on vertical scaling. But then again, that's what big enterprises like to do: spend money on big boxes.
Which leads me to point that out that Java is far from suitable for a start-up. I'm beginning to think that Python plus C/C++ might be the golden bullet for startups. Ruby's C integration is easier than Python, but there's something to be said about the overall language model and performance. I tend to have a main RoR app for the website and a few Python daemons in the background for the really heavy stuff, and now it's finally the time to think about offloading some of that load even further closer to the machine, in C/C++.
I'd really love to come up with a standardized way of deploying small, context-specific RESTful API servers in either C or C++. I'm starting to think that a possible C++/Python bridge via Thrift is likely the best option. But then again, if I just managed to keep it all in a C++ application without needing to run the Python interpreter, it could totally rock (for an application that is supposed to serve 100k+ users on cheap hardware).
It's cool to see cloud computing going mainstream and now applications written in any language can be reasonably fast with the help of EC2, a load balancer and memcached. But I still think there's great value to coming up with truly lightweight solutions that really use nearly all computing power a single node can possibly offer.
"Which leads me to point that out that Java is far from suitable for a start-up"
You can't generalize like that. It's a language. It works. It scales, and is solid.
Sure, if you're just putting up something that needs quick prototyping then java is probably overkill, but if you're writing something quite complex, java can do a great job.
I think the "golden bullet" for startups is having a good programmer with a passion for something. Language isn't so relevant IMHO.
(Mibbit currently handles around 3.5million visits a month on a single VPS in java which I'm pretty happy with).
What do you use for your templating engine? We are use struts2 as our framework and found that OGNL and struts2 tags are two orders of magnitude slower than straight JSP.
I'm thinking of ditching JSP and have PHP talking to our Java services via Thrift.
3.5 million visits is small in current internet terms. And now having a look, it is a small text message system. No media, no video, not many images. Sorry, but it's not a good example at all.
At peak it handles 500+ lines of chat a second. That's quite a bit more than twitter. It also has around twice the number of peak users than Meebo rooms. So although it's certainly not a massive site, it has taken some thought to scale.
Having big images/videos wouldn't really make any difference to which language you choose. That's just static media files which are irrelevant.
I really don't see how having more images on the page would make it harder to scale :/ if only the site were as simple as serving up some images...
Where is your site that receives 3.5M visits per month? It doesn't matter what language or platform you use. Handling 3.5M visits takes some thought. In fact, where can we find anything to support your language-bashing in your last few posts? I see you knocking down other people's suggestions without putting forth anything of substance yourself.
First, please take a deep breathe. This is a technical discussion and it doesn't necessarily need to have "a winner."
Second, please look my other posts 4 and 6 minutes before this one you just did.
On a C++ thread some people above say the thread creator should use Java. I refuted that argument with my opinion and reasoning. It is not bashing:
bash:
- To engage in harsh, accusatory, threatening criticism.
-ing When you deliberately attack a person using offensive and/or inappropriate language.
See on top of this page:
"Suppose I wanted to write a C++ based web application... [...] But what if I just wanted to write plain C++?"
Can't Java people play along? Can't you guys even play pretend? There are very good comments in this thread (both pro and con.) And if you think C++ Web Applications are a bad idea, fine, say so and state your case. There was no need to bring up Java. Of course you are free to do so. But that allows others (moi) to counter-argue with you.
For the record, I am a C++ person, not a Java person. C++ is far and away my strongest language. Nevertheless, I believe that for general web app development, if you want something in the C++ family of languages, Java is more appropriate. At my startup we use a handful of languages for different tasks, C++ and Java among them.
I don't think anyone would have really jumped on the memory comment originally, but what made the thread asbestos-o-riffic however was the assertion that Java is inappropriate for a startup, which is, well, just plain silly.
This really doesn't make a lot sense. Java is also easy to bind to C / C++ and its performance is better than Ruby or Python. The logic behind that seems to be ... that scaling in memory usage is important but not CPU usage? I'm not really a Java apologist, but it just seems another one of those languages that people bash because it's cool to bash.
In sensible hands, you can exchange Java for C++ and get very similar performance for a lot less hassle, and (increasingly) lean on scripting the same way you would with python/ruby. Of course that means ignoring the way "enterprises" mostly use java (which is just silly), and using it more the way google does.
Please note I mentioned memory. Java is OK on bare language algorithm implementation speed, but if you have a look at all the benchmarks in the language shootout its memory needs are up to 108 times better. A conservative consideration would be 10 times better in the average algorithm.
That is compounded with the typical architecture of Java frameworks. Also finding issues sometimes feels like occult magic on modern JVMs. And then, running with compatibility issues on JVM versions and all that.
Java failed in the browser and now it will probably have a crash at the server. There is no more budget for multimillion dollar datacentres everywhere. But thanks for all the jobs! :)
Why do you seem to think that java requires more servers?
It's a language.
Maybe specific crappy jsp frameworks require more servers, but that's not java.
It's no proof, but real life shows something even worse than that against Java. For example the one thread per connection model everywhere or the XML web services throwing away objects faster than the GC can handle.
>For example the one thread per connection model everywhere or the XML web services throwing away objects
Hence my statement:
> ignoring the way "enterprises" mostly use java (which is just silly)
Of course the thread per connection model is long gone (at least what I have heard, but software tends to not die) and the XML beast is dying... but that it more how people abuse it.
but if its memory you want, you can't do better then using the OS to its full power via C/C++, which is what you are doing when you are using C/C++. Using anything that is a full VM (like jvm, or if you think that is opaque - give erlang a try !) then you kind of tell the OS to "go away" and the VM becomes an OS etc...