BizTalk and AppFabric Caching: Problem or Problem Solver?

In the recent edition of The BizTalker Newsletter I featured the below article.  Read the article below or join the newsletter to have it delivered to your email.  I welcome and comments. feedback, or thoughts on this subject.


Server AppFabric contains two core pieces – Hosting and Caching. Today, I’m going to focus on the Caching piece of AppFabric.
AppFabric Caching is a new offering from Microsoft as part of the Server AppFabric collection of technologies for the Application Server role inside Windows. AppFabric Caching is Microsoft’s Distributed Cache solution for on-premise, fast, in-memory, and durable object caching.

A lot of community bloggers have been blogging about the use of AppFabric Caching with BizTalk Server. A few of the best posts are:

  • Using Windows Server AppFabric Caching for Storing SSO & Configuration data by Abdul Rafay – This shows how to Cache SSO data inside BizTalk.
  • Use AppFabric Cache to cache your WCF Service response by Mikael Hakansson – This shows how to Cache WCF response messages inside BizTalk.
  • Using AppFabric Cache in BizTalk by Todd Dhaeyer – This shows how to use AppFabric to Cache reference data and even prevent double messages.

Is Server AppFabric Caching really solving problems or creating new ones?

Rather than diving too deep into AppFabric Caching, let me summarize with a list of Do’s and Don’ts.

AppFabric Rules of Thumb – Don’ts:

  • Never put anything in the Cache that MUST not be lost – it is a non-transactional cache, not a database.

  • Never install AppFabric Caching along with other server products.  It will take up all of the available resources of the server including the entire available RAM so it should only be installed on a dedicated server.

  • Avoid making a connection to the Cache Cluster with each request.  The initial connection to the Cache Cluster is more expensive than reading and writing to the Cache. 

AppFabric Rules of Thumb – Do’s:

  • Use the Cache for fast, in-memory access to serializable .Net Objects that may or may not actually be in the Cache.

  • To achieve fault tolerances in the Cache, simply add a second node to the Cache Cluster (in most cases).

  • Use the Cache to reduce the load, performance, and potentially the license costs of more expensive products like SQL Server.

  • As demand grows, add more servers to the Cache Cluster to increase the available RAM for Caching.

The guidelines seem simple enough, so what is my hold out on BizTalk and AppFabric Cache?

Using BizTalk and AppFabric together makes awesome demos and can simplify some problems like working with reference data.  The current release of AppFabric Caching is designed to run alone on its own server since it could take up all available RAM.  This would not be a good situation on a production BizTalk Server.

My main concern with AppFabric Caching is if you have a separate caching layer along with your BizTalk Server, why not just use SQL rather than the Cache? 

  • Lower Cost – AppFabric Cache is included with the Windows License but you need extra hardware to run it on its own.

  • Better Performance – AppFabric Caching would reduce the load on SQL but I would like to see better data on SQL connection vs. Cache connection costs.  Although, if the existing SQL Cluster was already reaching capacity, moving more items away from that would be a plus. 

  • Lower Latency – In my mind, reducing latency is the biggest factor for using a Cache.  Cache would reduce the latency vs. a call to the database.  I would say in most BizTalk Solutions an external call to a SQL Server would probably not be the bottle neck given other BizTalk tuning parameters.  

  • Mission Critical Data – SQL wins out here (at least for now) because it has a true transactional backend data store. 

I love all three of the AppFabric community demos shown above.  At this stage, I would be comfortable using AppFabric Cache for reference and SSO data – not so much for removing double messages unless I was OK with maybe missing one now and then (but then what’s the point?).  I would still look to leverage SQL for double message removal given the need for true transactions.  Like everything – your unique situation may vary.

In conclusion, BizTalk and AppFabric Caching can work together.  Will caching work in scenarios such as a message re-play and de-duper?  Absolutely!  But for me, given the criticality of most BizTalk installations, I would use caution on using AppFabric Caching with BizTalk at least for now.

Winner of the Best Missing Feature in BizTalk 2010 is?

I just wanted to thank all the entries into the “What is missing in BizTalk 2010 Contest”.  It was a hard decision for the other judges and I.

Finally, the decision was made.  The winner was Siffnn from the UK.  He received a free hard copy of my book “Applied Architecture Patterns on the Microsoft Platform”.

His entry was the following:

“I Would like to See following features :

1- GUI in admin console to tune BizTalk Message Box Parameters

2- GUI similar to SQL Management studio to gather performance stats report for BizTalk Hosts/SQL Databases.

3-Web Based Fast Admin Console,tool.

4- Debugging Options should be easy

5- Standard Application Logging/Caching framework

6-Messaging Patterns should be available in Visual Studio while creating a BizTalk Project

7-There should be standard templates available to add performance counters in PUB/SUB projects.

8-There should be GUI tools available on BAM Infrastructure.

9-BAM Portal should be modified to display larger volume of data using custom data grids. Currently available reports are not very fast.”

Again, thanks to everyone who entered! 

Have a Happy New Year!

What is Missing in BizTalk 2010? Best Idea Wins a Signed Copy of Applied Architecture Patterns on the Microsoft Platform

I have another copy of my book “Applied Architecture Patterns on the Microsoft Platform” to give away.  The book is a $60 value and I will cover the shipping costs to the winner any place in the world as long as the US Postal Service ships there.

Contest #2 – What is missing in BizTalk Server 2010?  What feature, concept, UI update, or tooling would make BizTalk a stronger, more robust, simpler, or easier product to work with?  

As a special bonus, I was able to get the book signed by co-author Richard Seroter.  So someday when he becomes Microsoft CEO maybe this will be worth some money :).

How to Enter:
Simply add a comment to this blog post with your idea to enter!  Ensure you are a registered BizTalkGurus.com member so I know your email address if you win OR send an email to [email protected] with your idea.   Please ensure you see your comment show up on this blog.  Due to spam blocker and caching – it might take up to 24 hours.  If all else fails, just send me an email.

Entries must be received by 11 PM CST Tuesday, December 7th.  The winner will be announced a few days later.

Of course if you do not win a free copy of the book – the book is available on Amazon.com and PacktPub.com.

Looking for more information on our book?  Read a sample chapter online Chapter 12 Debatching Bulk Data or watch The Story Behind The Book on YouTube.

Congratulations to Rohit Sharma who won the Best Pattern Contest a few weeks ago!

Best of luck! 

Join The BizTalker-The Newsletter of BizTalkGurus.com

It has been over a year since my list issue of The BizTalker.  With all the excitement in the air about BizTalk in the cloud and AppFabric, I figured now is a good time to bring back the newsletter.  I am planning to send out a new issue monthly with the next one in just a few days.  I am reaching out to various 3rd parties to try to get some freebies to give away for future newsletters. 

In the next issue you will have a chance to win a copy of my new book plus an exclusive discount to order it online. 

If you are not a member of The BizTalker, sign up now at: http://www.biztalkgurus.com/newsletter/index.aspx

Server AppFabric for the BizTalk Developer Video Session

If you consider yourself a hard core BizTalk Developer, then this session is for you!

A few weeks ago I presented a session on Server AppFabric to the BizTalk User Group in Sweden.  This session was geared to showing how similar Workflow 4.0 and AppFabric are to BizTalk – conceptually at least.  The goal of this session was to show how us BizTalk guys and gals can quickly pick up Workflow 4 and AppFabric because we already understand the concepts.

I would highly recommend this 60 minute session to all fellow BizTalkers out there!

This session is available on Channel 9 – http://channel9.msdn.com/Blogs/MSCOMSWE/Tech-Overview-WCFWF-Server-AppFabric-BizTalk-Conference-Stockholm

The code and slides are available for download at http://www.biztalkgurus.com/media/p/29973.aspx.

At the same conference, I gave a session which covered Windows Azure Platform AppFabric.  This 30 minute session covers a real-world service bus solution and a walk through of the code behind the solution.  It is available at http://channel9.msdn.com/Blogs/MSCOMSWE/Pattern-5–Remote-Message-Broadcast-BizTalk-Conference-Stockholm and the code and slides can be downloaded at http://www.biztalkgurus.com/media/p/29975.aspx.

 

If you are looking for other sessions from the multi-day conference in Sweden, below is a full list.  We covered a wide-range of technologies from AppFabric to StreamInsight.

Day 1 (Sessions from September 8th, 2010)

Welcome and Introduction

Choosing The Right Tool in the Application Platform
Discuss the challenge of choosing the right technology for a given situation and present a decision framework for guiding evaluation.

Tech Overview: SQL Server
Look at the core components of SQL Server that are used to build applications (e.g. SSIS) and when to use them.

Tech Overview: BizTalk Server
Discuss what BizTalk is and when to use it.

Tech Overview: WCF/WF, Server AppFabric
Highlight key capabilities in WCF and WF and benefits offered by Windows Server AppFabric.

Tech Overview: Windows Azure Platform
Discuss Microsoft’s cloud offering and best usage scenarios.

Pattern #1 – Simple Workflow
Evaluate scenario that involves aggregating data from multiple sources and presenting a unified response.

Day 2 (Sessions from September 9th, 2010)

Pattern #2 – Content Based Routing
Consider options for effectively transmitting data to multiple systems that perform similar functions.

Pattern #3 – Human Workflow with Repair and Resubmit
Showcase using workflow 3.5 to send customer details to an AppFabric hosted workflow 4.0 Workflow Service.  This workflow service controls the payment collection process and allows for updated information on a user to be sent back into the same running workflow instance from SharePoint.

Pattern #4 – Cross Organization Supply Chain
Evaluate how to build a supply chain to integrate systems in a PO scenario.

Pattern #5 – Remote Message Broadcast
Demonstrates a scenario where a traditional polling solution is augmented to support real-time updates.

Pattern #6 – Complex Event Processing
Addresses click stream analysis and creating actionable events from user and system behavior.

Got the Best Missing Enterprise Pattern? Win A Copy Of Applied Architecture Patterns on the Microsoft Platform

Packt Publishing has given me a few copies of my book “Applied Architecture Patterns on the Microsoft Platform” to give away on BizTalkGurus.com.  Over the next few weeks, I am going to have a few contests.  The book is a $60 value and I will cover the shipping costs to the winner anyplace in the world as long as the US Postal Service ships there.

Contest #1 – Below are the architectural patterns covered in our book.  We started with a much larger list and cut it down to what we thought were the top 13 used in the enterprise.  Besides the 13 listed below, what is another pattern commonly used in the enterprise?  

How to Enter: 
Simply add a comment to this blog post with your pattern idea to enter!  Ensure you are a registered BizTalkGurus.com member so I know your email address if you win OR send an email to [email protected] after you post your pattern.   Please ensure you see your pattern show up as a comment on this blog.  Due to spam blocker and caching – it might take up to 24 hours.  If all else fails, just send me an email.

Entries must be received by 11 PM Monday November 1st Central Standard Time.  The winner will be announced a few days later.

The fellow authors and I will review the suggested patterns and what we determine to be the “best missing enterprise pattern” will win a free copy of our book.  Who knows, you might even see it written up later on if we release an update to the book.

 

Included Patterns

  • Simple Workflow. Covers a use case that involves aggregating data from multiple sources and presenting a unified response.
  • Content Based Routing. Looks at how to effectively transmit data to multiple systems that perform similar functions.
  • Publish-Subscribe. Addresses a scenario where a message must be reliably sent to multiple endpoints.
  • Repair/Resubmit with Human Workflow. Builds a process for easy human interaction with failed messages inside a system.
  • Remote Message Broadcasting. Demonstrates a scenario where a traditional polling solution is augmented to support real-time updates.
  • Debatching Bulk Data. Explains how to take giant sets of data and insert them into databases for analysis.
  • Complex Event Processing. Addresses click stream analysis and creating actionable events.
  • Cross-Organizational Supply Chain. Demonstrates how to build a supply chain to integrate systems in a PO scenario.
  • Multiple Master Synchronization. Covers methods for arriving at a single version of truth from multiple, often conflicting master data sources.
  • Rapid Flexible Scalability. Looks at creating temporary environments that can be easily created and deleted as needed.
  • Low Latency Request-Reply. Contains a retail scenario where high performing query services are established.
  • Handling Large Session and Reference Data. Discusses usage of distributed caching to scale large workloads in web applications.
  • Site Load Burst and Failover. Looks at leveraging Windows Azure platform elastic resources and high SLA for building a low TCO solution.
  • Best of luck!  Of course if you do not win a free copy of the book – the book is available on Amazon.com and PacktPub.com.

    Looking for more information on our book?  Read a sample chapter online Chapter 12 Debatching Bulk Data or watch The Story Behind The Book on YouTube.

     

    Book Sample Code, Our Commercial, and Repair & Resubmit Solution Video

    I have posted online all the sample code from my book, “Applied Architecture Patterns on the Microsoft Platform”.  You can download it at http://www.biztalkgurus.com/media/p/30260.aspx.  This code contains various samples using BizTalk, BizTalk ESB Toolkit, Server AppFabric, SharePoint 2010, .Net 4.0 Workflow, SQL, Stream Insight, Azure, SQL Azure, Platform AppFabric Service Bus, Server AppFabric Caching, and more.  Of course, you will get the most benefit of this code using it alongside with the chapter of the book that walks through it. 

    The book is available now on Amazon.com and PacktPub.com. 

    Thanks to our friends in Sweden we now have a Commercial for our book!  I have not seen many commercials for Technology books, but this video gives some context of the “why” behind our book.  You get to hear from Richard, Ewan, and myself about why we wrote the book and why we picked to release the book at the European BizTalk Conference in Stockholm, Sweden to a room full of top notch, hard-core BizTalk people.

    This video is available at http://www.biztalkgurus.com/media/p/30247.aspx and on YouTube. 

     

    If you are looking for more detailed information on the types of solutions covered in the book, I have put together a video walking through Chapter 10 – Repair and Resubmit with Human Workflow.  This solution uses SharePoint 2010 to store customer information.  This information is processed by a .Net 3.5 workflow that sends the data to a Server AppFabric hosted .Net 4.0 workflow service for processing. 

    This video is available at http://www.biztalkgurus.com/media/p/30249.aspx and on YouTube. 

    Enter To Win a 1-Year MSDN Subscription

    I have an MSDN Subscription voucher to give away!  The voucher is good for Microsoft Visual Studio 2010 Ultimate with MSDN subscription and will give you access to many Microsoft products for 1 year.  This is a great benefit to anyone doing development and I believe it now includes monthly time on Azure and Platform AppFabric.

    The software is good only for development and testing purposes and this subscription is Not For Resale. 
    I will be having a drawing for the voucher on Sunday, October 10th, 2010 at 10:00 PM CST. 

    How to enter:

    • Ensure you do not already have an MSDN subscription – this will not do anything for you in that case
    • Email, post to Facebook, or by any other means possible get me a picture or Link to a picture of yourself holding a copy of my new book – Applied Architecture Patterns on the Microsoft Platform or just a picture of the book will work as well.  It must be clear this is a picture of the book and not a digital image of the cover. 
    • Email to <CONTEST CLOSED>
    • If you already bought the book and have not received it yet – simply take a picture of the invoice or forward the invoice to the above email address.
    • No purchase needed to enter.  You do not have to buy the book – if you can find it in a book store or have a friend that owns it that works.  If you can not find a physical copy of the book any place, simply take a picture of the book page on Amazon or Packt website and use that picture to enter.
    • All entries may be posted to this website so keep that in mind when entering.

    The winner will be announced on my blog shortly after the drawing and of course I’ll be posting the picture!
    I will email the winner the Registration Key for the MSDN Subscription.

    I will email the winner the Registration Key for the subscription.  This is subject to all the Terms and Conditions of the MSDN Subscription that may have geographical restrictions or other limitation.

    Want more information about the book?  Read a Sample Chapter online at Chapter 12 Debatching Bulk Data or check out the book page on Amazon.com or Packt.

    European BizTalk Conference AppFabric and Workflow 4 Session Slides and Code Downloads

    In early September 2010, I got the honor to present three sessions on AppFabric and Workflow 4.0 to the BizTalk Users Group in Sweden at the European BizTalk Conference. While my sessions were not related to BizTalk, they are designed to show how easy it is for someone with BizTalk skills to learn AppFabric and Workflow 4. 

    I have posted the session slide decks and sample code (including the code generated from my 100% LIVE demo). 

    I did three sessions:

    • Server AppFabric and Workflow 4.0 Overview – This includes some slides on AppFabric strengths and weakness compared to BizTalk and shows how simple it is to set up Correlation in Workflow 4.

     

    • Server AppFabric with Human Workflow – This uses SharePoint 2010 and Workflow 3.5 with AppFabric and .Net 4 Workflow (Chapter 10 from my book) to allow data to be corrected and resubmitted to the same workflow process.

     

    • Platform AppFabric with Remote Message Broadcasting – This talks about using Azure Platform AppFabric to broadcast messages through the Service Bus to destinations on numerous networks (Chapter 11 from my book).

    The video recording of the sessions should be available soon and I’ll post the links once I have them.