Results 1 to 4 of 4

Thread: Location transparency

  1. #1
    davidcr1983 is offline Registered User
    Name: David Vallejo
    Organization: University of Castilla-La Mancha (Spain)
    Project: Intelligent Surveillance System
    Join Date
    Jul 2005
    Location
    Ciudad Real (Spain)
    Posts
    44

    Location transparency

    Hello!

    I am developing a basic arquitecture for a Multi-Agent System under the FIPA Standard, and I am using Ice to develop it.

    When an agent start up, I must provide a mechanism so that the agent can adquire an address. This mechanism must be transparent (because an agent can be executed in different computers), therefore I need Ice chooses the endpoints for the agent.

    I have tried to use the IceGrid::Admin interface in a similar way that the Ice Documentation exposes (page 1035), but I obtain an Ice::NoEndpointException. I suppose this exception is the result of not specifying the endpoints, but I want Ice does it for me so that each agent can be a well-known object.

    Thank you very much.
    Full name: David Vallejo Fernández
    University of Castilla-La Mancha (Spain)
    ICE Project: basic-fipa-multiagentsystem

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi David,

    I suppose that it's the client which is getting the Ice::NoEndpointException? Do you correctly set the Ice.Default.Locator property in the client configuration? How did you register the proxy for the well-known object with the IceGrid::Admin interface?

    Cheers,
    Benoit.

  3. #3
    davidcr1983 is offline Registered User
    Name: David Vallejo
    Organization: University of Castilla-La Mancha (Spain)
    Project: Intelligent Surveillance System
    Join Date
    Jul 2005
    Location
    Ciudad Real (Spain)
    Posts
    44
    Hello!

    The problem is in the server side, in other words, in the Agent. The code I have proved is similar to the example exposed in the documentation:

    void
    AgentI::
    setContactAddress(string address, Ice::ObjectAdapterPtr& adapter)
    {

    adapter = communicator()->createObjectAdapter(this->getName()+"Adapter");
    Ice::Identity ident = Ice::stringToIdentity(this->getName());
    Ice::ObjectPrx obj = adapter->add(this, ident);
    Ice::ObjectPrx proxy = communicator()->stringToProxy("IceGrid/Admin");
    IceGrid::AdminPrx admin = IceGrid::AdminPrx::checkedCast(proxy);
    admin->addObjectWithType(obj, obj->ice_id());
    adapter->activate();

    }

    This method is included in the Agent class, which extends from Agent (obtained from the interface specified in Slice) and from Ice::Application.

    The Ice.Default.Locator property is ok, because when I deploy the application (with others well-known objects explicitly indicated) specified in an xml file there are not problems.

    My problem can be described with the following question: How can I add a well-known object to my application without including it in the xml file and without specifying its endpoints?

    Thank you again!
    Full name: David Vallejo Fernández
    University of Castilla-La Mancha (Spain)
    ICE Project: basic-fipa-multiagentsystem

  4. #4
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Did you check the value of the registered proxy with the icegridadmin tool? You can use the "object describe <identity>" command for example (with <identity> set to the name of your agent).

    Where do you specify the endpoints for the object adapter that you create? If you don't specify these endpoints, the object adapter won't have any endpoints (and the well-known object proxy as well...). You should either set the adpater endpoints with the <adapter name>.Endpoints property or use for example:
    Code:
    adapter = communicator()->createObjectAdapterWithEndpoints(this->getName()+"Adapter", "tcp");
    Here the adapter will listen with "tcp" on all the network interfaces of your machine and with a TCP/IP port allocated by the system.

    Cheers,
    Benoit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Location service
    By timruijs in forum Help Center
    Replies: 3
    Last Post: 12-04-2008, 08:03 AM
  2. How to retrieve IP-Address from location service
    By raphi in forum Help Center
    Replies: 1
    Last Post: 05-09-2008, 02:55 PM
  3. implement location service in Java
    By gumshoe in forum Help Center
    Replies: 3
    Last Post: 03-27-2008, 12:01 PM
  4. IceGrid Location
    By eric.hill in forum Help Center
    Replies: 1
    Last Post: 11-30-2006, 12:51 PM
  5. broadcast / multicast location service?
    By gerkey in forum Help Center
    Replies: 3
    Last Post: 10-05-2006, 01:35 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
  •