On 27 May 2008, at 20:27, Asankha C. Perera wrote:

Hi Bob
We are currently investigating options for migrating our existing
software solution towards an ESB, with a particular emphasis on
asynchronous IO.

Our system is essentially a switching router, accepting requests over
HTTP(S), and routing them to an appropriate service-provider.
Communication to these third-party providers is via TCP socket
request/response.

We are looking to maximise concurrency; by far the bulk of our
round-trip time is currently spent waiting for responses from these
3rd parties, so we are keen to replace our current process-per-child
model with one based on an asynchronous core, and Synapse is one of
the frameworks being considered.

Synapse already has a non blocking http/s implementation using Apache HttpComponents-HttpCore/NIO, which gives it great performance.
However, my initial investigations suggests that there is not
currently a plain old TCP socket transport available.  Can somebody
please confirm/deny this?

There was an initial raw TCP transport available with Apache Axis2, but I have seen Andreas committing a better TCP/UDP implementation using NIO being checked into the Synapse trunk in the last few weeks. Thus, the combination of these two non-blocking transports will get you what you are looking for..


This is more credit than I deserve :-)

Actually I added two new transports: one for UDP and one to read from a UNIX pipe (aka named pipe, aka FIFO). The UDP transport indeed uses a non blocking approach, but it is a datagram transport in the sense that it reads the entire message into memory before starting to process it. The pipe transport uses file I/O and is blocking (there is no non blocking file I/O in Java). For various reasons it is actually also built as a datagram transport, i.e. it doesn't support streaming. Currently the only TCP transport implementation is the one from Axis2. Neither the UDP and nor the pipe transport implementation is useful as a starting point to build a TCP transport. Indeed, a good TCP transport should be non blocking and support streaming. Implementing this is a non trivial task as we learned from the problems with the HTTP transport (SYNAPSE-321).

Andreas

Reply via email to