Thursday, December 21, 2006

Identify Persistence Points

Possible Questions:

1. What is Persistence in terms of biztalk?
The process of saving your running orchestration state at certain point is called persistence, in other words storing the state into Biztalk database.
2. What is Persistence Points ?
Events or stages, which triggers the persistence operation called persistence points. (i.e) Persistence points are those points in the orchestration that save the orchestration state to the database.
3. When do the event/trigger occurs to save the orchestration ?
Usual Scenario:

1. At the End of the Transaction Scope (Either atomic/Long Running) like SQL Commit
2. At the End of Orchestration like DB Close
3. Send Shape if not in Atomic Scope
4. Invoking a new process/orchestration using Start Shape
Unusual Scenario:
1. When an Orchestration Instance is suspended
2. When the system shutdowns in a controlled manner
3. When the engine determines it wants to dehydrate

4. Identify the number of peristence points in the following Biztalk orchestrations.

ODX1: Two send shapes being executed sequentially in the orchestration.


As per our theory, the two send shapes will have one persistence points each and
the end of the orchestration will have one persistence point. So totally , I guess it to be 3. But I was wrong, since the send shape is the last shape in the orchestration, the peristence point of the send shape and end of orchestration will be dispatched together. So the persistence point for the above ODX1 is 2.




ODX2: Two send shapes being executed sequentially in the atomic sh
ape.



As per our theory, Since the two send shapes are in the atomic scope, we don't have seperate persistence points rather they have a single persistence points at the end of the scope. Also When we note keenly, we could realise that the scope is the last shape, hence the persistence point for the scope and the end of the odx will be batched together. So this odx has only one peristence point.







ODX3: Two send shapes within a Parallel shape.

Biztalk by nature executes them in a sequential manner. Parallel branches do not necessarily mean they are executed on separate threads. Hence, even in this case, it results in sequential execution with two persistence points. Infact, in this case, the persistence point will not be batched with end of the orchestration and hence it peristence point is 3.






ODX4: Other Scenarios


A. No Persistence point, since the send shape is wrapped up in atomic scope.

B. Atomic scope end persistence

C. Start orchestration persistence

D. Break point persistence

E. Send shape persistence; note the send shape out of atomic scope.

F. End of orchestration persistence.

Totally , Its 5.
Hope the samples has helped you identify the peristence points.
5. Is there a tool to identify the persistence points in an orchestration ?
Yes, its the performance counters.
6. How to view the Performance Counters?
1. Go to the Start Menu and Select Run
2. Type in: perfmon and Enter
3. Performance Window should open up
4. Click on the + inside the window (or Ctrl-I)
5. Under Performance Objects, Select XLANG/s Orchestrations (note your host must be running)
6. Select the Counters from the list you want to watch, then press Add. You can get information on each by clicking on Explain.
7. Run your Orchestrations

No comments: