Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/Ice/secure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ In a separate window, start the client:
**Windows:**

```shell
./build/Release/client
build\Release\client
13 changes: 13 additions & 0 deletions cpp/IceStorm/clock/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16)

project(icestorm_clock CXX)

include(../../cmake/common.cmake)

add_executable(subscriber Subscriber.cpp Clock.ice)
slice2cpp_generate(subscriber)
target_link_libraries(subscriber Ice::Ice Ice::IceStorm)

add_executable(publisher Publisher.cpp Clock.ice)
slice2cpp_generate(publisher)
target_link_libraries(publisher Ice::Ice Ice::IceStorm)
13 changes: 13 additions & 0 deletions cpp/IceStorm/counter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16)

project(icestorm_counter CXX)

include(../../cmake/common.cmake)

add_executable(client Client.cpp CounterObserverI.cpp CounterObserverI.h Counter.ice)
slice2cpp_generate(client)
target_link_libraries(client Ice::Ice Ice::IceStorm)

add_executable(server Server.cpp CounterI.cpp CounterI.h Counter.ice)
slice2cpp_generate(server)
target_link_libraries(server Ice::Ice Ice::IceStorm)
37 changes: 31 additions & 6 deletions cpp/IceStorm/counter/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,51 @@
# Counter

This demo shows how to implement the observer pattern using [IceStorm][1].

To run the demo, start the IceStorm service:
To build the demo run:

```shell
cmake -B build -S .
cmake --build build --config Release
```

To run the demo, start the IceStorm service:

```shell
icebox --Ice.Config=config.icebox
```

This configuration assumes there is a subdirectory named db in the
current working directory.

In a separate window:
In a separate window, start the server:

```
server
**Linux/macOS:**

```shell
./build/server
```

In another window:
**Windows:**

```shell
build\Release\server
```
client

In a separate window, start the client:

**Linux/macOS:**

```shell
./build/client
```

**Windows:**

```shell
build\Release\client


Press 'i' and 'd' to increment and decrement the counter. You can also
start more clients in other windows and observe that each is
initialized and subsequently updated with the current counter value.
Expand Down
13 changes: 13 additions & 0 deletions cpp/IceStorm/replicated/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16)

project(icestorm_replicated CXX)

include(../../cmake/common.cmake)

add_executable(subscriber Subscriber.cpp Clock.ice)
slice2cpp_generate(subscriber)
target_link_libraries(subscriber Ice::Ice Ice::IceStorm)

add_executable(publisher Publisher.cpp Clock.ice)
slice2cpp_generate(publisher)
target_link_libraries(publisher Ice::Ice Ice::IceStorm)
40 changes: 35 additions & 5 deletions cpp/IceStorm/replicated/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,53 @@
# Replicated

This demo demonstrates how to configure and deploy [Highly Available
IceStorm][1] using IceGrid.

To run the demo, start the IceGrid service:
To build the demo run:

```shell
cmake -B build -S .
cmake --build build --config Release
```

To run the demo, start the IceGrid service:

```shell
icegridnode --Ice.Config=config.grid
```

In a separate window:

```
```shell
icegridadmin --Ice.Config=config.grid -e "application add application.xml"
subscriber
```

In another window:
Next run the subscriber:

**Linux/macOS:**

```shell
./build/subscriber
```

**Windows:**

```shell
build\Release\subscriber
```

In a separate window, start the publisher:

**Linux/macOS:**

```shell
./build/publisher
```
publisher

**Windows:**

```shell
build\Release\publisher
```

While the publisher continues to run, "tick" messages should be
Expand Down
13 changes: 13 additions & 0 deletions cpp/IceStorm/replicated2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16)

project(icestorm_replicated2 CXX)

include(../../cmake/common.cmake)

add_executable(subscriber Subscriber.cpp Clock.ice)
slice2cpp_generate(subscriber)
target_link_libraries(subscriber Ice::Ice Ice::IceStorm)

add_executable(publisher Publisher.cpp Clock.ice)
slice2cpp_generate(publisher)
target_link_libraries(publisher Ice::Ice Ice::IceStorm)
32 changes: 29 additions & 3 deletions cpp/IceStorm/replicated2/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,51 @@
# Replicated 2

This demo demonstrates how to configure and deploy [replicated IceStorm
instances][1] without using IceGrid.

To build the demo run:

```shell
cmake -B build -S .
cmake --build build --config Release
```


To run the demo, start the three IceStorm replicas. In three separate
windows:

```
```shell
icebox --Ice.Config=config.ib1
icebox --Ice.Config=config.ib2
icebox --Ice.Config=config.ib3
```

And then in a separate window:

**Linux/macOS:**

```shell
./build/subscriber
```
subscriber

**Windows:**

```shell
build\Release\subscriber
```

In another window:

**Linux/macOS:**

```shell
./build/publisher
```
publisher

**Windows:**

```shell
build\Release\publisher
```

While the publisher continues to run, "tick" messages should be
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ find_package(Threads REQUIRED)

set(Ice_DIR ${CMAKE_CURRENT_LIST_DIR} CACHE PATH "Path to Ice CMake configuration file")

find_package(Ice REQUIRED CONFIG COMPONENTS Glacier2)
find_package(Ice REQUIRED CONFIG COMPONENTS Glacier2 IceStorm)