Le 5/15/12 7:06 PM, Florin Sultan a écrit :
Hi Emmanuel,
What I actually want is to place UDT (i.e., the existing UDT implementation,
and its Java wrapper called BarchartUDT) _under_ MINA, and not to implement it
on top of MINA. I want it to be side-by-side with TCP and UDP.
For example : I'd be willing to accept a UDTConnector/UDTAcceptor extension to
the MINA API, similar to the MINA API for TCP/UDP, and have the UDT library do
the transport work for me under MINA.
Understood. It will be slightly more complex, but not that much. We have
APIs that allows you to do that, implementing the IoAcceptor and
IoConnector interfaces.
Yes, UDT is based on UDP - it uses plain UDP sockets for data transport,
protocol signaling etc.
It has an API and semantics very similar to TCP (connection-oriented, stream,
reliable).
The BarchartUDT wrapper page says : "Barchart-UDT exposes UDT protocol as both
java.net.Socket and java.nio.channels.SocketChannel and comes with a
java.nio.channels.spi.SelectorProvider."
My thinking is: if the BarchartUDT wrapper offers a standard Java interface
(nio, as they claim), could it be possible to plug it in MINA as a transport
alternative to TCP/UDP ?
I think it should be possible. We already have implemented APRSocket and
VmPipe beside UDP and TCP transport.
Of course, I am aware this may be some effort. But would it be possible to
start with ? What would be the requirements ? etc.
Just have a look at the IoService hierarchy
(http://mina.apache.org/io-service.html), I think that you should add a
new couple of classes below the
AbstractPollingConnectionlessIoAcceptor/Connector classes (this is the
class used to manage UDP transport).
The base classes can be found here :
http://svn.apache.org/viewvc/mina/tags/2.0.4/mina-core/src/main/java/org/apache/mina/core/service/
and the current implementations here :
http://svn.apache.org/viewvc/mina/tags/2.0.4/mina-core/src/main/java/org/apache/mina/transport/socket/
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com