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!

Monday, April 19, 2010

Using the UltraESB to proxy and load balance requests to Tomcat

Here is a complete article that describes how the UltraESB can be used to proxy requests between multiple Tomcat instances with load balancing and fail-over using sticky sessions. The mediation.getJvmRoute() API call makes it simple to query the Tomcat jvmRoute when using a JSESSIONID cookie or a jsessionid path segment. This value can then be used to load balance with fail-over between multiple instances of Tomcat.

http://bit.ly/aZL4sU

Wednesday, April 7, 2010

Replacing an F5 and its iRules with the UltraESB

A user will soon be replacing an F5 Big IP with the UltraESB by re-writing the iRules as mediation logic. This creates a proxy service that will intercept all requests using the url pattern "*", and then use cookies for routing into two backend server pools where the load is split between two federated groups. This incidentally allows them to also replace Apache servers used to front the Tomcat servers.

The complete configuration used is along the lines of the following;

<u:proxy id="web-proxy">
    <u:transport id="http-8280">
        <u:property name="url" value="*"/>
    </u:transport>
<u:target>
    <u:inSequence>
        <u:java><![CDATA[
            String pool = mediation.getCookie(msg, "POOL");
            if ("TWO".equals(pool)) {
                mediation.sendToEndpoint(msg, "ep2");
            } else {
                mediation.sendToEndpoint(msg, "ep1");
            }
        ]]></u:java>
    </u:inSequence>
    <u:outDestination>
        <u:address type="response"/>
    </u:outDestination>
</u:target>
</u:proxy>