Important hotfix if you are running in OutOfMemoryException with Orchestration Host

I have seen many BizTalk customers running into OutofMemory Exception while calling a map from inside the Orchestration, so I thought this blog post should help.

Typically, this happens when we are calling a map from inside the Orchestration and the map is inside a large assembly. This was a known issue and was documented at http://support.microsoft.com/kb/918643

“The System.Policy.Security.Evidence object is often used in transforms and can consume much memory. Whenever a map contains a scripting functoid that uses inline C# (or any other inline language), the assembly is created in memory. The System.Policy.Security.Evidence object uses the object of the actual calling assembly. This situation creates a rooted object that is not deleted until the BizTalk service is restarted.

Most of the default BizTalk functoids are implemented as inline script. These items can cause System.Byte[] objects to collect in memory. To minimize memory consumption, we recommend that you put any map that uses these functoids into a small assembly. Then, reference that assembly.”

So for example if you have got the map inside a 10 MB Assembly, it will always create 10 MB System.Byte[] objects in the memory and you can imagine how quickly you could run into the OOM Exception if you are on a 32 bit environment. Earlier only workaround was to put map in the small assembly but if you are not able to split the maps and other artifacts by different project, then the good news is that this issue is fixed in http://support.microsoft.com/?id=975118.

This hotfix has been released for BizTalk 2006, BizTalk 2006 R2 and BizTalk 2009. Also, this hotfix is part of BizTalk 2006 R2 SP1.

I have seen that this hotfix improves memory utilization by the orchestration hosts. This also helps increase performance and stability of the BizTalk applications. If you haven’t got this fix as of yet, I will highly recommend to apply this fix ASAP.

TechEd Session Links

For those of you that attended the “Real World SOA with .NET and Windows Azure”  TechEd session that John deVadoss, Christoph Schittko and I did last week, I discussed the following reference architecture:

 

 

I didn’t have time to do a demo/walkthrough during the session, but as I mentioned, recordings are available:

  • The first video, which focuses on the on-premise side in detail, is available here
  • The second video, which focuses on the Windows Azure AppFabric relay aspect and how to implement it, is available here (note that this is #1 of 3 there are three videos and corresponding blog posts in this series that cover bridging between on-premise BizTalk and Windows Azure)

Thanks all that attended, we had fun, and the feedback has been great.

Pluralsight is giving an iPad to one lucky TechEd attendee

Pluralsight is giving an iPad to one lucky TechEd attendee

At Pluralsight, we just released all of our .NET training videos for the iPad. If you’re a subscriber, you can get them now.

Last week at TechEd in New Orleans, we gave away 1000 complimentary subscriptions to the Pluralsight On-Demand! training library. It’s a white plastic card that looks something like this:

PromoCardImage 

If you activate this card by 6/18 (next Friday), you will receive a 2-week subscription to our training library and you’ll be automatically entered to win a brand new 64 GB iPad sitting here on my desk (unopened). The winner will also receive a 1-year Professional subscription to Pluralsight On-Demand!, which makes it possible to fill up your the iPad with our .NET training courses.

We will announce the winner on 6/21. Will we announce it on Twitter (follow @pluralsight) and email the winner.

Don’t forget to activate your card – it only takes a few seconds. Instructions are on the back.

Aaron Skonnard’s TechEd NA 2010 Session Demos

Aaron Skonnard’s TechEd NA 2010 Session Demos

TechEd North America 2010 is a wrap.  You can grab the demos from both of my sessions here.  Hope you enjoyed them.

Feel free to connect with me on Twitter (@skonnard) to stay in touch after the event.  Also, I’ll be posting a bunch of pictures from the week to the Pluralsight .NET Training page on Facebook.

One of my favorite experiences from the week: we ran into a street band while walking back to the hotel one night, they were jamming New Orleans style and everyone was watching this little girl dance away. Awesome.

IMG_2118

Another Database Option – MongoDB

It’s been far to long since I’ve talked here about what I’m working on, so it is time to correct that.  I’ve been working with a client who has some very unique business requirements, and one of them deals with a lot of flexibility of their data storage.  As such we were looking into different types of storage, because while SQL Server is in fact a wonderful product, it is not known for its flexibility of storage.

This quest led us to the door of a large number of databases in the “No SQL” arena, and eventually to MongoDB.  MongoDB is a document database, which stores what can best be described to the .NET Developer as a Dictionary<string,object>.  This structure allows for nesting of structures (where the object stored is another Dictionary) and is a very clever structure if you ask me.  But, document databases do not work like relational databases.  There are several important things you need to realize:

  1. Documents databases do not generally support the concept of JOINS.  If you retrieve data, and it refers to other data, then you need to make another call to the database to retrieve that data.
    • This leads to the core concept of preferring to embed (in the dictionary) data rather than refer to data.
  2. Document databases do not generally support a defined structure, they do not have tables but rather “collections” which have no definition in the database.  It is perfectly valid for one entry in a collection to have a key “dateOfAccount” which is a string type, and another with that same key as a date.
  3. Document databases do not include a validation structure, any validation of the data (including structural data as noted above) must be enforced by your application.

In the world of .NET there are several drivers, but the one my team, David O’Hara and Craig Neuwirt and I, decided on was MongoDB-CSharp.  They have just released version 0.9 beta 1, which moves the driver a lot closer to a familiarity level for most .NET developers.  Now we had to address on our project all of the above problems, and key to us doing so has been a component called DictionaryAdapater from the Castle Project.  But that is a topic for another blog post.