Real-life experiences gained on cutting edge BizTalk projects from the City of London.

Monday, February 28, 2005

Performance tip: Parallel vs. Atomic sends

So, you want to send two messages at the same time and want to do it the most efficient way possible. You use a parallel shape and have two threads kicking off mutiple sends? You could do, but is there a better way?...

See the diagram below with one approach on the left and one on the right...


Parallel vs Atomic multiple sends Posted by Hello

There is a cost with spinning up the separate threads, plus an additional persistence point after each send, which means that using an atomic scope is more efficient. This is because the atomic scope batches up the sends until the end of the scope is reached. The messages are sent within the context of the atomic scope's persistence point so there's less database round trips...

Try it and see....

0 Comments:

Post a Comment

<< Home