Home Help Center

question about PHP client using IceGrid.

silwoodssilwoods Member silen woodsOrganization: TencentProject: a network service designer
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

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

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

    Regards,
    Mark
  • silwoodssilwoods Member silen woodsOrganization: TencentProject: a network service designer
    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.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    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
Sign In or Register to comment.