You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Mark <el...@gmail.com> on 2007/10/01 01:36:35 UTC

Re: Meta Transport: an idea on implementing reconnection and proxy

I give this a huge +1.

I think one of MINA's greatest strengths is that you can write different
systems very easily.  Adding this to the API would make things much easier.
Proxy support is something that I often look for from MINA and this would be
a very welcome addition.


On 9/30/07, Trustin Lee <tr...@gmail.com> wrote:
>
> Hi everyone,
>
> As you already noticed, I am working very hard to roll out MINA
> 2.0.0-M1 these days.  There are only 16 issues left now.  Any help is
> appreciated.
>
> The most challenging issues are reconnection and proxy.  Both are
> related with client-side applications.  I thought a lot of these
> issues and ended up to this idea: creating meta transports.
>
> A meta transport is a transport that wraps other transport
> implementation(s) to implement a certain additional feature.  For
> example, we could implement automatic reconnection like the following:
>
> SocketConnector c = new SocketConnector();
> c.setDefaultRemoteAddress(...);
> ReconnectingConnector connector = new ReconnectingConnector(c);
>
> For proxying:
>
> SocketConnector c = new SocketConnector();
> ProxyingConnector connector = new ProxyingConnector(
>         c, new InetSocketAddress("proxyserver", 8080));
>
> It's nothing more than just classic decorator pattern, but it has a
> big advantage than other approaches like defining additional extension
> point in that:
>
> * it's simple from user point of view
> * meta transport implementations can work virtually with any transports:
> ** proxy + NIO socket
> ** proxy + APR socket
> ** reconnect + proxy + NIO socket (meta-meta-transport)
>
> I didn't try to implement something yet, but considering our API
> flexibility, it shouldn't affect the core API at all.  WDYT?  Does it
> make perfect sense?
>
> Thanks for the feed back in advance,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>



-- 
..Cheers
Mark