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
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"C_Cpp.default.cppStandard": "c++17",
"gradle.nestedProjects": true,
"cmake.sourceDirectory":[
"${workspaceFolder}/cpp/DataStorm/clock",
"${workspaceFolder}/cpp/DataStorm/keyFilter",
"${workspaceFolder}/cpp/DataStorm/minimal",
"${workspaceFolder}/cpp/DataStorm/node",
"${workspaceFolder}/cpp/DataStorm/sampleFilter",
"${workspaceFolder}/cpp/DataStorm/stock",

"${workspaceFolder}/cpp/Ice/bidir",
"${workspaceFolder}/cpp/Ice/callback",
"${workspaceFolder}/cpp/Ice/context",
Expand All @@ -24,6 +31,11 @@
"${workspaceFolder}/cpp/Ice/secure",
"${workspaceFolder}/cpp/Ice/session",
"${workspaceFolder}/cpp/Ice/throughput",

"${workspaceFolder}/cpp/IceStorm/clock",
"${workspaceFolder}/cpp/IceStorm/counter",
"${workspaceFolder}/cpp/IceStorm/replicated",
"${workspaceFolder}/cpp/IceStorm/replicated2",
],
"cmake.configureSettings": {
"Ice_HOME": "${workspaceFolder}/../ice",
Expand Down
11 changes: 11 additions & 0 deletions cpp/DataStorm/clock/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.16)

project(datastorm_clock CXX)

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

add_executable(reader Reader.cpp)
target_link_libraries(reader Ice::Ice Ice::DataStorm)

add_executable(writer Writer.cpp)
target_link_libraries(writer Ice::Ice Ice::DataStorm)
29 changes: 27 additions & 2 deletions cpp/DataStorm/clock/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,41 @@
# DataStorm Clock

This demo illustrates how to implement a custom encoder and decoder for the topic value type
`chrono::system_clock::time_point`.

To build the demo run:

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

To run the demo, start the writer and specify the name of a city:

**Linux/macOS:**

```shell
writer
./build/writer
```

**Windows:**

```shell
build\Release\writer
```

In a separate window, start the reader:

**Linux/macOS:**

```shell
./build/reader
```

**Windows:**

```shell
reader
build\Release\reader
```

The reader will print the time sent by the writer. You can start multiple writers and readers.
11 changes: 11 additions & 0 deletions cpp/DataStorm/keyFilter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.16)

project(DataStorm_KeyFilter CXX)

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

add_executable(reader Reader.cpp)
target_link_libraries(reader Ice::Ice Ice::DataStorm)

add_executable(writer Writer.cpp)
target_link_libraries(writer Ice::Ice Ice::DataStorm)
29 changes: 27 additions & 2 deletions cpp/DataStorm/keyFilter/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,39 @@
# DataStorm keyFilter

This demo illustrates the use of key filters. The reader uses the `_regex` predefined key filter. The reader will only
subscribe and receive samples for keys matching the regular expression provided on construction of the reader object.

To build the demo run:

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

To run the demo, start the writer:

**Linux/macOS:**

```shell
writer
./build/writer
```

**Windows:**

```shell
build\Release\writer
```

In a separate window, start the reader:

**Linux/macOS:**

```shell
./build/reader
```

**Windows:**

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

project(datastorm_minimal CXX)

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

add_executable(reader Reader.cpp)
target_link_libraries(reader Ice::Ice Ice::DataStorm)

add_executable(writer Writer.cpp)
target_link_libraries(writer Ice::Ice Ice::DataStorm)
29 changes: 27 additions & 2 deletions cpp/DataStorm/minimal/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
# DataStorm Minimal

This demo is the minimal DataStorm "hello world" application.

To build the demo run:

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

To run the demo, start the writer:

**Linux/macOS:**

```shell
writer
./build/writer
```

**Windows:**

```shell
build\Release\writer
```

In a separate window, start the reader:

**Linux/macOS:**

```shell
./build/reader
```

**Windows:**

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

project(datastorm_node CXX)

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

add_executable(reader Reader.cpp)
target_link_libraries(reader Ice::Ice Ice::DataStorm)

add_executable(writer Writer.cpp)
target_link_libraries(writer Ice::Ice Ice::DataStorm)
29 changes: 27 additions & 2 deletions cpp/DataStorm/node/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# DataStorm Node

This demo illustrates the use of a DataStorm node to discover writers and readers without using UDP multicast.

It also demonstrates how readers and writers can exchange data through the DataStorm node when the server endpoints
of both the writers and readers are disabled.

To build the demo run:

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

To run the demo, start a DataStorm node:

```shell
Expand All @@ -11,14 +20,30 @@ dsnode --Ice.Config=config.node

In a separate window, start the writer:

**Linux/macOS:**

```shell
writer
./build/writer
```

**Windows:**

```shell
build\Release\writer
```

In a separate window, start the reader:

**Linux/macOS:**

```shell
./build/reader
```

**Windows:**

```shell
reader
build\Release\reader
```

You can start multiple readers and writers. The readers print the time sent by the writers. Stopping the DataStorm node
Expand Down
11 changes: 11 additions & 0 deletions cpp/DataStorm/sampleFilter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.16)

project(datastorm_sampleFilter CXX)

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

add_executable(reader Reader.cpp)
target_link_libraries(reader Ice::Ice Ice::DataStorm)

add_executable(writer Writer.cpp)
target_link_libraries(writer Ice::Ice Ice::DataStorm)
29 changes: 27 additions & 2 deletions cpp/DataStorm/sampleFilter/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
# DataStorm sampleFilter

This demo illustrates the use of sample filters. The reader uses the `_regex` predefined sample filter. The reader will
only receive samples matching the regular expression provided on construction of the reader object. Note that the
filtering of the samples is performed on the writer to minimize the number of events sent over the wire.

To build the demo run:

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

To run the demo, start the writer:

**Linux/macOS:**

```shell
writer
./build/writer
```

**Windows:**

```shell
build\Release\writer
```

In a separate window, start the reader:

**Linux/macOS:**

```shell
./build/reader
```

**Windows:**

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

project(datastorm_stock CXX)

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

add_executable(reader Reader.cpp Stock.ice)
slice2cpp_generate(reader)
target_link_libraries(reader Ice::Ice Ice::DataStorm)

add_executable(writer Writer.cpp Stock.ice)
slice2cpp_generate(writer)
target_link_libraries(writer Ice::Ice Ice::DataStorm)
34 changes: 29 additions & 5 deletions cpp/DataStorm/stock/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,44 @@
# DataStorm Stock

This demo illustrates the use of partial updates. The writer adds stocks to the
topic and send partial updates to update the stock price or volume. The reader
prints out the stock information and partial updates.

The demo uses Slice to define the `Demo::Stock` class in the `Stock.ice` file.

To run the demo, start the writer and specify the ticker of the stocks to write:
To build the demo run:

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

To run the demo, start the writer:

**Linux/macOS:**

```shell
./build/writer
```
writer

**Windows:**

```shell
build\Release\writer
```

In a separate window, start the reader and specify the stock tickers you wish to
follow:
In a separate window, start the reader:

**Linux/macOS:**

```shell
./build/reader
```
reader

**Windows:**

```shell
build\Release\reader
```

You can start multiple writers and readers to publish or follow different
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 IceStorm)
find_package(Ice REQUIRED CONFIG COMPONENTS DataStorm Glacier2 IceStorm)