On 9/21/06, James Bradt <[EMAIL PROTECTED]> wrote:
Hello all,

Another simple question.

Does anyone know if a simple tcl socket binding component exists?  I have
the requirement to talk to some low-level devices that only communicate at
this level (open connection, send data, receive data, close connection).

What I was thinking of is something that would just takes the body of the
normalized message and send it out the tcp socket.

James,

There was a message about a basic TCP component back in May here:

http://www.nabble.com/Re%3A-Basic-TCP-component-p4360825.html

But I'm not sure if this guy ever finished it as there was never any
contribution to the ServiceMix project. Also note that the example
code that was posted was far from being comprehensive - it was very
basic. I encourage you to read the whole thread, especially the points
made be Guillaume.

FWIW, implementing a comprehensive component that speaks TCP sounds
easier than it really is. Consider the fact that dealing with a
protocol as well as proxies and security alone can be quite difficult.
When considering these issues alone, it makes much more sense to just
use something like the servicemix-http component because there's
already a protocol there (HTTP) and it can negotiate proxies and
handle security. But it doesn't mean that a TCP component could not be
created.

If/When I ever have enough time to work on this, I would start looking
at the OpenWire protocol from ActiveMQ
(http://www.activemq.org/site/openwire.html). OpenWire is an open,
multi-language, binary protocol so it already handles all the low
level marshalling. That will handle the wire format, then you need to
handle the TCP level. For this I'd start looking at the ActiveMQ TCP
transport layer here:

http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/

Basically most of what is needed is already there in ActiveMQ, we just
need to be implement a JBI component. This is not even very difficult
with the portable JBI component helper classes:

http://servicemix.org/site/component-helper-classes.html

And I'm sure I've left out some items as I just threw together these
ides in the span of writing this email.

Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://incubator.apache.org/activemq/
Apache ServiceMix - http://incubator.apache.org/servicemix/
Castor - http://castor.org/

Reply via email to