Identifying Unproductive Inventory and its impact on Financial KPIs in Retail Organisation

In my previous article, “Intelligent Demand Forecasting for Inventory Optimisation”, you would have understood the importance of building an intelligent demand forecasting on AWS cloud system to help…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




HTTP Pass Through Transport over HTTP NIO Transport

When requesting message comes from the client to the WSO2 ESB as we know initially it hits the transport so when we go deep into the transport there we know there are two interfaces implemented namely TransportListener and TransportSender. So TransportListener is responsible to receive and process the client request and TransportSender is responsible for process and send the response back to the client. wso2 ESB support no of transport in order to do establish better communication between the client and the back-end service

One of the Two Transports Supported wso2 ESB are

In Wso2 ESB 5.0.0 the default transport is HTTP Pass Through the reason is when comparing the HTTP Pass Through Transport and HTTP NIO Transport, HTTP Pass Through providing high performance.

So why to use the HTTP Pass Through Transport over HTTP NIO Transport?

1. What is happening when we use HTTP NIO Transport?

In HTTP NIO Transport the transport listener is HTTPCoreNIO. When a client request comes, It writes the message content to an input buffer. Then the message builder which is in axis2Engine read the content from the input buffer and build a object model which is XML based. This model is used in entire flow through the synapse mediation engine. Once the message reach to message formatter in axis2Engine it write that XML based object model as stream of byte in to a output buffer. Then the transport Sender in HTTP NIO Transport HttpCoreNIOSender read the content from the output buffer and send to backend server. Since there are two buffers engaged in this is called as duel buffer architecture.

2. What is the Drawback when we use HTTP NIO Transport ?

Since In HttpNIOTransport each and every client message request is written to buffer in message building and formatting it affect on the performance of the ESB.

3. What is the solution?

The solution is HTTPPassThrough Transport since it's based on single buffer and obviously it has been improving the performance of the ESB. The output buffer has been removed from the architecture and single shared buffer is used there.

4. What is happening when we use the HTTP Pass Through Transport?

PassThroughHttpListener create SourceHandler to receive client requests. Then it reads only the request headers not the body. Then by looking at the headers of the request Simply route the message.That is only the overview of HttpPassThrough Transport in deep there are several components involve to route the message to the correct destination.

When a message comes to the HttpPassThroughTransport It hits the PassThroughHttpListener it check whether the artifact is content aware or not if it is content aware then the message writes to the buffer and send to message builder in axis2Engine to create XML based object model and pass the request through the mediation engine and next to message formatter and then on demand it create an output buffer dynamically and message formatter write the message to the buffer. Then Transport Sender read the message from the buffer and send it to the back-end server.

If the artifact does not contain any mediators which support content awareness, then the client request message should not be built and formatted then it skip the message builder and formatter then message directly go through the mediation engine and send to the back-end server.

5. How to switch from HTTP Pass Through Transport to HTTP NIO Transport?

For more information, please refer

Add a comment

Related posts:

Fantasy Movie League

There comes a point in a game where you know you can’t really win. When it comes to that point the question you have to ask yourself is whether you are going to nibble away to keep it close, or take…

No More Birthday Resolutions

I have a resolution that I always set it on the new year, my birthday, … and almost always I have failed to follow it. Guess what? Yes weight loss. Apparently, weight loss is one of the most failed…

I Was Born Late in Life

I was born late in life Destined to walk a path only I could see Searching for my voice Wanting to be heard but I had nothing to say, though that never stopped me from screaming to the world I was…