Applied Architecture Patterns on the Microsoft Platform Now Available on Amazon.com

Applied Architecture Patterns on the Microsoft Platform Now Available on Amazon.com

I am pleased to announce my book is now available for immediate delivery on Amazon.com!

The book is called “Applied Architecture Patterns on the Microsoft Platform” published by Packt Publishing.

Applied Architecture Patterns on the Microsoft Platform

This book is a detailed scenario-driven approach to architecting systems using Microsoft technologies covering BizTalk Server, .Net 4, AppFabric, Azure, SQL, and more.  We dive into 13 real-life style scenarios and talk about various technology options available to solve the problem.  One technology is selected for each scenario and a detailed walk-through it given.

The four other co-authors and I have been working on this book for nearly a year.  We hope you enjoy it!

BizTalk Server 2010 Release Party in Sweden – September 8 & 9

I am pleased once again to be asked to present in Sweden by the Sweden BizTalk Server Users Group.  This event is the “BizTalk Server 2010 Release Party” and will feature content and topics from my soon to be released book: Applied Architecture Patterns on the Microsoft Platform.

This is much more than just a simple presentation.  This is a 2-day EVENT packed with great content from multiple speakers.  I will be presenting alongside fellow co-authors Richard Seroter and Ewan Fairweather. 

This event will be held in Stockholm, Sweden on September 8th and 9th.  Full details are available at: http://bugs20100908.eventbrite.com/.  The event is currently sold out but you can get added to a Waitlist.

We expect to have over 10 MVPs and over 40 people from outside Sweden in attendance!

I am looking forward to my second trip to Sweden and getting the opportunity to present to this group again.

Hope to see you in Sweden!

Update on My Upcoming Book – Applied Architecture Patterns on the Microsoft Platform

Looking back at some of my past blog posts, I realized it has been a long time since my last post.  Wow – over 10 months to be exact.  Let me give a little re-cap of what I have been doing in those 10 months.

  • Went to India twice
  • Went to United Arab Emirates twice
  • Went on a month long trip to Australia and New Zealand
  • Went on a weeklong trip to Thailand
  • Visited London, Spain, Germany, Japan, Hungary, Hong Kong, China, and Greece
  • Launched two major eCommerce Websites and numerous major marketing sites (working on the backend BizTalk pieces of course)
  • Worked countless 80+ hour weeks
  • Completed my first book

Yes you read the list correct!  From the person who brings you grammar and spelling error-filled blog posts, I am pleased to announce I was a co-author of a book along with four others (Richard Seroter, Ewan Fairweather, Rama Ramani, and Mike Sexton).  The book is called “Applied Architecture Patterns on the Microsoft Platform” published by Packt Publishing.

This book covers 13 Enterprise scenarios like Remote Message Broadcasting and Multiple Master Synchronization.  For each scenario we review various Microsoft Technologies that can be used to solve the problem.  We analyze the scenario based on a defined set of business requirements and a decision framework to arrive at one final architecture.  That final architecture is outlined step-by-step and sample code is provided.  The book also contains a brief primer on covered technologies.

This book shows the following technologies in a real-life scenario: Windows Azure Platform, Windows Azure platform AppFabric, Windows Server AppFabric – Caching (Velocity), Windows Server AppFabric – Service & Workflow Management (Dublin), StreamInsight, SQL, BizTalk Server 2010 (including the Service Bus), .Net 4.0 Workflow Services, and more.

We have set up a website dedicated to the book: http://appliedarchitecturepatterns.com/

Be one of the first to get the book by Pre-Ordering the book now at Amazon or directly from Packt. Packt has both a paper copy and eBook available with free shipping to numerous countries. 

Look for more to come on my blog about the book, the chapters I worked on, how to download sample code (although it will not be very useful without the book), and videos of the scenarios I worked on.

Got a Great BizTalk Tip or Trick and You Could Win Richard Seroter’s SOA Patterns Book

Thanks to Packt Publishing, I am pleased to offer you the opportunity to win a copy of Richard Seroter’s book SOA Patterns with BizTalk Server 2009 – a $60 value.  I will even cover the shipping costs, via book mail, to any place in the world the US Postal Service will deliver to. 

Here is what you need to do in order to win:

Simply let us know of a great BizTalk Tip or Trick using BizTalk 2006, BizTalk 2006 R2, or BizTalk 2009.  Tell us a little about it and why it is useful.  This could be as simple as a UI tip or complex as you want to make it.  This does not need to be anything new, you might have already blogged about it or posted it to a forum.  If so, that’s ok!

How to Enter:

1. Either post a comment to this blog post with your idea or post a link to your blog / post outlining your tip or trick.

To post a comment or link I suggest being a registered member of BizTalkGurus.com.  This will make it easier to find you if you win and easier to get past the SPAM filter.  In any case, your comment might not show up on the site right away.

2. Having problems posting a comment?  Then just email your idea or link directly to me using the Contact link on the side of my blog.

3. All entries must be received by Thursday November 5th, 2009 at 11:59 PM Central Time. 

4. The winner will be selected by Sunday November 8th and notified via email.  In addition, a blog post will be made to announce the winner the following day.

5.  All decisions of the judges are final. :) 

I will be working with a few other BizTalk MVP’s to pick the best idea so be creative and have fun! 

Latest Windows Application Server Enhancement (Dublin) Videos On Channel 9

Recently I was asked to present at the BizTalk Users Group in Sweden.  I had a great time and was welcomed nicely by my Swedish friends. 

I presented on the new enhancements to the Windows Application Server role code named Dublin.

I presented two 35 minutes sessions covering a lot of the same material talked about at the recent TechEd in Los Angeles, CA.

The two sessions are now online and available for everyone to watch.  The first session is essentially the value proposition of using Dublin and Workflow Services and the second session is a deeper dive into custom tracking and monitoring.

The top question I get is when can I get the code for Dublin?  Microsoft stated at TechEd they planned for a public beta of Dublin around the PDC 09 timeframe.

Enjoy and please post any comments or questions.

Session 1: Inside the Windows Application Server Enhancements known as Dublin (1/2)

Abstract: In this session we will review the features of the Windows Application Server Enhancements code named Dublin.  This session will show how to use new and enhanced concepts in the .Net 4.0 framework to empower Services hosted in Windows allowing users insight into service health and activity.

Session 2: Inside the Windows Application Server Enhancements known as Dublin (2/2)

Abstract: This session takes a deeper dive into Windows Application Server Enhancements by looking in detail at the hosting of a Workflow Service.  This will cover reviewing a web service aggregator Workflow Service, setting up custom tracking, monitoring running services, and import and export of applications.

Windows Application Server Enhancements known as Dublin Presentation in Sweden

On Thursday June 4th I will be presenting in Sweden to the BizTalk Users Group. I am excited to be making the trip to Sweden and it will be great to see so many BizTalk enthusiasts all in one place.  I will be presenting two sessions both on Microsoft’s new Window Application Server Enhancements – known as “Dublin”.  The details of the sessions are below.  If you are in Stockholm and want to attend you can get information on the BizTalk Users Group home page. 

Meeting Title:  Inside the Windows Application Server Enhancements known as Dublin

Session 1: Walkthrough of Windows Application Server Enhancements code named Dublin

In this session we will review the features of the Windows Application Server Enhancements code named Dublin.  This session will show how to use new and enhanced concepts in the .Net 4.0 framework to empower Services hosted in Windows allowing users insight into service health and activity.

Session 2: Managing, Monitoring, and Deploying Services using Windows Application Server Enhancements

This session takes a deeper dive into Windows Application Server Enhancements by looking in detail at the hosting of a Workflow Service.  This will cover reviewing a web service aggregator Workflow Service, setting up custom tracking, monitoring running services, and import and export of applications.  

Designing Services for Management & Scale with Dublin Video Online

A few months ago Kent Brown and I presented on Dublin (the new enhancements to Windows for Workflow Hosting, Monitoring, and Tracking) at the 2009 SOA and Business Process Conference in Seattle Washington.

This session was recorded and is now online.  You can view this video here: http://soaconference2009.spaces.live.com/blog/cns!FA6FC7F5DB1C07!135.entry

The abstract for the session is below.

Abstract:  Dublin is the code name for the new Windows Application Server features inside Windows. In this session we will take a look at how to build a service to leverage the management tools inside Dublin to gain insight into the health of running services. We will show how simple it is to configure Dublin to custom track custom values inside message payloads. Once tested, deployment and migration of the service to a new environment will be demonstrated.

Watch for more to come from me on Dublin in the up coming months.

Setting Up Continuous Integration, Automated Unit Tests, and MSI Packaging in BizTalk 2009

With BizTalk Server 2009, setting up integration with Team Foundation Server (TFS) has become much simpler.  While setting up continuous integration, automated unit tests, and msi packaging was possible before BizTalk 2009 it was a huge pain. 

Below I will walk through the steps to set this up with BizTalk 2009.  I was able to get this up and running in about 30 hours including the time to create the Virtual Machine (that was 15 hours).  It took 47 build attempts in TFS before all the bugs were worked out in the process.  While I cut some corners for the demo it would not take much more time to develop a true production ready solution.

We can start by taking a look at the Virtual Machine setup:

  • Windows 2008 SP1
  • TFS 2008 SP1 with Build Server installed
  • SQL 2008 with all optional components installed
  • Visual Studios 2008 SP1
  • BizTalk Server 2009 with MSBuild tools installed

As you read though the steps below keep in mind I have about 10 hours of experience with MS Build and TFS 2008.  This was my very first time setting up automated unit tests and continuous integration with BizTalk.    This is just one approach for demo purposes.  In real life, for example, all these systems would not be on the same server.  This would surely make the process harder.

At a high level, this is what is happening:

Update to a file is checked in -> Build is kicked off -> Build completed with no errors -> Unit Tests are ran -> (Verification – Not Shown) -> MSI is created

Keys Pain Points:

  • Setting up TFS 2008 with SQL 2008 is many times more complex that you would think.  Make sure you Google this before starting.
  • Remember user permissions.  This will affect your share permissions, other folders, and the ability to run scripts.  For example, to run the Create MSI Process below the user running the Build Agent will need to be a BizTalk Admin.
  • Relative and absolute file paths are a killer.  I spent a lot of time finding temp locations and getting relative paths to work.  Looking at the Build Log and MSBuild Targets was a huge help.
  • Keep in mind TFS will use the version of code checked into TFS.  If you update a file or the build project make sure you check it in or the new settings will be ran.

Download the Solution Code

Setting Up Continuous Integration, Unit Tests, and MSI Creation in BizTalk 2009 Sample Code

Setting Up Unit Tests for use in Continuous Integration

Step 1:  Setup a Unit Test project following the help guide instructions at http://msdn.microsoft.com/en-us/library/dd224279.aspx

Step 2:  Create a Test List in the .vsmdi that was added to the solution when the Unit Test project was created.  Right click on the Lists of Tests.  Creating the new list named RunAllUnitTests is shows below.

 

Step 3:  Add the test methods from Step 1 to the new test list.  Drag and drop the test into the test list.  This is shown below.

Pointers:  The hardest part of setting up the unit tests is getting the file paths correct for Schema and Map testing.  I finally got tired of trying to figure it out and hard coded the paths to known local files.  This is not the right way to do it.

 

Setting Up Continuous Integration

Step 1: Add Solution to Source Control in its own folder tree.  In this case it is called CIDemo as shown below.

Step 2: Create a new Build Definition inside Team Explorer.

 

Step 3: Give the Build Definition a name. In this case it is called CIDemoBuildDefinition.

Step 4: Set the Workspace to the CIDemo solution folder created in Step 1.  This is shown below.

Step 5: Go to the Project File section of the wizard.  Select Create on the Project File screen to make a new Build Project.  A new wizard will open.

Step 6: Select the CIDemo solution.  This will be the solution that the build project will build.

Step 7: Select the build type.  In this case it is Release.

Step 8: Since we already created the Unit Tests and a Test List select the RunAllUnitTests test list to have the unit tests ran when a build is performed.  This is shown below.  This can always be updated in the build project later on if the Unit Tests are not ready.  Click Finish to end this wizard.

Step 9:  Back on the main wizard, leave the Retention Policy items unchanged.

Step 10: Under Build Defaults, select New to create a new Build Agent.  Name the build agent and set the computer name.  In this case the name is CIDemoBuildAgent and the computer name is Win2008Ent-Base as seem below.

Step 11: Set the Share location for the builds to be copied to, also known as the Drop Location.  A local share was created called Builds.  To ensure no permission problems Everyone was added to this share.  This is not what should be done in real life.  Most likely this would be on another server.

Step 12: Under Trigger, select the Build each chick-in radio button.  This will create a new build with each check in.  Click OK to create the Build Definition.

Step 13:  Test the process.  Check in a file.

 

Creating A BizTalk MSI

The process used here to build an MSI package first installs the BizTalk Assemblies and Binding file to a local BizTalk Server.  Then it exports out the MSI Package.  While other approaches can be used that do not require a local BizTalk instance, this approach would allow for additional BizUnit style Unit Test (or Build Verification tests) to be ran against deployed code. 

Step 1:  Modify the CreateFullandPartialMSI.bat sample file in the CreateApp folder under Application Deployment in the BizTalk 2009 SDK.  This file is called BuildMSI.bat in the Helper folder in the solution.  Changes made to the file include changing paths, dll names, and application names.   Make sure the order of the dlls is in the correct deploy order.  i.e. Schemas before Maps.

Step 2: Modify the Build Project created in Step 5 above.  This file is a MSBuild file that controls the build and tests ran against the build.  At the end of the file right before the closing </Project> tag add the following:

<!– This Target created a directory for the binding files and Copies them and the build bat file to the temp directory. –>
<Target Name="AfterTest">
  <MakeDir Directories="$(BinariesRoot)/Release/Bindings" ></MakeDir>
  <Copy SourceFiles="$(SolutionRoot)/Bindings/CIDemo_Bindings_Dev.xml" DestinationFiles="$(BinariesRoot)/Release/Bindings/CIDemo_Bindings_Dev.xml"></Copy>
  <Copy SourceFiles="$(SolutionRoot)/Helper/BuildMSI.bat" DestinationFiles="$(BinariesRoot)/BuildMSI.bat"></Copy>
</Target>

<!– This Target runs the build bat file, copied the completed MSI, and deletes the bat file from the file share. –>
<Target Name="AfterEndToEndIteration">
  <Exec Command="$(BinariesRoot)/BuildMSI.bat" WorkingDirectory="$(BinariesRoot)" ></Exec>
  <Copy SourceFiles="$(BinariesRoot)/CIDemo.msi" DestinationFiles="$(DropLocation)/$(BuildNumber)/CIDemo.msi"></Copy>
  <Delete Files="$(DropLocation)/$(BuildNumber)/BuildMSI.bat"></Delete>
</Target>

This code will copy the binding files, the bat file used to build the MSI, and do some clean up.  This can be customized as needed and the possibilities are almost endless.  Make sure the updated file is checked into TFS.

Step 3:  Ensure the user account running the build agent is a member of the BizTalk Admin Group.  This use can be found inside TFS by starting a build and viewing the properties as seen below.  This account is set up when you install TFS.

Step 4: Watch for output in the folder share when a file is checked in or a build manually started.

 

This outlines at a high level the process to create automated unit tests, set up continuous integration, and create a BizTalk MSI package.  I hope to put this together into a video shortly.  Until then, best of luck.

Setting Up Continuous Integration, Unit Tests, and MSI Creation in BizTalk 2009 Sample Code

Download this sample using the download button below.

This sample code outlines how to set up Continuous Integration, Automated Unit Tests, and to create an MSI Package using Team Foundation Server 2008 (TFS) with BizTalk Server 2009.

At a high level, this is what is happening in the end to end process.

A file is updated and checked in -> A build is started -> The build completes -> Defined unit tests are ran -> a MSI Package is created

This sample code goes along with a step-by-step blog post that outlines this process.

That blog post can be found here: http://www.biztalkgurus.com/blogs/biztalk-integration/2009/04/16/setting-up-continuous-integration-automated-unit-tests-and-msi-packaging-in-biztalk-2009/

 

Follow-up on Enabling BizTalk Unit Testing for Schemas and Maps

This is a follow up to my post yesterday.  I was setting up some automated unit tests for BizTalk 2009 in Release mode.  I received the following errors. 

CIDemo.Schemas.InputSchema does not contain a definition for ‘ValidateInstance’ and no extension method ‘ValidateInstance’ accepting a first argument of type ‘CIDemo.Schemas.InputSchema’ could be found (are you missing a using directive or an assembly reference?)

CIDemo.Maps.Input_To_Output does not contain a definition for ‘TestMap’ and no extension method ‘TestMap’ accepting a first argument of type ‘CIDemo.Maps.Input_To_Output’ could be found (are you missing a using directive or an assembly reference?)

CIDemo.Maps.Input_To_Output does not contain a definition for ‘ValidateOutput’ and no extension method ‘ValidateOutput’ accepting a first argument of type ‘CIDemo.Maps.Input_To_Output’ could be found (are you missing a using directive or an assembly reference?)

This is because the value under Unit Testing: Enable Unit Testing are Configuration Specific as seen below.  The default is False.  So moving to Release mode reset the values.

I also noticed the Application Name is Configuration specific as well. 

Just something to keep in mind when changing configurations in BizTalk 2009.