Archived

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

IcePack tutorials/ demos

Hi there,

I'm really new to Ice, but have done some CORBA work before.
However, I really have some problems understanding the different things that IcePack provides. Are there any additional tutorials and/ or docs about this module? This would probably help a lot...

Kind regards,

Stephan

Comments

  • marc
    marc Florida
    Besides the examples in the manual, there is also demo/IcePack/hello. See demo/IcePack/hello/README for instructions on how to run this demo.

    You might also want to have a look at the tests in test/IcePack for more examples.
  • Originally posted by marc
    Besides the examples in the manual, there is also demo/IcePack/hello. See demo/IcePack/hello/README for instructions on how to run this demo.

    :-))= I now that demo. But it's that *aehm* "packed" that it's rather difficult to understand what's going on there. imho it would be cool to have something (preferably a tutorial) that creates that example step-by-step. I think that would make IcePack much easier to understand.

    Stephan
  • benoit
    benoit Rennes, France
    Yes, I agree the demo is a little complicated. I will think about having a simpler one. The demo demonstrates the 2 principal IcePack functionalities, i.e.: the location (see 18.4 in the manual) and deployment mechanism (see 18.8 in the manual).

    IcePack implements these 2 functionalities in 2 components, the IcePack registry and the IcePack node. Only one registry should be running and as many nodes as you wish could be running (typically you would have one node per host). The registry is the central database were location information are stored (if you only need to use the location mechanism for indirect biding you could only use the registry). The nodes take care of activating your Java or C++ programs. The IcePack registry and node are also detailed in the manual.

    Can you elaborate a little on what you would like to do with IcePack and the things which are not clear? I'm sure we can clarify everything in this thread :)

    Benoit.

  • Can you elaborate a little on what you would like to do with IcePack and the things which are not clear? I'm sure we can clarify everything in this thread :)

    I understand what's general going on in that IcePack example. If I understand myself correctly ;), my main concerns arise when I see those 3 xml files and yet another config file. And why do I need an icebox.xml file?
    I was thinking of those files as I wrote about 'step-by-step' in my previous posts. The dummy question is when do I have to write which of those.

    I suppose the first basic step would be to get location transparency (something that should be basically comparable to using CORBAs (Interoperable) Name Service, right?).
    And after that, something like automatic activation (something like CORBAs advanced POA concepts, right?), might be of interest. But not no first sight :).

    I'm just posting to suggest how to improve the docs/ examples. I'm not writing in order to beef around....

    Kind regards,

    Stephan
  • benoit
    benoit Rennes, France
    The config file is to configure the IcePack node and registry processes. The XML files are there to describe your application components:
    • application descriptor (application.xml): it's where you specify which servers are to be deployed on which nodes.
    • server descriptors (server.xml or icebox.xml): it's where you specify your servers or icebox service containers. For servers, you describe the server objects, object adapters, configuration, ... For icebox server descriptors, you describe which services are to be deployed in the IceBox container.
    • icebox service descriptors (service.xml): it's where you specify your IceBox services objects, object adapters, configuration.

    icebox.xml allows you to describe which services are to be deployed in the IceBox server container. In the demo we deploy only one service, but you could deploy more if you like. For example:
    <server kind="cpp-icebox" endpoints="default">
      <service name="Service1" descriptor="service.xml"/>                           
      <service name="Service2" descriptor="service.xml"/>
    </server>
    

    I take your point about the IcePack demo demonstrating too much, we'll try to improve this.

    BTW, if you want to try the IcePack location mechanism only, you could actually use the standard demo/Ice/hello demo. Using indirect binding for location transparency is just a matter of changing the configuration:
    • Change your current directory to Ice-1.1.0/demo/Ice/hello.
    • In a terminal, start the IcePack registry:
      bash$ mkdir db
      bash$ icepackregistry --Ice.Config=config
    • Edit the demo/Ice/hello/config file to uncomment the last 4 lines (these lines configure the Hello server and client to use indirect binding with the IcePack registry)
    • In another terminal start the server:
      bash$ ./server
    • In another terminal start the client:
      bash$ ./client --Ice.Trace.Location=1

    Benoit.