Answering Dr. Nick’s Questions on SSB & WCF

Nick Allen asked on his blog about how people would like to see SSB and WCF work together. He’s already heard these from me, but I figured I’d put them out there for everyone to see and debate. Plus, I had several beers last night at the MVP dinner, so this is likely to be more coherent than I was yesterday! 😄

1. Are you interested in SSB because you’d like to have your service closer to the database? How close is close enough to the database?

I’ve first blogged about the endangered middle tier almost three years ago. My point at the time was that as you break your monolithic system up into services, the vast majority of those services won’t need to scale out. You performance gets better the closer you are to the data. If you don’t need to scale out, why not get the maximum boost by running in the database process itself?

Furthermore, in large IT shops, the database files are stored out on the SAN rather than on hard drives attached to the database server itself. That means the database server is effectively stateless. Why add a second stateless tier if you don’t need scale out? If you need more performance in a given service, you can detach the database file from it’s current SQL server box and attach it on another more beefy SQL server box without physically moving the database files at all. This enables what I call the “Star Trek Effect”, where you can shift computing power where it is needed most (more power to the payroll system!).

Of course, if you’re going to move the service, you do need to bring it down for a short time. That implies a need for durable messaging so that service consumers aren’t affected by the brief service interruption. Which brings us to…

2. Are you interested in SSB because you need durable, duplex messaging between two services? Do you need exactly-once-in-order message delivery?

Yes. SSB has a bunch of other nice features, but durable duplex messaging is what I need the most. Exactly-once-in-order is also fairly critical, though there may be scenarios where it’s not really necessary. Those are the exception, not the rule however.

Doesn’t WS-RM already do EOIO already?

3. Are you interested in using SSB from WCF because you want a better asynchronous messaging experience than MSMQ? What makes you prefer SSB to other queuing products?

My primary problem with MSMQ for the problems I’m tasked with solving is that MSMQ is one way while SSB supports duplex messaging. You could do duplex messaging with MSMQ if you didn’t mind managing multiple queues (one for each side of the conversation) but SSB does this for you for free. I’m sure there are scenarios where pure one-way messaging are useful, but they are few and far between in my day job.

Furthermore, SSB has the explicit idea of a service instance (they call it a conversation group) which MSMQ lacks. SSB’s implementation is conceptually similar to the new WCF/WF integration work in the latest Orcas CTP.

Finally, SSB uses logical naming. You have conversations between services, but services get mapped to physical addresses at the routing layer. This allows services to move around more easily (see the “Star Trek Effect” in #1 above). Both MSMQ and WCF use physical addresses, which makes them much more difficult to move.

4. Are you interested in having your data contracts defined in WCF, SQL, or both?

I like WCF’s data contract infrastructure. We did a early prototype long-running service with both WCF and SSB. the messaging stack code was obviously different, but we used the exact same data contract code. I even wrote some code to automatically deserialize the SSB message by mapping the SSB message type to a data contract.

I want my services to run inside the database, but that doesn’t mean I want to write them in T-SQL. Personally, I’m much more productive in C# and/or WF. So WCF data contracts are fine by me.

Morning Coffee 45

  • Yesterday’s morning coffee was canceled on account of going to main campus and hanging out with the Architect MVPs. I spent all morning + dinner with them yesterday. Some of these guys I hadn’t seen in nearly two years, so it was a ton of fun.
  • Nicolas Allen (aka Dr. Nick) is looking for SQL Service Broker users. I cornered him at the MVP dinner last night and gave him my thoughts on WCF + SSB. You can head over to his blog and do the same. (I’ll post my answers to his questions later today, hopefully)
  • The new Vista x64 driver for my workstation’s video card does support monior rotation, so I’m mostly XP free at this point. I’m dual-booting my workstation at this point, while I finish configuring stuff in the Vista partition. With both my workstation and work laptop tablet, I’m XP free at work. Next, I start getting home machines moved over.
  • Tom Hollander reports on a new drop of the Guidance Automation Toolkit. Mostly bug fixes like Vista support, but the full list is here. It’s an ugly upgrade process. You have to uninstall all existing guidance packages. I can’t wait until this technology is “integrate[d] … more deeply into Visual Studio and Team System”.
  • I mentioned the Podcast Authoring tool that I saw at TechFest last week. Herearesome pictures of it from engadget (via Loke Uei Tan)
  • I’ve been thinking of getting a Wii, and the fact I can hack code for it – managed code for managed snobs no less – is just another good reason to do it. (via DotNetKicks)

Morning Coffee 44

  • I got my Tecra M4 back sans flaky motherboard. That’s my full time laptop now – it’s nice to have a laptop that supports Vista. I’m still running XP on my desktop out of a combination of lack of video driver + laziness. I run dual monitor with my primary monitor rotated to be portrait instead of landscape. Easier to read websites and documents that way. Unfortunately, while there’s a generic WDDM driver for my video card’s chipset, it doesn’t support the rotate function. But according to the Dell support site, they released a new driver for my card a few weeks ago so maybe it’s time to try the upgrade again.
  • I sat down to watch Heroes last night, forgetting that it’s not on again until April. Watched 24 instead, but it has really jumped the shark.
  • Scott Guthrie continues his series on new Orcas language features, this time covering extension methods. On the one hand, it’s pure syntactic sugar. On the other, how sweet it is. It’s kinda surprising that no other mainstream language has done this before.
  • Scott Hansleman is a self-described managed code snob. What do you call the opposite of a managed code snob? An unmanaged code snob or a managed code bigot?

Morning Coffee 43

  • This week is the MVP summit. Hopefully, I’ll make it over there and see the Architect MVPs. Otherwise, things seem sort of quiet in the Microsoft wing of the blogoshphere.
  • Saw 300 yesterday on a relatively rare day out with just Jules. Really enjoyed it.
  • Nick Malik describes what goes into an enterprise platform roadmap.
  • Joe McKendrick recaps a vendor SOA suites podcast. With SOA, you can revisit your platform decision on a project by project basis which allows you to avoid the dreaded “vendor lock-in”. But supporting lots of platforms is an operational nightmare, so maybe lock-in isn’t as bad as it sounds.

Morning Coffee 42

Ever since I got back from vacation, it’s been all about the Morning Coffee. I’m happy to be getting a daily post out, but I haven’t written anything deep in several weeks now. My one non-MC post in the past two weeks was The Virtuous Cycle of Virtual Platforms which frankly I wrote over a year ago for internal usage and adapted for my blog after reading Dare’s post.

One of the reasons for my lack of “deep” posting recently is post vacation re-engagement. Also, things at work that I can’t blog about (yet) have been taking my attention. But I worry that this daily MC post is causing me to focus on “shallow” blog topics. Since I’m trying to average a post per day, that means at least two non-MC posts every week. Of course, more than two non-MC posts a week would be just fine.

  • On the XNA Team Blog, Michael Klucher announces the XNA Game Studio Express Update is coming in April. Among the new features are Vista compatibility, 3D audio, bitmap fonts, game icons and most interesting the sharing of compiled XNA games. Currently, the only way to share something you build with XNA with the community is by sharing the source code, which is less than optimal. For more, check out the XNA GSE Overview presentation by Mitch Walker from GDC.
  • Speaking of gaming consoles, Sony’s “big” announcement is a Second Life clone? Kotaku thinks “this is going to be one of those features that people didn’t realize that wanted until they get it.” Personally, I doubt that very much, but what do I know about game consoles? I just play, man.
  • Jafar Husain suggests a way to do Ruby symbols in C# 3.0. Sort of. He defines an extension method that returns the name of the property defined in a lambda function. On the plus side, it’s strongly typed. On the minus side, this.GetPropertySymbol(o =\> o.Name) isn’t as easy to type as :Name. (via DotNetKicks)
  • While pseudo-symbol support is fairly verbose, Scott Guthrie goes thru some of the new language features for terser syntax: automatic properties, object initializes and collection initializes. While I like object and collection initializes, I’m not really sold on automatic properties. Personally, I like the VS prop snippet approach, where you automate the creation of the property once time when it’s authored rather than leaving the shortcut syntax in the code in perpetuity.