Performance Impact - Message Creation

Hi all,

I have a general question about the performance of BizTalk when using external helper classes to generate messages.

This question is pertinent only for messages that are at max 30kb in size, nothing huge. I.e. i understand for large message streaming is important and is made defunct if attempting to load the message into a typed object, or vice-a-versa.

So, for my schemas I created the relevant .NET classes using XSD.exe

Now, when I want to create a message, I do the following in the message assignment shape.

Code Snippet

VarMyMessage = MyHelpder.CreateMyMessage();

VarMyMessage.property = "somevalue";

MyMessage = VarMyMessage;

The question is, is this a good way of doign things? Is there a quicker/better way?

The same is true for incoming message. I like to convert them into the typed .NET Class (if I am going to need them during the orchestration) so that I no longer need to use distinguished/promoted fields, and can do actions like get a count on a repeated element.

Is this a bad mantra to follow? Any advice appreciated.

With kind regards

TM

[1298 byte] By [etones] at [2008-1-9]
# 1
Hi,
Are you going to use this transformation to work with elements of the messages?
The BizTalk has the special functionality to effectively doing this. Using it you don't have to bother about productivity, size of the message etc.
There are mapping, distinguished parameters, xpath.
You approach is kinda using a bike tire on the Freightliner truck. You'll spent a lot of time for this and get anything helpful.

--

Regards,

Leonid Ganeline
BizTalk Solution Developer [MVP]
-
Microsoft Certified Technology Specialist: BizTalk Server 2006
http://geekswithblogs.net/leonidganeline/

LeonidGaneline-MVP at 2007-10-2 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 2

Well, I tried something like that and It worked perfect for me. I tried to use the "xsd.exe generated class" to deserialize the message. the message's size was about 10Mb and it worked better than maps and xpath(in performance I mean). So you need to decide the time you spend to program it VS the performance goals of your project.

Regards,

AG

AlbertoGarcía at 2007-10-2 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 3
Yes, you are right.
In one my project I receive data from FTP and save it to the DB in small method in a helper class. Then call this class from orchestration. Do not create the SOAP and SQL ports and all those stuff. Why not, if we don't need the BizTalk features.
BizTalk is great in mapping, for example. I prefer mapping in BizTalk then in SQL or C# code.
But, for example, in most cases the primitive data type transformations in Xslt (on the schema-map level) are awful.
Etc. etc.

In your case if you've got hundreds of messages in one batch, I'm not sure that BizTalk would be slower then proprietary code.

Regards,
Leonid Ganeline
LeonidGaneline-MVP at 2007-10-2 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...