The Endangered Middle-Tier, Part 2

Among the responses to my endangered middle-tier post was this one by Ed Draper, architect evangelist for MSFT. While Ed makes some interesting points, on the whole his argument doesn’t hold much water.

First off, his point about Moore’s law is accurate, yet irrelevant. While Moore’s law does relate to CPU speed, I was using it as an example of the rate that overall computing power improves. Storage capacity and network speed improve along a similar trajectory. 64-bit machines are at the early stages of becoming commonplace. And while it’s true that scalability doesn’t equal performance, having better performing hardware can significantly improve scalability.

(Side note – if we’re going to be truly picky, Moore’s law actually refers to rate of improvement of the number of transistors per IC, which only roughly equates to performance. Intel’s Centrino technology is all about using those increasing numbers of transistors for other things like wireless networking and battery management.)

Ed spends quite a bit of time covering very low level computing concepts such as threads, locks, instruction cache, registers and the stack. I’m not sure why he does this. It almost feels like he only read the first part of my post, stopping right before he got to the part where I wrote: “Of course, it will be a long long time before Moore’s law can provide a single machine to run a BIG enterprise app”. In other words, I don’t expect to run my ERP, SCM, CRM or other BFD enterprise-scale app on one machine!

Ed has missed a basic point of my post that I didn’t spell out as I thought it was obvious: the independent services that make up a BIG enterprise class app can all run on different machines. I’m guessing he missed that point by the way he ended his post:

“Yes, distributed computing is a good thing.”

As Ted points out, it’s not just a good thing, “distributed computing is a necessary thing.” And a system of 100′s or 1000′s of independent services – which is what I’m describing – is significantly more distributable than the multi-tier monolithic applications we build today.

Of course, it is guaranteed that a small percentage of services will continue to need to use scale out techniques to reach their scalability requirements. For example, it will be a very very long time (if ever) before a single piece of hardware could handle the order processing load Amazon.com generates a week before Christmas or the tax return filing load at the IRS on April 15th. This problem isn’t unique to application design. To draw a parallel to the database design world, there are a small percentage of tables that benefit from using filegroups to isolate them on separate drives from the rest of the database. It happens – but it doesn’t always happen. It doesn’t even usually happen. I like Josh’s comment that “the vast majority of people who think they have workloads which require partition for scale are actually indulging in delusions of grandeur.”

The point I was making is that computers are going to continue getting faster and service-oriented systems are likely to consist of boatloads of independent services with only modest scalability requirements. The combination of these two forces drastically reduces the number of scenarios where you need to use multi-tier scale out techniques to achieve the scalability requirements. If you don’t need a multi-tier deployment, then there is a huge performance and scalability benefit to running the service logic in the database process. If you don’t need to scale-out to achieve your requirement, why would you take the performance and scalability hit to run your code outside the database?

It’s pointless to argue that computer aren’t getting faster or that running the code in process with the database doesn’t perform better. Ed (and Ted and Josh and everyone else reading this), I’d love to hear you opinions on the following:

  • Will a service-oriented approach likely result in of boatloads of independent services where today we have one BIG app?
  • If yes, will the vast majority of these boatloads of independent services have modest enough scalability requirements to run on a single piece of hardware in the near future?

Broadcasting Music

The first thing I need for my DJ idea is to be able to broadcast content. This means a variety of things, but first and foremost is music. The  RIAA provides special webcasting licenses as long as the webcaster meets specific criteria. (I’m guessing I’ll have to talk to our legal dept. before I actually broadcast any music). The criteria is pretty acceptable – I could easily build a bot that streams music 24/7 from my own ripped CD collection in accordance with the RIAA’s criteria.

Of course, all that ripped music is on my personal home machine and I have no interest in copying it all up to my media server. What I really want to do is broadcast from my home machine to the server, which in turn broadcasts to potential listeners. From what I understand, I need to use the Windows Media Encoder (or an app built with the WMEncoder SDK) to push media to the server for rebroadcast. No problem – building a bot to do that should be no big deal. Except that it is a big deal.

WMEncoder can only work with two sources of media (not including screen captures, HTML and script which are not applicable to this post) files and devices. Since I’m mixing together the contents of multiple files, I can’t use a single file as a source. Which means a device. The problem lies in the fact that audio apps are designed to write to audio rendering devices (like the sound card) not to audio capture devices. What I need is a audio “loopback” device that takes the audio sent to the virtual audio rendering device and sends it directly to the virtual audio capture device. Thus, the output of the bot is fed as input into the encoder. So far, I’ve found Virtual Audio Cable from NTONYX that looks like it will do the trick (I actually dug out the windows driver book and entertained very brief thoughts of building my own, but in the end, I’d rather just spend the $50 for VAC).

I’m not sure if I’m going to use DirectSound or DirectShow to build my broadcast bot. I’m leaning towards DirectShow since it seems more suited to this sort of problem (even though it is the only piece of DirectX w/o a managed wrapper). I just wish there was a Windows Media Broadcast rendering filter that didn’t require the use of VAC or the encoder.

Anyone out there have any experience with DirectShow?

Back in Black

It’s been a busy week. I was on .NET Rocks, we published JOURNAL and I seem to have stirred up some discussion with my endangered middle-tier post.

But then I was silenced by a floppy disk.

My friend Tom, who hosts DevHawk and TechieWife for me, is on a contract job out-of-state and couldn’t remotely diagnose why the web server that hosts this blog wouldn’t reboot after a power-outage. Turns out there was a floppy in the drive and go figure, the server tried to boot from the floppy. So I’ve been offline all week. Still, I have to give Tom props as

  1. He hosts me for free
  2. I have admin access to the machine
  3. He’s down to try new things

Being on .NET Rocks last week reminded my a little of my old college DJ days. I’ve got an idea I’d like to play around, but I’d need a media server. That’s where #3 above comes into play. I ask Tom and I receive. No idea what I’m going to do with it yet, but now I have a media server to play with. Thanks, Tom…You Rock!

New Issue and New Home for JOURNAL

Last December, Arvindra Sehmi of Microsoft EMEA (Europe, Middle East and Africa) created JOURNAL – the Microsoft’s Architects JOURNAL – to great success. Now, with the publication of JOURNAL 2, we have launched JOURNAL’s new homepage on the MSDN Architecture Center. You can read the articles online in the MSDN library or download the full issues as PDFs. (To anyone who previously downloaded the JOURNAL 1 PDF, we’ve reformatted the PDF so that it will print on A4 or US Letter sized paper without having to shrink it to the point of near-unreadability.)

BTW, you do have to fill out a profile questionnaire to get access to the PDF’s. And since we want to encourage people to fill out the profile questionnaire, we’ve only published one article from JOURNAL 2 on MSDN so far. We’ll publish one of the remaining articles on MSDN every couple of weeks. However, to whet your appetite, the article we choose to publish is the cornerstone of JOURNAL 2 – Pat Helland’s Metropolis. It’s based from Pat’s Architecture Strategy Series presentation of the same title, where he drawn a parallel between the evolution of cities and the evolution of information technology shops. It’s a very powerful analogy for understanding that we’re at the very beginning of the Information Revolution and that we have a long long way to go.

Please drop me a line or leave a comment with your thoughts on JOURNAL. It’s a quarterly publication, so look for JOURNAL 3 in July. In the meantime, we’re always looking for authors, so let me know if you have an idea for an article.

Microsoft Solutions Framework

It’s been around a while, but I only just noticed the Microsoft Solutions Framework website because they just published their whitepapers on the Download Center (RSS feed for Download Center provided by ThunderMain – thanks guys!)

From the overview, MSF is:

Microsoft Solutions Framework (MSF) is a deliberate and disciplined approach to technology projects based on a defined set of principles, models, disciplines, concepts, guidelines, and proven practices from Microsoft. This white paper introduces MSF and provides an overview of its foundational principles, core models, and essential disciplines, focusing on how their application contributes to the success of technology projects. Finally, the paper provides references for further information about MSF and references for guidance in implementing MSF within an organization. In an appendix, the paper briefly compares and contrasts MSF to other industry methodologies and standards and describes how MSF can be used in combination with them.

MSF includes two models – team and process – as well as three management disciplines – project, risk and readiness. They also have a bunch of MSF templates you can use in your own projects.

One of the nice things about MSF is that it works with other methodologies. I.e. you don’t have to give up RUP/XP/TDD/<insert your favorite methodology here> in order to use MSF.

Update: Lorenzo has compiled a list of MSF links you can check out.