honking great app servers

update 2007/02/02: History teaches us …I really want to witness a R0ml keynote someday...

Rod Johnson: "The differences that mean that you can run a huge deployment on WebLogic easier than on Tomcat are nothing to do with the Java EE specifications, but to do with QoS and manageability. For the vast majority of users, for example, WebLogic is not superior because of EJB (which they don't want) or JCA or a host of other largely irrelevant Java EE specifications. It's all about stuff beyond the specs that comes from the demands of the BEA customer base"

That would be something of an open secret. Here's Steve Vinoski saying something similar about web services technology:

"The customers that I saw benefit from WS-related technology gained those benefits only because of IONA-specific innovations that were not part of WS-*. In general, WS-* didn’t do anything for them that wasn’t already possible with prior technologies."

I have two other takes on this. First let me say this - the JEE stuff and the container vendors that drive it are tied (still, but maybe less than a few years ago) to a physical three-tier model, whereas physical two-tier is a known good way way to build web systems. I'm assuming you're building web systems because Tomcat and its ilk are in the frame as app server alternates. If not, my apologies, your problem space might well warrant physical 3-tier, and you can stop reading here.

Take 1. You don't need a honking great app server.  Spring+Hibernate is more than enough for most "enterprise" needs. In other words, all the shiny buzzword compliant stuff you wanted but could only get via a honking great app server, you can now get in smaller form thanks to people like Jurgen Hoeller and Gaven King. Rod Johnson then is being far too modest by ascribing the rise of Tomcat to just Tomcat. After buying into light-j2ee, half the battle in the Java space is trying to get your Servlets Session usage as close to zero as possible :)

Incidently, I recall Werner Vogels making a complaint once in a podcat that one of the problems with vendor middleware was too it was too big, and he would like smaller components to deploy, but I don't have a link (it might have been itconversations).

Take 2. You don't want a honking great app server. Ever. Ryan Tomayko explains why:

"Many large enterprise web applications tried really hard to implement a Physical Three Tier Architecture, or they did in the beginning. The idea is that you have a physical presentation tier (usually JSP, ASP, or some other *SP) that talks to a physical app tier via some form of remote method invocation (usually EJB/RMI, CORBA, DCOM) that talks to a physical database tier (usually Oracle, DB2, MS-SQL Server). The proposed benefits of this approach is that you can scale out (i.e. add more boxes) to any of the physical tiers as needed.

Great, right? Well, no. It turns out this is a horrible, horrible, horrible way of building large applications and no one has ever actually implemented it successful. If anyone has implemented it successfully, they immediately shat their pants when they realized how much surface area and moving parts they would then be keeping an eye on.

The main problem with this architecture is the physical app box in the middle. We call it the remote object circle of hell. This is where the tool vendors solve all kinds of interesting what if type problems using extremely sophisticated techniques, which introduce one thousand actual real world problems, which the tool vendors happily solve, which introduces one thousand more real problems, ad infinitum...

It's hard to develop, deploy, test, maintain, evolve; it eats souls, kills kittens, and hates freedom and democracy.

Over the past two years, every enterprise developer on the planet has been scurrying to move away from this architecture. This can be witnessed most clearly in the Java community by observing the absolute failure of EJB and the rise of lightweight frameworks like Hibernate, Spring, Webwork, Struts, etc. This has been a bottom up movement by pissed off developers in retaliation to the crap that was pushed on them by the sophisticated tool vendors in the early century."

The  Tomcat-is-your-app-server approach is a physical two-tier one, and maps cosely to the LAMP model that drives large chunks of the web.  Again, this is no secret, Physical two tier as a good model for web based goes back a decade at least. Here's Phil Greenspun on "Scalability, Three-Tiered Architectures, and Application Servers", which dates back to 1998 at least (ie pre web-1.0, pre the LAMP acronym):

" The Web is fairly young. However, that is not a reason to abandon sound engineering principles. You don't want a complicated untested system sitting between your users and your database. You don't want to be forced into developing dynamic documents with a language requiring compilation.

Maybe you're having second thoughts at this point. You're going to be doing lots of transactions. Your idea is so brilliant that you're going to have half the world using your site. Maybe a simple Web service layer on top of a proven RDBMS is good enough for Greenspun and his pathetic 500,000 hit per day personal site, but you're building something serious here.

Two words of advice: "America Online".

As of this writing (July 1998), AOL has 11 million members. They have a bunch of Unix machines running a replicated Sybase. They interface this replicated Sybase to the Web via a very simple stateless program: AOLserver."

What happened to Greenspun's company is instructive. Senior execs came along, and drove a rewrite in Java to follow a 3-tier model. The company failed soon after. This is not meant to be Java sucks post tho', it's more about choosing an appropriate software design.

Tags:

    tags:

6 Comments


    Of course it's entirely possible to go two-tier _with_ EJB, co-locating the servlets and EJBs on one box (or cluster). In fact, this is the architecture most of our projects used to follow. The main reason was support for declarative transactions and a portable, if bad, persistence layer (entity beans).

    (Don't get me wrong, I don't advocate this model anymore. Still, it had its uses, and I've seen many successful EJB projects -- to say it was an absolute failure, as Ryan does, doesn't do it justice IMO. )


    Most of what BEA has been doing was to find ways to modularize and cut down the container with OSGI. And the newer real-time products are not "honking app servers", they're focused on using Spring as the container....

    The point Rod's trying to make, I think, is that you can run Spring + Hibernate on WebLogic Express (it's pretty affordable) and you'll arguably be more maintainable, reliable, and high performance than on Tomcat. It's hard to prove, as all applications are different. But overall, closed source software is not always crap. There's a lot of hard-won experience in the WebLogic code base that's hard to replicate. WebLogic's extensive mbean and Jython scripting capabilities come to mind. Or the security framework (which is rather cool if you haven't looked at it).

    This is sort of like the same argument with MySQL or PostgreSQL vs. Oracle. Will they make overtake it in quality? For many websites, they generally are good enough, but as a formal Oracle DBA I still think they have a long road ahead. I have no doubt they'll get there, though. It's just a matter of Oracle keeping pace with their own improvements.


    Stu,

    "Most of what BEA has been doing was to find ways to modularize and cut down the container with OSGI"

    Glad to hear it.

    "closed source software is not always crap"

    I was talking about appropriate designs for database backed web sites, not closed source software being good or bad.

    "this is sort of like the same argument with MySQL or PostgreSQL vs. Oracle. Will they make overtake it in quality? For many websites, they generally are good enough, but as a formal Oracle DBA I still think they have a long road ahead."

    They do if you think one database and a scale up model is what is needed. See Joe's recent N=1 theme for ideas on that. I've seen a RAC install that holds high hundreds of millions of items; it's quite something - it needs to be given there's only one of it, with a lot of data in tow. But again, the issue isn't quality (or crap), it's technical design - why use one database and force a scale-up strategy?


    Stefan,

    "Of course it's entirely possible to go two-tier _with_ EJB, co-locating the servlets and EJBs on one box (or cluster). In fact, this is the architecture most of our projects used to follow. "

    Right; that would be Fowler's first rule of distributed systems. But this is like saying there are successful WS-* installations that use doc-lit. It's revisionist (EJBs are for distribution) and working against the grain of the specification (EJBs are for location transparency).


    Further support of the 2-tier model is offered by r0ml at http://r0ml.net/blog/2007/09/08/histo...


    Joel: thanks!


Post a comment

Your name:

Comment: