4 ms·
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
by axod 17y ago
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.
- jerryji 17y agoBut as your web application database grows more complex and larger, how do you intend to make them keep up with the 2k req/sec load?
- axod 17y agoWhy would anything need to go to db? :/ Going to db should always be a last, final resort. People often seem to think a db is the only way to write any webapp, and that everything must depend on the db. That's bad architecture. In the case of Mibbit, db access is only done for writes, lazily, in the background. The bottlenecks for me, are CPU, network, and ram. And yes, you can throw servers at it, if you're frivolous and don't intend to make any money. I decided to go the other way and be profitable ;)
- kingkongrevenge 17y agoThe vast majority of web applications are straight-up CRUD. Not making that all about a normalized schema is the stupid mistake. As far as relational DBs being the problem, that's more a matter of the free ones not cutting the mustard. Oracle and DB2 can handle jaw dropping load in the hands of an expert.
- kingkongrevenge 17y agoCurious if you considered using something like csql or gigabase for a main memory DB? Sounds like you wrote some custom in memory db yourself.
- swombat 17y agoIt's a valid point for Mibbit, but Mibbit is not your average web app. For the average web app, it's a lousy point, really (and, as pointed out by others, it's a troll/satire). The fact that you take it seriously is a little worrying tbh. Are you feeling ok? :-)
- axod 17y agoWould 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.
- swombat 17y agoFor 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.
- axod 17y ago>> "99% of apps never scale to "large numbers of users". " Maybe because they don't get past the scaling issues ;)
- fauigerzigerk 17y agoJudging 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?
- mikeryan 17y agoI 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.
- tptacek 17y agoTwitter runs under serious load using "scripting languages". The issue is runtime, not language.
- Tichy 17y agoBut what if traditional webapps are on the way out?
- mikeryan 17y agoActually 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.