Is the Middle-Tier Endangered?

Via Udi and Tiago, I found an article on DevX called “Kiss the Middle-tier Goodbye with SQL Server Yukon“. While that article should have been titled “XML Technologies in SQL Server Yukon”, both Udi and Tiago have interesting posts about SQL Server as a platform and the role of the database going forward. Personally, I see two primary forces at work that I believe will drive the middle tier into extinction: Moore’s Law and Service-Orientation.

Why do we distribute applications across multiple systems today? Is it because we like managing multiple systems? No! It’s for scalability. We exploit the fact that tiers of a multi-tier app have different processing loads and scalability methods. Typically, we scale the web/app tier by throwing more servers at the farm while we scale the data tier with bigger servers. However, as Moore’s law increases the performance of these machines, the need to scale becomes reduced, From my experience, many smaller apps could easily run a single machine today (esp. when you consider the increased efficiency of eliminating the network and process hops). Moore’s law will continue increase the headroom these machines provide and expand the definition of “smaller apps”. If you can run the app on a single hardware node, there’d be little reason not to run as much of it as you can inside the database, other than “we might want to scale this out someday”.

Of course, it will be a long long time before Moore’s law can provide a single machine to run a BIG enterprise app (think something like SAP). This is where service-orientation comes in. While some people see services as a way to interoperate BIG apps, I think the future of services is to free us from building BIG apps, or at least from build BIG apps as monoliths. If you figure a BIG app like SAP has hundreds or thousands of business process or resource management operations, you could build that system where each operation is implemented as an independent service. The benefit of this approach is that it is orders of magnitude more flexible in the face of process change than the BIG app approach. If you haven’t seen it, check out the Technology Roadmap session from the Architecture Strategy Series. One of the points that the presenter Norm Judah makes is that “it is the business processes in an organization that are unstable, but the individual things that people do…are the things that are stable.” (He says that during Slide 9 – “Why Do Architecture Projects Re-Occur?”) If you accept that, then having your business processes hard coded in a BIG inflexible app starts to look like a bad idea. These “individual things that people do” (such as sending out invoices) get mapped to services and are aggregated into business processes by some tool we haven’t seen yet (though I think BTS 2004 is a good start).

If service-orientation shreds your BIG app into many pieces, it is highly likely that those pieces will be small enough to run on a single hardware node. In addition, as services communicate with asynchronous messages, they tend to have lower scalability needs than synchronous systems. And since these services all need a database (Pat refers to the database as the soul of the service) it makes sense to run the service inside the database itself. It even makes sense to build a both an application and a messaging infrastructure directly into the database engine. SQL Yukon provides the application infrastructure by hosting the .NET framework and provides the messaging infrastructure with the SQL Service Broker.

However, we need more than faster computers and service-oriented systems to eliminate the middle tier. We also need better management. And not incrementally better, orders of magnitudes better. If you’re going to replace a single BIG app with hundreds of independent services, incremental manageability improvements are not going to cut it. Because we realize this too, Microsoft is investing heavily in the Dynamic System Initiative. If you’re a developer, you’ve probably seen the Whitehorse designers coming with Whidbey. That’s just part of DSI. We’ve got a great architectural overview of DSI as part of our Architecture Strategy Series or you can read more on the DSI homepage.

Do you think the middle-tier will become extinct? If it does, is that a good thing? Obviously, it’s an unknown and a big change, which makes it hard to gauge. But what does your gut tell you?

Da Vinci Code

Like the rest of the known universe, I recently read The Da Vinci Code by Dan Brown. I had read Angels & Demons on a plane trip back from Alaska when my laptop battery had died. A&D was good, esp. considering the low bar of killing several hours flying back from Anchorage. I tried to read Digital Fortress but just couldn’t stand it. I liked the crypto part of it, but the characters were blown so out of proportion that I just could never get into it. Also, who starts a thriller with that much backstory? So I approached Da Vinci Code with some trepidation, but also hope.

Of course, it hooked me instantly and before I knew it I was 100 pages in. This was much much better than Fortress or A&D. In addition to the great plot and characters, this book does an amazing job of obfuscating the line between reality and fiction. While I don’t believe the events actually occurred or that Robert Langdon exists, the background history of Da Vinci, the Holy Grail, Christianity and the incorporation of pagan traditions was fascinating. Given the success of Passion of the Christ – by all accounts a hyper-literal interpretation of the Bible – I think it’s interesting that the equally-successful Da Vinci Code essentially refutes that the Bible is THE word of God. Of course, the Da Vinci Code is a novel so I’m not really sure where the facts ends and the fiction begins. I haven’t read a book that blurred that line so well since Jurassic Park.

Unfortunately, while Dan Brown may be a brilliant researcher and steadily improving as a writer, it all comes apart in the end. The true identity of the Da Vinci Code’s primary nemesis left me (and subsequently my wife) very disappointed. I kept wondering how he was going to pull it all together in the end. For all the finely detailed logic and history of this story, it felt to me as if the author essentially picked the least likely character to be the bad guy for the sole purpose of minimizing the chances the reader would guess it. It’s fine to be surprised at the end, but it’s got to make some sense. What’s the point of building to a climax only to pull it out of your ass when you get there?

It’s all a Platform

I used to say that everything we build should be a platform except for games. What’s interesting is that games are becoming platforms in their own right. Dungeon Siege has the freely downloadable Siege Editor which allows you to “rework nearly every aspect of the gaming world, making Dungeon Siege not only a game, but also a platform for those who wish to create their own spells, dungeons, and even entire worlds.” There are several projects that do just that. And Dungeon Siege II is coming later this year, which looks amazing (all trailer graphics were rendered with the game engine). If RTS is more your speed, Relic – developers of Impossible Creatures – has their developer network which provides both a companion tool for enhancing Impossible Creatures as well as the Impossible Creatures SDK “which includes source code from the IC engine that can be used to create Total Conversion Mods for IC” (Relic Developer Network requires registration). Of course, there’s also the Allegiance source code which was released a few months ago.

I guess the new viewpoint is that everything we build should be a platform, including games.

Off-the-Wall Movie Sites

Thanks to Werner for linking to the Flick Filosopher. I liked the analysis of The Passion of the Christ and the comparison Monty Python’s Life of Brian. I especially liked her Best & Worst Of 2003 article as well. An you have got to respect anyone who has “The Adventures of Buckaroo Banzai: Across the Eighth Dimension” at the top of their list of 100 comfort movies. Only downer – no RSS feed. <sigh>

The other movie review site I read regularly is Mr. Cranky. I’m a big fan of his unique comments on bad movies such as ” I have never come closer to tearing my own penis off and throwing it at the screen while watching a movie” (Laura Croft 2) “Chris Klein is like Keanu Reeves without any talent…Frankly, I have a hard time even comprehending that sentence and its terrible implications.” (Rollerball) and “This film caused the kind of pain I’d normally associate with being shot through the thigh by a rusty nail from a high-powered nail gun” (Saving Silverman). Again, no RSS feed. <double sigh>

Bob is *now* available

I subscribed to the brand-new MSDN Subscriber Downloads RSS feed so I could stay up to date on the cutting edge technologies being shipped to the MSDN subscribers. So imagine my surprise when I see the following:

Microsoft Bob 1.0a was posted to MSDN Subscriber Downloads on March 31, 2004.