Skip to content

Conversation

@externl
Copy link
Member

@externl externl commented Feb 6, 2025

This PR adds CMake support to the IceBox/hello demo.

Due to the nature of CMake's support of multi-config generators there are two places the HelloService library may end up by default: ./build/ and ./build/Release. This causes a bit of havoc with the config file locations.

Having 4 config files (most just full of superfluous config options) for this "simple" demo seems like a lot.

  • This was the only demo using an XXXadmin tool to shutdown a service. We don't do this for the IceGrid demos, it's unnecessary here.
  • I've removed SSL configuration as well as the "secure" toggle code in the client

IMO these changes make the demo much easier to understand and digest.

cerr << "invalid proxy" << endl;
return 1;
}
HelloPrx twoway{communicator, "hello:tcp -h localhost -p 10000:udp -h localhost -p 10000"};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should further simplify in a follow up PR and have IceBox/greeter, inline with Ice/greeter.

Copy link
Member Author

@externl externl Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could though we'll have to figure out what the behavior will be.

#include "HelloI.h"

#include <Ice/Ice.h>
#include <iostream>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest adding a blank like between Ice/IceStorm etc. headers and other system headers.

In the second window, run the client:
To run this demo, open two terminal windows. In the first window:

**Linux/macOS:**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this relative path to "library", where we don't even provide the actual library name.

That's not how we should recommend using/configuring/starting icebox.

I'd rather show including the directory in LD_LIBRARY_PATH/DYLD_LIBRARY_PATH/PATH before running IceBox, as in

On Linux:

LD_LIBRARY_PATH=./build icebox --Ice.Config=config.icebox

#
# The hello service
#
IceBox.Service.Hello=./HelloService:create --Ice.Config=config.service
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The downside of removing config.icebox + config.service is it's now unclear how to pass command-line options (such as --Ice.Config=...) to your IceBox service.

If we get rid of all config files, we should at least show an option such as:

icebox --IceBox.Service.Hello="HelloService:create --Ice.Trace.Dispatch"

**Windows:**

```shell
set PATH=%PATH%;./build/Release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not use '/' in a Windows PATH. Does it actually work?

@bernardnormier bernardnormier merged commit 9f0fb33 into zeroc-ice:main Feb 6, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants