Archived

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

IceBox service using ICE grid and ports configuration

Presently my config looks as below ..

Queries:
1. Which Port does this icebox service use(i.e When the Client connects to IceGridNode )? Can i specify a fixed port to run so that i can configure in the proxy
2. i am not sure of using IceGlacier, I am not sure what resources its going to consume .


<icegrid>
<application name="IceBoxDemo">
<node name="Node1">
<icebox id="Application-ice" activation="on-demand" exe="C:/Program Files (x86)/ZeroC/Ice-3.6.1/bin/vc140/x64/icebox" pwd="C:/Project/Release-x64">
<env>PATH=C:/Program Files (x86)/ZeroC/Ice-3.6.1/bin/vc140/x64;C:/Project/Release-x64;%PATH%;$PATH;</env>
<service name="DLApplication" entry="QPApplication:createDLApplication --Ice.Config=DLApplicationConfig.server">
<properties>
<property name="Ice.Default.Locator" value="IceGrid/Locator:tcp -h 161.92.217.196 -p 4061"/>
<property name="TopicManager.Proxy" value="DemoIceStorm/TopicManager@IceStorm"/>
<property name="Ice.MessageSizeMax" value="0"/>
</properties>
<adapter name="DLApplication" endpoints="tcp" id="DLApplicationAdapter" register-process="true"/>
</service>
</icebox>

Comments

  • bernard
    bernard Jupiter, FL
    Hi Nuji,

    You may want to have a look at the IceGrid/icebox demo, for an example of IceBox configuration with IceGrid: https://github.com/zeroc-ice/ice-demos/tree/3.6/cpp/IceGrid/icebox
    1. Which Port does this icebox service use(i.e When the Client connects to IceGridNode )? Can i specify a fixed port to run so that i can configure in the proxy

    The object adapter of your DLApplication service will use the port(s) you configured for this object adapter. In the example above, you did not configure a port (endpoints="tcp"), so the operating system will select a port that is available. If you want, you could set a port in endpoints, for example endpoints="tcp -p 10000", which means "listen on tcp port 10,000 on all interfaces".

    This would be however unusual: when using IceGrid, you typically use indirect proxies like "xyz@DLApplicationAdapter" and let IceGrid find the corresponding endpoint for you.
    2. i am not sure of using IceGlacier, I am not sure what resources its going to consume .

    Do you need to communicate across one or more firewalls?

    <service name="DLApplication" entry="QPApplication:createDLApplication --Ice.Config=DLApplicationConfig.server/>

    You should not include --Ice.Config in entry. IceGrid generates a configuration file for your service (using your description for this service) and automatically passes --Ice.Config=<path to generated config file> as needed.
    <property name="Ice.Default.Locator" value="IceGrid/Locator:tcp -h 161.92.217.196 -p 4061"/>

    This is not necessary - just let IceGrid pass this property to your service with the service configuration file it generates.
    ​<adapter name="DLApplication" endpoints="tcp" id="DLApplicationAdapter" register-process="true"/>

    The register-process attribute is only needed for very old servers - see https://doc.zeroc.com/display/Ice36/Adapter+Descriptor

    Best regards,
    Bernard
  • Thanks for the Input. Now i have removed all the not required items.

    On the ports and IceGlacier,

    Yes. I need to work over firewall. but then we have the liberty to set the ports in firewall. Thats where i was asking if i can set up the ports. If i have more than one service running, i guess each will use different ports?

    as i read Ice Glacier requires a bit of code change too. Also Too many services (Icebox, IceStorm, Grid, Glacier ). it would have been nice if Grid could act like Glacier itself. Correct me if i am wrong?

  • benoit
    benoit Rennes, France
    Hi,

    If you have multiple Glacier2 routers running on the same machine, you will indeed need to use different ports. See Configuring Glacier2 behind an External Firewall for information on how to configure Glacier2 behind a firewall.

    Note that Glacier2 can scale to a large number of clients, in general a single instance per machine is sufficient.

    The use of Glacier2 mostly requires code changes on the client side. The client must establish a session with Glacier2. On the server side, you can optionally implement a session manager to keep track of the client sessions. These code changes are in general often necessary with many distributed applications. The session mechanism allows the servers behind Glacier2 to know when the clients are alive or not and it enables them to better manage resources allocated for clients.

    Cheers,
    Benoit.
  • Thanks for the Info.

    I do not want to use IceGlacier as of now.
    In the Icebox-Icegrid world. I have assigned 10000 to the Service running on the Node and i have enabled inbound rule in firewall.
    What happens in the Client ? Does it require any port to be enabled. I have enabled All outgoing ports in the Client.Do i require any incoming ports to be enabled enabled ?