July 2009 - Posts

Test run of the BizTalk Adapter for Live Mesh
28 July 09 09:34 PM | Johan Hedberg | 1 comment(s)

The Live Mesh adapter is part of the recently released BizTalk Azure Adapters SDK 1.0 July CTP. It was first shown at TechEd 2009 North America by Danny Garber. But as someone who didn’t attend the conference, it passed me by. It didn’t surface for me until it made it’s way to codeplex and Richard Seroter made a note of the fact a week ago or so. If you have TechEd Online access you can find the original video demoing it here.

How to use it

  1. Register for an account on Azure services development portal, if you don’t have one already. Specifically you want access to Live Services.
  2. Install the pre-requisites.
    • The WCF LOB Adapter SDK.
    • The Live Framework SDK. You don’t need the tools, but you need the SDK.
    • There might be other pre-requisites though that I already had in place. So your experience might vary.
  3. Install the adapter. If you want to install it on a 64-bit system you can download the installer from codeplex. At the time of this writing a 32-bit (for VPCs etc) installer isn’t available, so you need to get the sources and build the installer. However see my install note 3 below, as you have to make a small change to the installer for it to work.
  4. Configure the adapter in BizTalk using the WCF-Custom adapter, or use my Mesh.BindingInfo.xml as a template (don't forget to change to your username and password). Some notes here:
    • You have to give it an URI of “mesh://?actions=LiveFX/OnReceiveFeed”, it’s hard coded in the adapter. If it isn’t given that then it does nothing. To make it unique and be able to have more then one mesh receive location you can add to it, like you would a querystring. It will be accepted, but not handled, only the value of actions is retrieved and used by the adapter. A smart thing here would be to move something into the URI that would make it naturally unique. When you configure other adapters it’s the name of a service, or a procedure or something like that. In a scenario where you are listening to a mesh folder for example, then the name of that would be appopriate, or when listening to notifications from an application, then the name of that; the name of the MeshObject is perhaps a common denominator?
    • image image image
    • At the moment it receives notifications about changes to all resources and then when it gets a notification retrieves all feeds for that MeshObject and tries to read the userdata of the DataEntries associated with each DataEntry as a string, and if it succeeds initializes an XmlReader over that string and creates a message. Thus the userdata must conform with the rules of xml and also a couple of other things built into the adapter today. Like the name of the first node, and an attribute in that node must match those in configuration of the adapter, as must the title of the MeshObject. The attributes value must be equal to the name of the DataFeed that contains the entry which we received a notification for. 
      The logic is a little unclear to me, and has lots of room for improvement, but admittedly – I’m no expert on the mesh resource model, nor do I know what the application it was built for sent across or how it stored it – and, it’s an early CTP. Sample (matching the config seen above, and produced by my sample app):
    • <myXmlElement myFeedNameXmlAttribute="MeshAdapterFeed">This is my data</myXmlElement>
  5. Build a cloud app to generate notifications with proper userdata content, or download my MeshAdapterTestConsole.zip (don't forget to change to your username and password), which corresponds with my bindings above. It creates a MeshObject, a corresponding DataFeed and a DataEntry in that with userdata. In the Live Framework Resource Browser (an invaluable tool that comes with the SDK) it looks something like this:
     image

Conslusion

First thing to note about the adapter is that at the moment it seems very tightly coupled to the demo. Judging from the “vision slide” at codeplex, the idea is for it to eventually expand into other areas as well. It isn’t to hard to change it or update it to for example read files out of a mesh folder. The Live Framework is pretty straight forward once you get used to it. But right now it’s just a glimpse into a future where BizTalk is the server product to bridge on-premises with the cloud – and doing so effortlessly and seamlessly with the use of the artifacts that we as BizTalk Developers are used to.

Install notes

Install note 1:
If the adapter install complains about not being able to find Microsoft.ServiceModel.Channels you haven’t got the WCF LOB Adapter SDK. The exception message (for completeness and search-engines, was: “Could not load file or assembly 'Microsoft.ServiceModel.Channels, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.”. 
image

Install note 2:
If you get a message when running the installer that “Please wait while the installer finishes determining your disk space requirements” - try to run the installer from the commandline using the command msiexec /i <name_of_installer.msi>, or msiexec /package <name_of_installer.msi> /qr.

Install note 3:
I got the message that “Machine.config doesn't contain system.servicemodel node”. First of all – yes it did, secondly – I could see that the adapter had added it’s bindings to the section – so it must be due to something else. When “binging” (do we call it that now ;) the exception message I got this post. It didn’t help much, but it did point me in the right direction, becauseit made me remember seeing a custom action in the solution. Sure enough, looking at the code for the custom action revealed the issue. At line 106, the installer is trying to apply the config for the 64-bit machine.config as well as 32-bit, not finding it since I’m on a 32-bit environment. Commenting out that line and rebuilding the install does the trick. Note: I’m not trying to do a fancy works-for-all-scenarios solution. I just wanted to fix my specific problem.

Install note 4:
I can swear on the fact that just before beginning the process of installing the adapter I could create BizTalk projects. After the adapter (and WCF LOB Adapter SDK) was installed – I can’t. Project creation fails and I get the message “One or more templates do not match any installed project packages.”. I can’t really point a finger or lay the blame on any particular point, install, configuration or other entity. It did however stop working. Reinstalling BizTalk Server 2009 Developer Tools and SDK resolved the issue.

Filed under: , , ,
Book Review: SOA Patterns with BizTalk Server 2009
24 July 09 10:58 AM | Johan Hedberg | 2 comment(s)

Richard Seroter has a style of writing that’s… entertaining and easy to read. Some books or articles have a tendency to go on and on without really saying too much. Let me assure you, that’s not the case here. You can find that in his blog as well.

If after reading the book I would be asked to identify an audience for the book I would indicate that the people that would get the most value out of reading the book are the ones that are already familiar with BizTalk. You don’t have to be familiar with WCF, as I think it does a good job of explaining it down to a level where you can follow things being said thereafter. Again though, I would suggest that you will also get the most value out of the book if you are already familiar with the concepts of WCF. And it’s for developers, not administrators. From the BizTalk books I’ve read, there are really none dedicated to administrators, although most contain parts meant for administrators. This does not.

I understand why it contains introductory chapters of BizTalk – you don’t want to alienate a large segment of people. But… in my humble opinion, beginners will get more value out of reading Professional BizTalk Server 2006 first. This is not a beginners book.

I read it cover to cover, that’s how I read most books, but if you belong to what I would claim is the best target group to get this book, you will read the first three chapters quickly, or not at all. Don’t get me wrong, they are not poorly written in any way, on the contrary, but you probably know this stuff well enough anyway. The mother of all learning is repetition though so…

I would say that the next five chapters (4-8, pg 87-276) is the meat of the book. Even though you know BizTalk (and there really aren’t all that many people in my cultural part of the world that say they really know something), I believe everyone can pick up a thing or two, or at the very least be reminded of things you should do when building solutions in BizTalk Server. I would also claim that these things, although arguably more important in a SOA, are of interest to all BizTalk developers, regardless if you are using BizTalk to do EAI, SOA or ESB style development – although the focus of the book might be on SOA and WCF.

The following chapter on the WCF SQL Server Adapter is a really good read as well, and one of the few resources available explaining the new SQL Adapter in any depth. I mostly recommend reading the book from start to finish, but starting with chapter 9, the chapters 9-12 can be read independently from each other and the rest of the book. Although chapter 9 is called “New SOA Capabilities in BizTalk Server 2009: WCF SQL Server Adapter”, it is mostly applicable on BizTalk Server 2006 R2, as is most of the book. Some parts of the chapter covers SQL Server 2008 specific functionality though.

The next couple of chapters (10, 11) are BizTalk Server 2009 specific, but they are the only ones. You can get this book even if you do BizTalk Server 2006 R2 development today and in the foreseeable future. The last chapters (11-12) are about coming functionality. It’s always difficult to write stuff about the future (or pre-release software for that matter), since inevitably, it’s constantly changing based on actions in the present (kinda deep huh?), but it gives a good glimpse into how things stood at the writing of the book (and in the majority of cases still does).

Summing up my experiences I think that an alternative title that reflects my above thoughts could have been Advanced or Pro WCF in BizTalk Server 2006 R2 (following in line with Apress names of Pro Mapping/BAM/EDI/RFID/… – but SOA Patterns with BizTalk Server 2009 is so much cooler ;) (and is just as appropriate)

To close, I highly recommend this book for anyone doing BizTalk development, specifically those matching the right crowd as described above.

Also BizTalk User Group Sweden looks forward to Richards visit in September when he will be speaking on some of these topics and beyond.

Additional links:

This Blog

News

    Messenger

    Twitter Updates

      Follow me on twitter

      Visitors

      Feedburner Subscribers

      Locations of visitors to this page

      Disclaimer

      All material is provided AS IS voiding any thinkable or unthinkable effect it might have for any use whatsoever. There... is that clear enough ;)

      Pages

    Syndication