This discussion is archived
1 2 Previous Next 24 Replies Latest reply: Oct 19, 2010 3:09 PM by 800745 Go to original post RSS
  • 15. Re: Local Port Exhaustion
    800745 Newbie
    Currently Being Moderated
    Please provide feedback to my latest question
  • 16. Re: Local Port Exhaustion
    EJP Guru
    Currently Being Moderated
    *** I wonder if there is an impact of using following statements every time I pass a message to the upper layer or lower...
    Definitely.
    For example... once a slave has completed the job and needs to pass the results back to the Clients, Slaves will do following
    Why? We've been over this before. You are drastically over-using the Registry here. It is possible to construct systems of this complexity with only one object bound in the Registry, and only one Registry too.

    Look. You have one Registry at the server. You bind the server object into it. Clients register themselves with the server. Ditto slaves if Slaves get references to the clients via that server. Clients get references to slaves ditto if necessary.
    as Slaves are as many as 50.. there will be 50 lookup's every time and is this necessary?
    No. The clients shouldn't even be in a Registry, and there needn't be more than one Registry in the entire system. It's just a bootstrap mechanism. Don't overuse it.
    Can I do this once and use "client" instance to report the result back to clients?
    Yes.

    I said all the above on 5th October.
  • 17. Re: Local Port Exhaustion
    800745 Newbie
    Currently Being Moderated
    EJP wrote:
    Look. You have one Registry at the server. You bind the server object into it. Clients register themselves with the server. Ditto slaves if Slaves get references to the clients via that server. Clients get references to slaves ditto if necessary.
    Now my program flow is :

    1. CLIENT do a remote call to SERVER with its CLIENT Instance
    2. SERVER use the RemoteServer.getClientHost(); to get CLIENTS IP
    * Why I need to IP is when SLAVES request the SERVER to send their respective CLIENT's IP for Look-Up (As Currently Clients have a Register)

    NOW > If I get the CLIENT's remote reference (Client Instance) passed to the SERVER by a remote method, SERVER can store each reference in an Array and once the SLAVES request the respective CLIENT, instead of passing them the IP I could Actually pass the CLIENT's remote reference......

    SO that each SLAVE could just do a remote call to the provided CLIENT instance

    CORRECT?
  • 18. Re: Local Port Exhaustion
    EJP Guru
    Currently Being Moderated
    Correct?
    Correct.
  • 19. Re: Local Port Exhaustion
    800745 Newbie
    Currently Being Moderated
    Clarification

    just suspicious on parsing the object(interface) to the client. I think this will create a clone of the slave in the clients JVM. So "compute" method execution may happen at that JVM instead of slave's JVM

    Eg.

    //INSTANCE OF SLAVE

    ART_Slave o_Slave = new ART_Slave(iID, iNoOfSlavesPerClient, o_Host);

    // SLAVE PASSING IT'S REMOTE INSTANCE

    try {
    UnicastRemoteObject.exportObject(o_Slave, 0);
    o_Slave.client.SlaveRegister(o_Slave.i_SlaveID, o_Slave);

    } catch (Exception e) {
    System.out.println("Slave Registration Failed " + e);
    }

    //CLIENTS RECEIVING THE SLAVE INSTANCE

    public void SlaveRegister(int iSlaveID, Slave_Interface slaveInstance) throws RemoteException {
    //Slave instance is Reference to the Slave Interface
    slaveInstances[i_SlavesRegistered] = slaveInstance;
    }

    Please clarify

    Edited by: JLearner on Oct 11, 2010 3:44 PM
  • 20. Re: Local Port Exhaustion
    EJP Guru
    Currently Being Moderated
    I think this will create a clone of the slave in the clients JVM.
    Not unless you commit the error of re-exporting it that we discussed last month in another thread.
    So "compute" method execution may happen at that JVM instead of slave's JVM
    No. We've been through this before.
    Please clarify
    How many times? We covered all this on 28 September. That's two weeks ago.*

    Specifically, I said
    >
    Execution takes place in the JVM the object was exported from.
    >
    Period.
  • 21. Re: Local Port Exhaustion
    800745 Newbie
    Currently Being Moderated
    Thanks Just a clarification for my Understanding....

    Now

    I have moved my code to the network and when the Clients are Trying to register I get the following errror.... Is it due to a serialization problem?

    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: unrecognized method hash: method not supported by remote object
  • 22. Re: Local Port Exhaustion
    EJP Guru
    Currently Being Moderated
    Just a clarification for my Understanding....
    What* 'clarification'? You were told all about this two weeks ago at some length. Nothing has changed. You're just asking for the same information to be repeated. Over and over again.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: unrecognized method hash: method not supported by remote object
    Your stubs and remote interfaces and remote objects aren't up to date in all places. Clean, rebuild, redeploy.
  • 23. Re: Local Port Exhaustion
    800745 Newbie
    Currently Being Moderated
    Done It is running no worries.!!

    Thanks... I learned alot
  • 24. Re: Local Port Exhaustion
    800745 Newbie
    Currently Being Moderated
    EJP

    Can you help me with the below post?

    Re: Communication Error with Host and Remote Object
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points