Saturday 25 August 2007

Call Orchestrations And Direct Bound Orchestrations

The interactions among different orchestrations is a very vital decision that needs to be taken at design time. Usually we tend to go for message box driven direct bound orchestrations which enable us to have a modular development and also allows external components to dump the message to message box without caring for the external component to be invoked. This approach has its own cost that the up and down trip to the message box is done for every single orchestration call. Lets consider a scenario that there are two orchestrations orchA and orchB. Both of them needs to be exposed to the external world and hence have message box driven ports. Both of these orchestrations are part of the same biztalk project.

All of a sudden, a need arises that orchA needs call orchB 5 times within a loop. For this type of scenario, if we use the direct bound port of orchB, there are total 5 * 2 = 10 trips to message box in a request response scenario. This in turn becomes highly expensive calls. The number of persistence points becomes very high because of the presence of send - receive shapes within the loop as per the figure given below.


These expensive calls may be avoided by providing another entry point to the internal orchestration by my moving the entire logic in orchB to an internal callable orchestration.
This is in turn is being called from the previous existing orchestrations for serving the purpose of message box driven direct binding and can be internally called by the local orchestrations directly without using direct binding. This also leads to no deviation from the current design and architecture. The above implementation can be changed as the figure given below.



The orchB needs to be changed from FigA to FigB.



Fig A.



Fig B.