Archived

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

question about PHP client using IceGrid.

hello,my dear friend, I got a question about Php client using IceGrid to access server.

I plan to run a service on 3 node, each node on a server. and use IceGrid to locate, activate and balance loading.
my service is written by C++, client is php.

I read the c++ demo code for IceGrid, the C++ client is extended from Ice::Application, and get locator config like this:
app.main(argc, argv, "config.client");

the locator configed like this in config.client file,
Ice.Default.Locator=WxserverIceGrid/Locator:default -p 35001

but now ,my client is php, how does my php client get locator config information?

thank you verrrrrrrrry much.

Comments

  • mes
    mes California
    Hi,

    Your PHP script can obtain its locator information from a configuration file. Please see the manual for more information.

    Regards,
    Mark
  • mes wrote: »
    Hi,

    Your PHP script can obtain its locator information from a configuration file. Please see the manual for more information.

    Regards,
    Mark

    thanks, mes, my client could use locator now, thank you very much.

    and i'm still puzzled, in cpp IceGrid demo, the "simple",
    just run
    icegridnode --Ice.Config=config.grid
    icegridadmin --Ice.Config=config.grid -e "application add 'application.xml'"

    then it works,

    I don't need run
    icegridregistry --Ice.Config=config.grid

    dost it mean, icegridnode finished the job of icegridregistry ?
    what's the difference between them?

    thanks.
  • mes
    mes California
    Hi,

    If you need to run a node and a registry on the same host, you can run icegridnode with the IceGrid.Node.CollocateRegistry=1 property so that both services are provided by a single process. This eliminates the need to run separate node and registry processes on the same host.

    Regards,
    Mark