Monday, December 13, 2004

Envelopes pt 3

Stephen Thomas has posted an extremely comprehensive guide to de-batching of collections, which should be compulsory reading for anyone attempting this. I'm very pleased to see that his hard-work has confirmed my own gut-feeling, which suggested that Xpath debatching would be more suitable for small collections, whilst pipeline envelope processing would be the most performant.

This is exactly what we've already gone with using xpath within orchestrations where batch sizes are no more than 10 records, with envelopes for the rest.

Re. the envelope-mapping issue, well we're lucky, as our source batches are collections returned as web service responses, so having to apply a map within the orchestration is a no-brainer.

Our current implementation, for large batches, is therefore:
1. Consume web service which returns large collection response.
2. Map response to an envelope schema within the orchestration.
3. Send the envelope message out through a passthru pipeline.
4. Receive the envelope through an Xml pipeline, et voila - you have individual messages.

(Remember - the specific issue that the map solves is the injection of single instance 'header' data into each record. The mapping / orchestration are not required for simple record de-batching.)

No comments: