Results 1 to 3 of 3
  1. #1
    Yogesh_P is offline Member
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    0

    Default Connecting 3 machines through Sockets and ServerSockets

    Hi All

    I need to connect 3 machines which will be running a Java program and each will be assigned Process ID as P0, P1 or P2 such that
    1. P0 starts and waits for other machines to connect to it
    2. P1 starts and connects to P0
    3. P2 starts and connects to both P1 and P0

    After that these 3 machines will exchange messages between each other. I am not clear as to whether I should create both client Sockets and ServerSockets on all the 3 machines and how to connect them.

    For machine P0, should I create client Socket ? With which machine should I connect it as it needs to read from both P1 and P2. Can someone help me with design. Each machine has to act as client as well as server.

    Thanks and Regards
    Last edited by Yogesh_P; 03-28-2011 at 06:17 AM.

  2. #2
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    what do you mean with "After that these 3 machines will exchange messages between each other."? some kind of broadcast? look here for client and server examples.

  3. #3
    Yogesh_P is offline Member
    Join Date
    Mar 2011
    Posts
    10
    Rep Power
    0

    Default

    Quote Originally Posted by j2me64 View Post
    what do you mean with "After that these 3 machines will exchange messages between each other."? some kind of broadcast? look here for client and server examples.
    3 machines need to implement totally ordered multicast i.e if there are some updates occuring on variable x and y at Process 0, 1 and 2 then all Processes must update those variables in same order. So for that every machine will send messages to other machines with their new x and y.

    Regards

Similar Threads

  1. JMF needed on target machines
    By fatblacktone in forum New To Java
    Replies: 1
    Last Post: 04-06-2010, 07:57 AM
  2. Replies: 0
    Last Post: 12-01-2009, 01:04 PM
  3. JDK versions on web server and client machines
    By sunjavaboy in forum New To Java
    Replies: 1
    Last Post: 03-21-2008, 04:59 AM
  4. Replies: 3
    Last Post: 01-19-2008, 06:05 AM
  5. Cluster using 2 machines
    By Albert in forum Advanced Java
    Replies: 2
    Last Post: 07-04-2007, 06:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •