Morning Coffee 7

News was expecting inches, but we only got a dusting of snow last night.

  • We had dinner last night with my old friend Matt, who moved to Amsterdam a year and a half ago and is getting to travel the world. Kids didn’t have a nap yesterday, so they weren’t quite on their best behavior, but it was great to see Matt. Hopefully it won’t be another 18 months before we see him again.
  • For the second time in four months, the power cable for my laptop failed. I wonder if there is something wrong with the power supply that’s causing the cable to fail? At least this time I wasn’t in Canada.
  • There’s a high resolution video of the Xbox 360 IPTV up on Xbox.com’s CES page. They make it very clear this is “something you need to get from your service provider”. Telling quote: “It’s kinda like what I have today, but better”. Doesn’t seem that much better, so far anyway.
  • I’m knee deep in WCF security code again. Mucking about with X.509 certificates sucks. I tried to follow these directions to create a dev root CA certificate as well as dev certs signed by said dev root CA, but I get security negotiation errors because the system can’t check to see if the cert has been revoked. I guess I’ll just install Certificate Services instead
  • My nominee for best new acronym: JBOWS (Just a Bunch of Web Services), apparently coined by Joe McKendrick. Web services, to date at least, seem like they’re being used primarily for building distributed applications, rather than a loosely coupled services. There’s nothing inherently wrong with that, unless you’re fooling yourself (or those holding the purse strings) that you’ll get integration “automagically” or “for free” just because you’re using web services. Joe McKendrick is definitely not an SOA-hole.
  • The next new language I learn will be F#. Just not sure when or how.

Morning Coffee 6

“The paper sure loves to talk about
Selling out
Some of us never get the chance”
Stick Around by Mr. Jones and the Previous

  • Didn’t see that coming. I guess the Buckeyes didn’t either. Congrats to the Gators. That makes at least three championships in a row won by the underdog. For all the complaining about the BCS, it’s hard to argue they got the champion wrong this year. However, with the exception of the Fiesta Bowl, the BCS games weren’t very good this year.
  • There’s a video of the new Xbox 360 IPTV service up on 10. I realize it’s a demo and we’re nearly a year away from release, but I’m not impressed. Xbox 360 Fanboy pointed to a blogger who got a deeper look at the service at Microsoft’s CE booth. Frankly, it doesn’t look or sound like it’s much different than standard cable service (though I like the sound of 35Mbps bandwidth at my house). I realize familiarity is good, but do we really have to lock ourselves into the existing TV paradigm?
  • I got roped into a webcast today on Optimizing Application Platform Infrastructure. It’s at 11am Pacific time. Stop by and say hi.
  • My colleague Dale has a rant about Service Oriented Assholes. His definition: “Any person or team that pontificates on Service-Oriented Architecture (SOA) without considering the realities of implementing SOA in a real business environment with real suppliers, customers, and products. These people are great at designing something on a white board or on paper, but couldn’t produce a real workable production ready system if their life depended on it.” Sort of a more specific (and vulgar) version of Joel’s “Architecture Astronauts“. How many SOA-holes do you know?

Common Ground with My Conservative Teammates

I came in this morning to discover my boss and next cube neighbor Rick had decided to spruce up his cube with camo netting. He’s ex-Army, so it’s not like it’s out of character for him. Of course, the camo netting has the exact opposite of it’s indented effect, making Rick’s cube very easy to find in the farm.

Unlike my last team, most of my teammates are conservatives. But apparently we can find common ground in our opinions of Defense Secretary Rumsfeld. Rick called him an abysmal failure. I couldn’t agree more. Dale joked that Rumsfeld was joining our team and moving into Rick’s newly camo festooned cube. Rick countered that Rumsfeld was actually joining the Enterprise Architecture group. Heh.

Update: Dale points out he made the joke about Rumsfeld joining EA, not Rick. My bad Dale.

The Two Types of Service Architects

Tomas Restrepo comments on my recent SSB and WCF posts:

Harry Pierson asks how well WCF supports long running tasks. He suggests that WCF does not support them very well, and says that’s one reason he likes SQL Server Service Broker so much. I’d say SSSB is a good match only as long as the long running tasks you’re going to be executing are purely database driven and can be executed completely within the database. Sure, this is an “expanded universe” with the CLR support in SQL Server 2005, but even so it makes me nervous at times 😄

You could also consider using a custom service with MSMQ or something like BizTalk Server for this if you had long running processes that were not completely tied to the DB (or a single DB for that matter).

Sam Gentile follows up:

In that same post, but I needed to call it out separate, Tomas rightfully says, “I’d say SSSB is a good match only as long as the long running tasks you’re going to be executing are purely database driven and can be executed completely within the database,” in response to Harry liking Service Broker so much. Talk about a narrow edge case. That’s way I never really got excited or cared about Service Broker. Its a narrow solution to a special edge case when everything is database driven and can be executed totally inside the database. That’s the old Microsoft Data-Driven Architecture for sure. Me, I’d rather have a rich Domain-Driven architecture most of the time. Then if you have Oracle databases in your architecture too, where does it leave you? Nowhere.

As you might expect, I have a few comments,  clarifications and corrections.

First, Tomas’ statement that Service Broker only supports service logic “executed completely within the database” in flat out wrong. Service Broker can be used from any environment that can connect to SQL Server and execute DML statements. If you can call SELECT/INSERT/UPDATE/DELETE, then you can also call BEGIN DIALOG/SEND/RECEIVE/END CONVERSATION. This includes Windows apps and services, web apps and services, console apps and even Java apps. Of course, you can also access Service Broker from stored procedures if you wish, but you’re not limited to them as Tomas suggested.

Tomas’ misconception may come from a feature of Service Broker called Activation. Activation is a feature of Service Broker that dynamically scales message processing to match demand. For example, Service Broker can be configured to launch a new instance of a specified stored procedure if messaging processing isn’t keeping up with incoming message traffic on a given queue. This is called internal activation and because it uses stored procedures it does execute within the database as Thomas said. Service Broker also supports external activation where it notifies an external application when activation is needed. You do have to build an application to host your service logic and handle these notifications, but that application doesn’t execute within the database. So while you could argue that it’s easier to execute your service logic within the database (no need to build a separate host app), it’s not required.

Given that you don’t have host your service logic in the database, then you’re also not limited to “a single DB” as Tomas suggests. You don’t, in fact, have to put your Service Broker queues in the same database with your business data. So if you have Oracle in your environment, like the scenario Sam mentioned, you would host your service logic in an external application that processed messages from a queue in a SQL 2005 database while accessing and modifying business data from tables in the Oracle database. Using multiple databases does require using distributed instead of local transactions, but if you’re using MSMQ as Tomas recommended, you’re already stuck with the DTC anyway.

Finally, I didn’t get Tomas’ “purely database driven” or Sam’s “everything is database driven” comments at all. While there are exceptions, the vast majority of systems I’ve ever seen/built/designed have essentially been one or more stateless tiers sitting in front of a stateful database. If it’s a traditional three tier web app, there’s a stateless presentation tier, a stateless business logic tier and a stateless data access logic tier. For a web service, there’s no presentation tier, but there’s is the stateless SOAP processing tier typically provided by the web service stack. Does this mean the vast majority of web apps and services are  “purely database driven” too? If so, then I guess it’s a good thing, right?

In the end, maybe there are two types of service architects – those that believe the majority of services will be atomic and those that believe the majority of services will be long running. For atomic services, Service Broker is overkill. But if it turns out that most services are long running, WCF’s lack of support is going to be a pretty big roadblock.

I’m obviously in the long running camp. I’m not sure, but I get the feeling this is the less popular camp, at least for now. We’ll have to wait to see, but I do know is that whenever someone brings me what they think is an atomic business scenario, it doesn’t take much digging to reveal that the atomic scenario is actually a single step of a long running business scenario that also needs to be automated.

Here’s a question for Tomas, Sam and the rest of you: Which group do you self select into? Are most services going to be atomic or long running in the (pardon the pun) long run?

Essential Windows Workflow Foundation

On Don’s recommendation, I picked up Essential WF. In the forward, Don writes “[S]omething big is about to happen.” I’m only part way thru chapter one, and this is already a must read. Go get it. Now.

In the preface, they define the term “Reactive Program”, which I’m adding to my personal lexicon.

“Windows Workflow Foundation (WF) is a general-purpose programming framework for creating reactive programs that act in response to stimulus from external entities. The basic characteristic of reactive programs is that they pause during their execution, for unknown amounts of time, awaiting input.”

That “unknown amounts of time” is the kicker. Here’s a paragraph from early in chapter one that expands on that:

“Real-world processes take a long time – days, weeks, or even months. It is wishful thinking to assume that the operating system process (or CLR application domain) in which the program begins execution will survive for the required duration.”

Gee, that sounds familiar doesn’t it?