Friday, February 17, 2012

Cost of re-using Dialogs - Why recycle them?

After lots of testing I have found that re-using dialogs improves performance significantly, however I cannot fathom out what is the cost of re-using them. Performance does not come for free hene why I feel there is a cost. Can anyone shed any light on the cost of re-using dialogs? Also why should you re-cycle them? What benefits does recycling dialogs have?

Many thanks

David

If your message exchanges map a business transaction, then the benefits of individual dialogs (mainly precise error semantics per business transaction) are not to be neglected. If you just push data from one site to the other (replication like) then reusing/recycling dialogs is the way to go.

The main cost is the complexity of code (more difficult to get right, to maintain, more bugs etc etc).

Recycling dialogs is needed to minimize the cost of 'loosing' one dialog. Dialogs can error, because of application bugs (eg. a badly formatted XML payload), because of human administrator error, because of hardware failures (backup back in time with to data loss). When a dialog is errored, there is the potential of a large queue of pending messages to be still not transmitted and in the sender's sys.transmission_queue to be lost, or at least to have to to be re-transmitted (app code has to read sys.transmission_queue and re-send them on a new dialog). Periodic re-cycle of dialogs minimizes this potential.

No comments:

Post a Comment