Monday, April 26, 2010

Message aggregation with Streaming!

We've just published an article about two of the samples that ships with the UltraESB on advanced message cloning and aggregation with streaming. This was triggered by a real user who was attempting to write this logic on their own, as most - if not all - ESBs did not support it a month back!

We've taken the challenge and delivered the first results within a few days, supporting streaming. Then we developed support for timeouts and completion of partial responses as well all within a couple of weeks.

Read the complete article here

The complete samples (i.e. sample #211 and #212) now ships with the UltraESB, and the ToolBox GUI can be used easily to test these in 5 minutes. The UltraESB also ships JUnitPerf unit tests to load test these examples along with the source for users to play and extend them.

Brief introduction to the scenario
The scenario simulates multiple concurrent users issuing JSON requests of the form given below, with a request to multiply two variables v1 and v2, along with a text message:

{ "message" : "hello world, I am client N!", "v1" : 100, "v2" : 300}

There are three backend service endpoints servicing such JSON requests, but each expecting a slightly different message format. Thus each such message by a user must be cloned and transformed into a format suitable to each destination backend systems In this example, the format expected by the backend services are:

{ "prefix_for_Server " : "Hello Server  - hello world, I am client N!", "v1" : 100, "v2" : 300}

Each backend JSON service responds to such a request within a random delay of 1200ms as follows, adding a "result" as v1 * v2:
{ "prefix_for_Server " : "Welcome to Server ", "v1" : 100, "v2" : 300, "result", 30000}

These responses now needs to be aggregated and sent back to the client as one single message, where each <part i> for i=1,2,3 denotes a response as shown above.

{ "merged": [ <part 1>, <part 2>, <part 3> ]}

I would like to challenge any other Open source or Commercial ESB vendor to try to simulate this scenario too and share a link!

No comments: