INFOSYS – BizTalk 2006 Performance Benchmarking Report

Mick Badran just reminded me of a new BizTalk Benchmarking Report that was released by INFOSYS this month comparing performance accross:

  • BTS 2004 SP1 with SQL 2000 SP3
  • BTS 2006 SQL 2000 SP4
  • BTS2006 SQL 2005

I have posted the report to my OFFICEISP hosted site. Check it out at your convenience.

http://cjv.officeisp.net/biztalk/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2fbiztalk%2fShared%20Documents%2fWhitepapers&FolderCTID=&View=%7b62310491%2dB568%2d4DFB%2d9F73%2d448028BF2812%7d

Another New BizTalk 2006 Book Available

Another new BizTalk book is now available from APress.

This book, Pro BizTalk 2006, published by APress and written by George Dunphy (works for Microsoft Consulting Services) and Ahmer Metwally (works for Microsoft) is described as a high-end resource based on real feedback from developers.  It covers topics not covered well in other BizTalk books like performance tuning, scalability, and administration.

Amazon.com also has a package so you can get both the Pro BizTalk 2006 book and the BizTalk 2006 Recipes book for one price. 

Lots of other great BizTalk Books coming around the corner as well… 

One reason why to created your own WorkflowLoaderService

One reason why to created your own WorkflowLoaderService

Harry Pierson was in my WF/WCF course I taught a few weeks ago.  He posted on his blog about features he thought were cool in WF here.

One of the ones that I thought was interesting that he caught during my course was
that the WorkflowLoaderService is actually a pluggable service (just like every other
service except for the WorkflowQueueingService).   So of course it came
to my mind to show an example of why you might want to create a custom loader service.

The WorkflowLoaderService is a very simple API – it has two methods name CreateInstance
both which return an instance of Activity.  Everytime a Host calls WorkflowRuntime.CreateWorkflow
– the WorkflowLoaderService is called to actually create the instance.  One of
the CreateInstance methods is for compiled Activities (the one that takes as its argument
a Type) and one for XAML activation (the one that takes as its arguments two XmlReaders
– one for the workflow and one for rules).

The DefaultWorkflowLoaderService is fairly simple – the CreateInstance that takes
a Type uses Activator.CreateInstance to create an instance of the Activity Type. 
The one that takes XAML is slightly more complex – but essentially uses the WorkflowMarkupSerializer
to turn the XAML into an Activity.

So why might you want to replace this service?  Well – there are many scenarios
– but one that always comes to mind for me resolves around rule loading. 

One of the great features of WF is to be able to model some of you logic in rules
versus code.  In Visual Studio – whenever you add rules, those rules are stored
in a .rules file along side your workflow files.  These .rules files are then
compiled into the assembly as resources.  Whenever an Activity first needs a
rule, there is an infrastructure that loads the .rules file into a RuleDefinitions
type (containing both any RuleSets and RuleConditions) – and stuff the object into
a well-known DependencyProperty in the root Activity.

One of the features of rules that is so useful is being able to replace them at runtime
with a different set of rules – but with the DefaultWorkflowLoaderService – the only
way you can do that is if you use XAML activation.  But what if you want to replace
rules on a compiled Activity type without having to recompile it.  The default
infrastructure doesn’t allow this.

But – if you build your own WorkflowLoaderService – when a compiled Activity type
is requested – you could read the rules from an alternate location (based on configuration
or some other algorithm) and then dynamically create the RuleDefinitions and stick
it into the Activity using the well-known DependencyProperty.  Here is the code
that does this in a simulated way (note that you’d have to change the algorithm that
loads the alternate rules to something useful):

public class DynamicRuleWorkflowLoader
: DefaultWorkflowLoaderService
{
protected override System.Workflow.ComponentModel.Activity
CreateInstance(Type workflowType)
{
Activity a = base.CreateInstance(workflowType);
WorkflowMarkupSerializer s = new WorkflowMarkupSerializer();
object o = s.Deserialize(XmlReader.Create(“AlternateRules.xml”));
a.SetValue(RuleDefinitions.RuleDefinitionsProperty, o);
return a;
}
protected override Activity
CreateInstance(System.Xml.XmlReader workflowDefinitionReader, System.Xml.XmlReader
rulesReader)
{
return base.CreateInstance(workflowDefinitionReader,
rulesReader);
}
}

Dallas BizTalk User Group Information

If you live in the Dallas, TX area and are interested in Microsoft BizTalk Server then the Dallas BizTalk Users Group is for you!

Tim Rayburn and others are working hard to get things started.  I never knew how much work it was to set up a new users group!

The first meeting is scheduled for Monday, November 13th, 2006 at 6 PM at the Microsoft campus in Las Colinas. 

If you are interested, please register on the user group web site at http://biztalkusergroup.com

Hope to see you at the first meeting!

BTS2006 and SQL 2005 DOES perform better across the board – here’s performance details

Once again Andrew Leckie has sent through another gem – a performance document comparing
BTS04/SQL2000, BTS06/SQL2000 and BTS06/SQL2005. The tests were carried out by ‘InfoSys’
in the US – well done guys.

Some very interesting results

Grab the document here –

biztalk-2006-performance-benchmarking-Report.pdf
(674.5 KB)

Good stuff.

New BizTalk Users Group Forming in Dallas

If you live in the Dallas, TX area and interested in BizTalk then the Dallas BizTalk Users Group is for you!

Tim Rayburn and others are working hard to get things rolling.  I never knew how hard it was to set up a users group!

The first meeting is scheduled for November 13th, 2006 at 6 PM.  If you are interested, please register on the user group web site at http://biztalkusergroup.com

Hope to see you all at the first meeting!

Pro BizTalk 2006 Book Now Available

 

Another BizTalk 2006 book is now available on Amazon.com.

Pro BizTalk 2006 by George Dunphy and Ahmer Metwally is described as a high-end resource based on feedback from developers.  It covers topics like scalability, administration & performance tuning. 

I have not had a chance to take a look at this book yet, but it appears to cover some topics that are not covered well in the BizTalk help guide or in other books.

Amazon.com is also having a special so you can get this book along with the BizTalk 2006 Recipes  book for one low price. 

MsmqListenerService Concerns

MsmqListenerService Concerns

Jon
Flanders
posted a comment on my post
yesterday
about the changes in the new release of my MsmqActivities sample regarding
the new subscription persistence functionality. I was going to respond on another
comment, but I think this might be important enough to warrant its own post. Here’s
Jon comment:

I am still concerned about your approach (essentially another
persistence service to take care of). Especially in light of:

a) How will this work in a mulit-host instance environment

b) How will it stay consistent with the state of the workflow
itself (what if your service gets out of sync with the current state of the workflow).

Which is why I would prefer some system that used the metadata
of the activity instance itself – I would lean toward SqlPersistenceService.GetAllWorkflows
– which would allow you to get the activity metadata without having to load it into
memory. OTOH – this is only on the OOB persistence service.

Let me just start by mentioning that I actually share Jon’s concern about this approach
[1]. It is another persistence service to take care of and that brings up
a number of issues and potentiall problems with it.

Regarding point (a) Jon brings above, the answer is: it won’t work well, for
very obvious reasons. The primary one is actually related to how MSMQ itself works,
and that’s a significant limitation right there. If you have multiple hosts trying
to listen to the same queue, then things won’t really work very well. And, because
of this, using this in a “load-balancing” scenario with multiple servers hosting the
same workflows really wouldn’t work at all as expected.

Regarding point (b), yes, that’s actually my biggest fear. Hopefully, it is not something
that would happen too often (at least that’s what I think from my tests, I could be
wrong) but it is definitely a possibility.

I’m going to be frank about this and say that right from the start I didn’t want to
have to implement something like this; it just feels wrong. I looked for other options
but I just didn’t see anything obvious that would work and at least workaround the
underlying issue.

My MsmqActivities have been a wonderful tool for me to understand a lot of concepts
of WF. It’s obvious that in many ways they are “toys”, but precisely because of the
requirements they impose they make, IMHO, a good sample to understand a
lot of the implications of writing a full-fledged custom event activity that
doesn’t use the built-in services (i.e. HandleExternalEvent).

Jon proposes a good idea, and that’s trying to avoid having to do the external persistance
of subscriptions in the first place and instead trying to rely on getting the necessary
information to recreate the subscriptions from the workflow instances stored by
the workflow persistence service. I’ll explore this option further, but I do have
my reservations if that information will be enough to get all information needed to
recreate the subscriptions (including recognizing in which scenarios an activity is
found that would have the subscription active or not). Thinking a little bit further,
it brings a good question to the table: Will the instance state stored by the
workflow persistence service be enough to satisfy all kinds of activities depending
on external services?

A few days ago Jon made an excellent observation: That these kind of issues are solved
in a very elegant manner by the BizTalk Message Box design, and I fully agree with
this. The Pub/Sub engine in BizTalk, together with the comprehensive concept of Application
and Isolated Hosts gives a lot of power to BizTalk and makes a really strong and powerful
foundation for solving this kinds of problems. This is because it provides a clear
way to decouple the workflows (i.e. the orchestrations in the current incarnation)
from the external services feeding data and events to them (receive ports and locations),
while at the same time providing a unified storage mechanism to keep track of the
state of all of them.

This is why I’m so looking forward to when WF and BizTalk get integrated; as it will should
make possible to have the best of both worlds together.

[1] I was going to mention some of this on my original post, but
I totally forgot, sorry!

>

Upgraded my Atlas (ok now ASP.NET Atlas) Workflow Monitor

Upgraded my Atlas (ok now ASP.NET Atlas) Workflow Monitor

Since they’ve release beta 1 of ASP.NET AJAX (formerly known as Atlas) – I have to upgrade all my Atlas samples.  The first one I decided to tackle was my Workflow
Monitor
– since it was totally based on the Atlas server-side model (no custom
javascript).   It literally took me about 10 minutes – thanks to the

Migration Guide.  
I’m a little suprised actually that xml-script isn’t making it into the base product
(it’ll be supported as part of the community CTP).  I guess I can understand
the reasoning – but it IMO was one of the coolest things about Atlas in terms of hooking
non ASP.NET 2.0 devs.   

Link is the same – AtlasWorkflowMonitor
(318k)
 – note that you have to have installed ASP.NET AJAX from http://atlas.asp.net this
time (in earlier versions you could have the atlas dll in your bin directory – now
they are loading it from the gac).

escape characters for HL7 messages

Since this has come up a couple of times, I decided to publish the escape characters for an HL7 message:

\H\ start highlighting
\N\ normal text (end highlighting)
\F\ field separator
\S\ component separator
\T\ subcomponent separator
\R\ repetition separator
\E\ escape character
\Xdddd\ hexadecimal data
\Zdddd\ locally defined escape sequence

The escape sequences for field separator, component separator, subcomponent separator, repetition separator, and escape character are also valid within an ST data field.

No escape sequence may contain a nested escape sequence.