1 Reply Latest reply on Jun 20, 2013 8:52 PM by ron_sigal

    Newbie: JBoss Remoting Multiplex to solve multiple client connections through a firewall

    floogle

      I'm a contractor working for a large telecom company which has a legacy system into which has been introduced a twist, and I'd like to describe the general setup, as it appears JBoss Remoting Multiplex may offer a solution.

       

      A client app connects to a server using a proprietary messaging protocol based on Java TCP sockets.  The client, using a standard Java Socket, sends a message to the server on its "well known" port, telling the server (in the message) to reply to it on the standard dynamic remote port (generally in the range 49152 to 65535).  In this legacy app, the client listens asynchronously for messages with a standard ServerSocket on the dynamic port.  Client & server are appropriately threaded supporting multiple sessions.  So far so much.

       

      The twist/wrinkle is, as you can guess, a firewall is now required between the client and server, so the use of dynamic ports is out.  Rather than muck with the low-level details of the legacy code, one solution might be to use JBoss Remoting Multiplex classes in an intermediate process between client and server, using a single static reply socket.

       

      My question is simply: does this seem like an approach we should pursue?  I am at the moment a JBoss newbie, hence the question.  Any replies appreciated, thanks.

       

      =P

        • 1. Re: Newbie: JBoss Remoting Multiplex to solve multiple client connections through a firewall
          ron_sigal

          Hi Paul,

           

          I wrote the multiplex transport around 2006 and haven't looked at it much since then.  It's certainly no longer supported. 

           

          That said, multiplex was designed to make it possible for a server to communicate asynchronously with a client without creating a ServerSocket on the client, to avoid firewall problems.  If you use the virtual sockets and ServerSockets in multiplex, you might be able to do what you want. 

           

          I should add that the performance of a virtual connection, IIRC, was about 50% of the performance of a real socket connection.

           

          If you want to read the docs and have questions, I might be able to help.  Can't promise, though.

           

          As long as you're thinking of an intermediate layer, why not put a single (real) ServerSocket on the client side of the firewall and distribute the messages from there to the clients?

           

          Good luck.

           

          -Ron