What? Use Force.com to Build an ESB?

I spent the better part of two days early this month hanging out with Pat Patterson at the Monktoberfest conference talking about beer, technology and kids. If you don't know Pat Patterson, I highly encourage you to find him at Dreamforce this year (you are going right?) and go introduce yourself to him. It's highly improbably that you'll ever find a nicer guy.

Anyway, over a glass of spicy South African mead, we professed our love for the Force.com Streaming API and threw out examples on how it is being used. If you are not familiar with the Streaming API, it's basically a pub/sub model using the Bayeux protocol and CometD that allows you to "push" changes to Salesforce data that match a SOQL query (i.e., PushTopic) you define to external applications. So instead of having an external application that polls for changes to records in Salesforce, your application can "listen" for messages on a specific channel. We use the Streaming API extensively at CloudSpokes and it's quite magical.

However, the PushTopic only sends messages concerning records that are created, updated, deleted, or undeleted. If you want to send generic messages, you have to set up another custom object, insert your message and then publish those messages. This works but it's somewhat of a chore.

During our conversation Pat dropped a bombshell with "There's a Generic Streaming pilot with Winter '14 where you can send custom event notifications that are not tied to Salesforce data changes. You can essentially implement your own ESB." (BTW... he said this with a slight slur as we'd been sampling beer most of the night). I was so excited about the possibilities that I immediately bought Pat a (free) beer!

So if you want to know more about the Generic Streaming pilot, check out page 284 of the release notes.

Side note: I'm still trying to get Salesforce to implement my Apex Queue idea. If you like it, vote it up here.