Build castles in the Cloud with the new drop of the BizTalk Services SDK

Yesterday night I was going through the unresolved parts of the inbox, a fairly boring task, when Dennis rescued me: he chimed in via Messenger reminding me that a new version of the BizTalk Services SDK is out. It wasn't hard to switch my attention to something far more exciting, and I promptly installed it. If you had the old version of the SDK on your machine, I suggest uninstalling it before installing the new one. For the ones that were bold enough to play with the new binding at low level: the changes in the machine.config show how the assembly hierarchy and the object model changed:

<!-- <system.serviceModel>

    <bindings>

      <relayBinding>

        <binding name="metadataExchangeRelayBinding" />

      </relayBinding>

    </bindings>

    <client>

      <endpoint address="" binding="relayBinding" bindingConfiguration="metadataExchangeRelayBinding"

        contract="IMetadataExchange" name="net.relay" />

      <metadata>

        <policyImporters>

          <extension type="Microsoft.ServiceModel.Relay.Description.RelayBindingElementImporter, Microsoft.ServiceModel.Relay, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

        </policyImporters>

        <wsdlImporters>

          <extension type="Microsoft.ServiceModel.Relay.Description.RelayBindingImporter, Microsoft.ServiceModel.Relay, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

          <extension type="Microsoft.ServiceModel.Relay.Description.RelayBindingElementImporter, Microsoft.ServiceModel.Relay, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

        </wsdlImporters>

      </metadata>

    </client>

    <extensions>

      <behaviorExtensions>

        <add name="connectionStatusBehavior" type="Microsoft.ServiceModel.Relay.Configuration.ConnectionStatusElement, Microsoft.ServiceModel.Relay, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

      </behaviorExtensions>

      <bindingElementExtensions>

        <add name="relayTransport" type="Microsoft.ServiceModel.Relay.Configuration.RelayBindingElementSection, Microsoft.ServiceModel.Relay, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

      </bindingElementExtensions>

      <bindingExtensions>

        <add name="relayBinding" type="Microsoft.ServiceModel.Relay.Configuration.RelayBindingCollectionElement, Microsoft.ServiceModel.Relay, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

      </bindingExtensions>

    </extensions>

  </system.serviceModel>-->

  <system.serviceModel>

    <bindings>

      <relayBinding>

        <binding name="metadataExchangeRelayBinding" />

      </relayBinding>

    </bindings>

    <client>

      <endpoint address="" binding="relayBinding" bindingConfiguration="metadataExchangeRelayBinding"

        contract="IMetadataExchange" name="sb" />

      <metadata>

        <policyImporters>

          <extension type="System.ServiceBus.Description.RelayBindingElementImporter, System.ServiceBus, Version=0.9.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

        </policyImporters>

        <wsdlImporters>

          <extension type="System.ServiceBus.Description.RelayBindingImporter, System.ServiceBus, Version=0.9.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

          <extension type="System.ServiceBus.Description.RelayBindingElementImporter, System.ServiceBus, Version=0.9.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

        </wsdlImporters>

      </metadata>

    </client>

    <extensions>

      <behaviorExtensions>

        <add name="connectionStatusBehavior" type="System.ServiceBus.Configuration.ConnectionStatusElement, System.ServiceBus, Version=0.9.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

      </behaviorExtensions>

      <bindingElementExtensions>

        <add name="relayTransport" type="System.ServiceBus.Configuration.RelayBindingElementSection, System.ServiceBus, Version=0.9.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

      </bindingElementExtensions>

      <bindingExtensions>

        <add name="relayBinding" type="System.ServiceBus.Configuration.RelayBindingCollectionElement, System.ServiceBus, Version=0.9.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

      </bindingExtensions>

    </extensions>

  </system.serviceModel>

That defines the heart of the SDK, the relay binding. As you can see, the main difference is in the assembly name(space): from the old Microsoft.ServiceModel.Relay to the new System.ServiceBus.

I am sure that Dennis himself and Justin will cover things in much better detail. Here let me just tell you that the new drop supports username and password as authentication method: while you know my position about shared secrets in general, here we gain the huge advantage of being able to connect to the ISB (Internet Service Bus) in unattended mode. In the former version of the SDK, every time you wanted to register an endpoint on the ISB you were prompted by the Identity Selector: while this is perfectly reasonable (actually, suggested) when the application is inherently interactive, you can see how this could have been a problem for a service. Being a service unattended, there would be nobody to deal with the CardSpace prompt in the event of a drop&reconnect scenario. With passwords you now can, always making sure you follow the proper practices for storing them, guarantee that at restart your service will be able to re-register with the ISB without explicit human maintenance.

An example usage of the new password feature is shown below: the screenshot is taken by a test run for the Multicast sample, and depicts a pretty solipsistic chat session (both instances are registered with the ISB with my user).

image

Let me tell you, the multicast sample is pretty amazing! The session above is very non-representative, the real awe is when you see clients running on the most different machines, happily talking to each other irrespective of the walls between them. In fact, I think we should organize a MultiCast sample online party in which we agree on a time and a chatroom name and we all jump in. How do you like it? If you're up to it leave a comment or use the blog contact form :-)

I should not forget to mention that the new SDK introduces a super easy way of exposing services for consumption from a browser, in glamorous webby fashion, and that we are now compatible with Orcas (the framework 3.5).

So go ahead, build castles in the cloud! In this era, the phrase has an entirely new meaning :-)