Blog

.NET 3.5, Download, LINQ

LINQ Material

The presentation made available for download through this post is in swedish. The code however is “international”. First of I would like to list what I think are two of the best getting started with LINQ resources available online.



With that said, the material provided here is the LINQ presentation and demo code that I used for the LINQ presentation I held.


Presentation: The mechanics of LINQ.pptx (in swedish)
Code: linqdemo.zip

BAM, BizTalk, Download

BAM Poster available at Microsoft Download

The BizTalk Team announced that a new poster, the BAM poster, will see the light of day. I really like the posters that have been released as companions to the BizTalk Server documentation. I’m not really the graphical guy, at least not when it comes to creating graphics, but that doesn’t stop me from being just as critical as the next guy when it comes to reviewing graphics created by others 😉


For something that is said to “provide an overview of the entire BAM life cycle”, and since it contains other types of data flow, I would have liked to see something about partitioning and archiving. I see that as an important advantage of BAM, to get an thought through process for data handling out of the box. At least, that’s the story I would have added on top of what is in the poster if I would be explaining BAM to someone. Or is that to low level?

.NET 3.5, BizTalk, Download, LINQ

LINQ in BizTalk – Follow up

I’ve previously posted my ideas about using LINQ in BizTalk. At that point it was just theories, and following the links in the comments section of that post I wasn’t the first to have them. Thanks to the red bits/green bits approach BizTalk Server can use LINQ today by using Visual Studio 2008 side-by-side with Visual Studio 2005. This post provides a working sample that does just that – uses LINQ in BizTalk by utilizing a helper assembly, built using Visual Studio 2008 and the .NET Framework 3.5, from a BizTalk Server 2006 R2 Orchestration (built using Visual Studio 2005). If you do have both Visual Studio 2005 and 2008 available, and this doesn’t conflict with the rules of engagement you have as far as your environment goes, I think it’s worth looking at.


The sample consist of the following parts:




  1. A library project named LINQHelperLibrary, with a method that takes in a XLangMessage, extracts the stream, wraps the stream in an XmlReader and feeds that into the constructor for an XElement. Using that XElement a LINQ to XML statement is performed to extract the totalt amount of a Purchase Order document. This library is built using Visual Studio 2008 and the .NET Framework 3.5 compiler.


  2. A BizTalk project named BizTalkLINQ, that contains a generated xsd schema and a very simple orchestration with an expression shape that calls the LINQHelperLibrary and passes in the message, receives the response and outputs a Trace.WriteLine. This project has a reference to LINQHelperLibrary as well as (an explicitly added) reference to System.Xml.Linq.

The sample requires the following:




  • BizTalk Server 2006 (I used R2)


  • Visual Studio 2005


  • .NET 2.0 and .NET 3.5


  • I am including the dll built using Visual Studio 2008, but if you wan’t to build it yourself you’ll need Visual Studio 2008.

To run the sample do the following:




  1. GAC LINQHelperLibrary.dll. (If you want to build it yourself do so using Visual Studio 2008 first)


  2. Build and Deploy BizTalkLINQ.


  3. Configure the orchestration by assigning it a host instance, a receive and a send port (use the XML pipeline).


  4. Feed a Purchase Order document into the Receive Port. A sample file is included in the sample (in the BizTalk LINQFileDrop folder)  – it originates from Sample XML File: Purchase Order in a namespace.


  5. Optionally display the value returned by the helper assembly by using DebugView while it runs. If you don’t there really isn’t muc to see…

Note: This isn’t a LINQ to BizTalk implementation – implementing a provider for BizTalk is a totally different matter, this just uses LINQ to XML from within BizTalk.


Download: biztalklinq.zip

Administration, BizTalk, Databases, Maintenance

BizTalk database sizing statistics

In the hope that this might help someone who is tasked to estimate the size of BizTalk Server 2006 databases, I’m offering a few statistics.


These statistics comes from an engagement that uses very few orchestrations and more or less does messaging only – ie do all the work in pipeline components and/or maps. Just to give you a hint of the volumes we are talking about – here are some numbers from the beginning of May:








































AvgRecvKB


AvgSndKB


Count


Month


Day


812 


7274 


476 


5


1


479


4111


1130


5


2


970


10877


444


5


3


680


10328


357


5


4


443


3288


1114


5


5


Now we have only been doing the volumes specified in the above table for roughly two months, before that is has been smaller but incrementally increasing (it would too drawn out to give the full story). I know that gives you a somewhat incomplete background, but that’s just how it is. Here are the sizes of the base BizTalk Server databases (all figures are in MB).


































Database


Data


Log


Total


Free


BAMPrimaryImport


655


380


1034


637


BizTalkMgmtDb


46


43


87


44


BizTalkMsgBoxDb


253


556


807


758


SSODB


13


13


25


15


I guess I should also mention that we have the BizTalk backup jobs doing full backups on a daily basis, as well as trasaction log backups every 20 minutes, and the DTA purge and archive setup for 12 live hours and 7 hard days. We have roughly about 300 receive ports, 1000 receive locations and 400 send ports and 20 or so orchestrations. Regular BizTalk Tracking hasn’t been globally turned off, but is at a basic minimum. A BAM Tracking component does the real tracking as far as monitoring goes.


Do you have any statistics that you could perhaps share with me?

BizTalk, Functoids, Performance

Caching database functoid and throttling

In case you haven’t seen the Blogical.Shared.Functoids.ExecuteQuery, and the feature post at Mikael HÃ¥kanssons blog, it’s a cache enabled database lookup functoid – a revised version of a functoid that we have successfully used on previous projects, available for download on codeplex. Caching can greatly increase the performance of any solution. However BizTalk caching, as with all caching, has to be done wisely and with moderation. So be sure to test (and monitor) thoroughly for memory saturation so that you don’t hit throttling limits effectively bringing your BizTalk solution to a stand still. A good read that exemplifies the latter is this recent post by Yossi Dahan. Keep it in mind when using the functoid.