Archived

This forum has been archived. Please start a new discussion on GitHub.

IceGridRegistry: Configuration and usage

Hi,

I have some questions about IceGrid. After reading the IceGrid chapter and the examples a few times, I don't really understand how to use it.

This is my set-up:
I have three hosts. One each hosts is an unknown number of server running. On the first host is IceGrid runnin.

I want now a mechanism, which enables the different servers to offer their services for usage by the other servers. So the servers will create a object adapter and then need to register to a locator service. Now other services can look up where a service is located.

The example of the mp3encoder and also of the IceGrid demo, deploy the application to IceGrid, something that is not applicatable for me.

What do I need to configure in my config.grid file? What do I have to start (IceGridAdmin, IceGridRegistry or IceGridNode)?

How do I register services with the locator service?

How do I adress services then? With object@adapter?

Do I have to use a xml file for configuration or is it possible to do this programmically?

When using a xml file for configuration do I have to set the 'exe' parameter?

Is there a way to adress a service without knowing the adapter, from my understanding there is no way?

Comments

  • benoit
    benoit Rennes, France
    MikeGerdes wrote: »
    Hi,

    I have some questions about IceGrid. After reading the IceGrid chapter and the examples a few times, I don't really understand how to use it.

    This is my set-up:
    I have three hosts. One each hosts is an unknown number of server running. On the first host is IceGrid runnin.

    I want now a mechanism, which enables the different servers to offer their services for usage by the other servers. So the servers will create a object adapter and then need to register to a locator service. Now other services can look up where a service is located.

    The example of the mp3encoder and also of the IceGrid demo, deploy the application to IceGrid, something that is not applicatable for me.

    Did you check out the article from Michi "Teach Yourself IceGrid in 10 Minutes" from the issue 19 of the Connections newletter?
    What do I need to configure in my config.grid file? What do I have to start (IceGridAdmin, IceGridRegistry or IceGridNode)?

    It sounds like you don't want to manage your servers with IceGrid nodes. That is, your servers are manually started and stopped and would like to register their objet adapter endpoints with the location service on activation. Is this correct?

    If that's the case, you don't need to deploy IceGrid nodes on each of your machines. You just need to deploy an IceGrid registry. You need to enable "dynamic registration" for this registry since by default IceGrid only allows object adapter from servers deployed on IceGrid nodes to register their endpoints. To enable dynamic registration, you just need to set the IceGrid.Registry.DynamicRegistration property to 1. See Michi's article and the Ice manual for more details.
    How do I register services with the locator service?

    It depends on what you mean by "services". Servers register their object adapter endpoints with the locator service automatically on activation if they are properly configured (their AdapterId property is set and if a default locator is set for the server).

    Well-known objects can be registred programatically with the IceGrid::Admin interface. You can also register them manually with the IceGrid administration tools.
    How do I adress services then? With object@adapter?

    Yes, see the manual for more information on indirect proxies.
    Do I have to use a xml file for configuration or is it possible to do this programmically?

    You don't have to use XML files or the IceGrid deployment mechanism if you only want to register your server object adapter endpoints with the location service when they are started.

    If you want your server to be managed by IceGrid nodes however, you'll need to deploy them with the IceGrid deployment mechanism. One way to do this is using XML files however that's not the only way. You can also deploy them using the IceGridAdmin GUI or do everything programatically using the IceGrid::Admin interface.
    When using a xml file for configuration do I have to set the 'exe' parameter?

    Yes, the "exe" attribute is required when deploying a server with the IceGrid deployment mechanism.
    Is there a way to adress a service without knowing the adapter, from my understanding there is no way?

    If by "service" you mean "Ice object", then yes, there's a way to address it without knowning its object adapter. You need to register it as a "well-known object". Such an object can be access by just using it's indentity. See the Ice manual for more information on well-known objects.

    Cheers,
    Benoit.
  • Oh I see. You are right with your quess. I want to start applications manually and only need a locator service.

    I will read the article and try to configure my applications acordingly.