#135 Have the driver use 1 port instead of three

Next_Major_Version
closed-fixed
Laurent Cohen
Networking (6)
5
2011-07-11
2011-06-12
Laurent Cohen
No

Currently, the JPPF serverrequires 3 distinct ports to work:
- 1 for the distributed class loader
- 1 for sending/receiving jobs to/from the nodes
- 1 for sending/receiving jobs to/from the clients

What we propose is to refactor the server so that it will only use 1 port, with the ability to use multiple ports. This will enable backward compatibility with previous versions of JPPF, in terms of how communication is configured:
- we use a new configuration property "jppf.server.port", set in the server, nodes, and clients
- if left undefined, then the "old" properties will be used ("class.server.port", "app.server.port" and "node.server.port")
- otherwise the defined port will be used
- in fact this property will be multi-valued, so multiple ports can be used if users whish to

Thie discovery protocol will be adapted accordingly.

This feature is dependent on the complition of: [3315345 - NIO-based server to client communication] (http://sourceforge.net/tracker/?func=detail&aid=3315345&group_id=135654&atid=733521)

Discussion

  • Laurent Cohen
    Laurent Cohen
    2011-07-11

    This feature is now implemented. The changes were relatively simple:

    1) we had to change the handshake protocol so that any remote channel can be identified by the driver. The change is that a channel, upon connecting sends a 4 bytes identifier which in fact an int value, among those defined in org.jppf.utils.JPPFIdentifiers

    2) We have added a new nio selector and associated thread pool, which only manages new incoming connections and their identification. Channels for this selector only have one possible state, which identifies the channel and registers it with the relevant selector (class server, node data server or client data server)

    3) A single port is now used to connect to the server. The corresponding JPPF configuration property is "jppf.server.port = 11111" for all clients, servers and nodes.

    4) The auto discovery mechanism has been updated accordingly

    5) The JPPF peer driver handling has been updated accordingly

    The next step will be to enable the JMX server to use the same port whenever possible, we will create a new feature request for this.

    Chnages committed to SVN trunk: revision 1728

     
  • Laurent Cohen
    Laurent Cohen
    2011-07-11

    • status: open --> closed-fixed