Services Aren’t Stateless

My teammate Dale and I are going to an SOA Workshop in Vancouver in mid September. The workshop is put on by SOA Systems, which was founded by “top-selling SOA author” Thomas Erl. I have a copy of his first book, but I’ve never really opened it. Dale let me borrow Erl’s second book. I figured since I was going to see him speak, I should at least flip through his books.

I was looking thru the chapter 9 “Principles of Service-Orientation”. Most of them are spot on, if not exactly news. Services are loosely coupled, autonomous and share a formal contract. Yep, with you so far. But then I got to this one:

Services are Stateless
Services should not be required to manage state information, as that can impede their ability to remain loosely coupled. Services should be designed to maximize statelessness even if that means deferring state management elsewhere.

This seems way wrong to me on several levels. Now I’m really looking forward to going to Erl’s workshop, so I can discuss this with him face-to-face.

First off, his terminology is confusing. I have a hard time believing he really think services in general should have no state at all. I’m sure there are some examples of completely state-free services, but I believe they are both very rare and fundamentally uninteresting. A simple calculator service has no state, but why would you actually build or use one (except as a demo)? I assume Erl means that service should be stateless in the same way HTTP is stateless. IMO, stateless is poor description of HTTP. Connectionless or sessionless would be more accurate.

Regardless of my opinions on poor terminology, the problem with stateless services is that many – perhaps most – business operations aren’t stateless. And while HTTP is stateless, as soon as you use cookies, it becomes a stateful protocol. If you don’t believe business operations are stateful, try buying something on your favorite ecommerce site with your cookies disabled. Most sites will give you a “Your computer must have cookies enabled” error message. Sites that still work are embedding a session ID in the URL instead of in a cookie (ASP.NET has built in support for this type of Cookieless Session State). Either way, state is required for even the simple task of ordering something from a web site.

If most business operations aren’t stateless, why should services that implement business operations be stateless? This seems like a violation of the “but no simpler” part of Einstein’s famous paraphrased quote.

Slides from Gartner EA Conference

My old team decided to post the slides from my sessions at the Gartner EA Summit last month. Well, they’ve posted PDF versions of said slides and the fonts are somewhat off, but you’ll get the idea.

If you’re interested in more info on the Dell Integrated Desktop, you can check out the full case study.

FYI, Gartner recorded audio for these sessions and supposedly it’s on its way to me. I’ll try and post the audio with synced slides as soon as I can.

New Teammates Blogging

I’m settling in to my new job. One way to tell, read Dale Churchward’s blog. Dale’s a teammate of mine. He only joined Microsoft a few months ago. Apparently, he used to blog at his old job, but either way we’ve now doubled the number of bloggers on my new team, with hopefully more to follow.

In addition to his opinions of political discource and the Seahawks chances next season, Dale’s got some interesting posts on data integration and system diagrams. Check it out.

Ted’s Hockey Math

My new pal 😄 Ted Leonsis does the hockey math on the re-acquisition of Richard Zednik.

So, if my math is correct, we will have Zubrus on our first line, Zednik on our second line and Gordon (who will most likely play for the Caps and Hershey next season) in exchange for Jan Bulis, Trevor Linden and a second and a third round pick.  That is a pretty decent set of deals.

Actually, Ted’s math isn’t quite right. We got Linden as a part of the original Zednik trade, then traded him for the 1st round pick we used on Gordon. And of course, we started with Zednik, so that’s a wash. So the actual math goes Zubrus and Gordon for Bulis, a 2nd round pick (not sure who the Canucks got with that pick) and a 3rd round pick in next years draft. On paper, Bulis and Zubrus are close to a wash – Bulis had 20 goals and 40 points last season, Zubrus has 23 goals and 57 points. So that breaks the trade down to a 1st round pick (i.e. Gordon) for a 2nd and a 3rd. Not bad, but not mind blowing either.

That being said, it’s nice to have Zed Head back in a Caps jersey. Hockey is played on ice, not paper. I’d rather have Zubrus and Zednick than Bulis and Linden any day.

Paraphasing Simplicity

Albert Einstein is often credited with saying “Everything should be made as simple as possible, but no simpler”. However, in researching the quote on Wikiquote, I discovered the full quote is actually:

The supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience.

I think it’s funny that the canonical quote on simplicity is actually a simplified version of a significantly more verbose quote.