diff --git a/.github/workflows/containerize.yaml b/.github/workflows/containerize.yaml
index 65ec619f..1a3bbb35 100644
--- a/.github/workflows/containerize.yaml
+++ b/.github/workflows/containerize.yaml
@@ -15,9 +15,9 @@ on:
branches:
- main
paths:
- - "src/**"
- - "proto/**"
- - "Dockerfile"
+ - "intent_brokering/src/**"
+ - "intent_brokering/proto/**"
+ - "Dockerfile.intent_brokering"
- ".github/workflows/containerize.yaml"
- "rust-toolchain.toml"
diff --git a/.github/workflows/dotnet-ci.yml b/.github/workflows/dotnet-ci.yml
index 2d835e20..55ab4dd3 100644
--- a/.github/workflows/dotnet-ci.yml
+++ b/.github/workflows/dotnet-ci.yml
@@ -8,7 +8,7 @@ on:
branches:
- main
paths:
- - 'examples/applications/dog-mode-ui/**'
+ - 'intent_brokering/examples/applications/dog-mode-ui/**'
- '.github/workflows/dotnet-ci.yml'
concurrency:
@@ -24,8 +24,8 @@ jobs:
- uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.403
- global-json-file: examples/applications/dog-mode-ui/global.json
+ global-json-file: intent_brokering/examples/applications/dog-mode-ui/global.json
- run: dotnet --info
- - run: dotnet build examples/applications/dog-mode-ui
+ - run: dotnet build intent_brokering/examples/applications/dog-mode-ui
diff --git a/.github/workflows/e2e-ci.yml b/.github/workflows/e2e-ci.yml
index 3a0a6cc2..92144811 100644
--- a/.github/workflows/e2e-ci.yml
+++ b/.github/workflows/e2e-ci.yml
@@ -5,14 +5,14 @@ on:
branches:
- main
paths:
- - "common/**"
- - "ess/**"
- - "examples/**"
- - "keyvalue/**"
- - "proto/**"
- - 'proto.rs/**'
- - "src/**"
- - "tests/**"
+ - "intent_brokering/common/**"
+ - "intent_brokering/ess/**"
+ - "intent_brokering/examples/**"
+ - "intent_brokering/keyvalue/**"
+ - "intent_brokering/proto/**"
+ - 'intent_brokering/proto.rs/**'
+ - "intent_brokering/src/**"
+ - "intent_brokering/tests/**"
- ".github/workflows/e2e.yaml"
- 'Cargo.lock'
- 'Cargo.toml'
@@ -50,6 +50,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
+ file: ./Dockerfile.intent_brokering
load: true
tags: chariott:1
@@ -57,7 +58,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
- file: ./examples/applications/Dockerfile.kv-app.ci
+ file: ./intent_brokering/examples/applications/Dockerfile.kv-app.ci
build-args: APP_NAME=kv-app
load: true
tags: kv-app:1
diff --git a/.github/workflows/ess-bench.yml b/.github/workflows/ess-bench.yml
index d9688968..97cb113a 100644
--- a/.github/workflows/ess-bench.yml
+++ b/.github/workflows/ess-bench.yml
@@ -8,8 +8,8 @@ on:
branches:
- main
paths:
- - 'common/**'
- - 'ess/**'
+ - 'intent_brokering/common/**'
+ - 'intent_brokering/ess/**'
- '.github/workflows/ess-bench.yml'
concurrency:
@@ -25,7 +25,7 @@ env:
AUTO_PUSH: ${{ github.event_name == 'push' }}
# Comment the performance numbers of the load tests only on PRs and if the PR
# comes from within the Eclipse organization.
- COMMENT_ALWAYS: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'eclipse/chariott' }}
+ COMMENT_ALWAYS: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'eclipse-chariott/chariott' }}
jobs:
benchmark:
@@ -41,7 +41,7 @@ jobs:
run: sudo apt-get install -y protobuf-compiler
- name: Run benchmark
- run: cargo bench --manifest-path ess/Cargo.toml --bench load_bench -- --output-format bencher | tee output.txt
+ run: cargo bench --manifest-path intent_brokering/ess/Cargo.toml --bench load_bench -- --output-format bencher | tee output.txt
- name: Store benchmark result
env:
diff --git a/.github/workflows/lt-ci.yml b/.github/workflows/lt-ci.yml
index 1123bc6a..80b92560 100644
--- a/.github/workflows/lt-ci.yml
+++ b/.github/workflows/lt-ci.yml
@@ -8,12 +8,12 @@ on:
branches:
- main
paths:
- - 'common/**'
- - 'src/**'
- - 'tests/**'
- - 'proto/**'
- - 'proto.rs/**'
- - 'examples/**'
+ - 'intent_brokering/common/**'
+ - 'intent_brokering/src/**'
+ - 'intent_brokering/tests/**'
+ - 'intent_brokering/proto/**'
+ - 'intent_brokering/proto.rs/**'
+ - 'intent_brokering/examples/**'
- '.github/workflows/lt-ci.yml'
- 'Cargo.lock'
- 'Cargo.toml'
@@ -32,7 +32,7 @@ env:
AUTO_PUSH: ${{ github.event_name == 'push' }}
# Comment the performance numbers of the load tests only on PRs and if the PR
# comes from within the Eclipse organization.
- COMMENT_ALWAYS: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'eclipse/chariott' }}
+ COMMENT_ALWAYS: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'eclipse-chariott/chariott' }}
jobs:
benchmark:
@@ -57,6 +57,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
+ file: Dockerfile.intent_brokering
load: true
tags: chariott:1
@@ -64,7 +65,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
- file: ./Dockerfile.valgrind
+ file: ./Dockerfile.intent_brokering.valgrind
load: true
tags: val-chariott:1
@@ -72,7 +73,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
- file: ./examples/applications/Dockerfile.lt-provider-app.ci
+ file: ./intent_brokering/examples/applications/Dockerfile.lt-provider-app.ci
build-args: APP_NAME=lt-provider-app
load: true
tags: lt-provider-app:1
diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml
index 690740d5..7c38c5f6 100644
--- a/.github/workflows/rust-ci.yml
+++ b/.github/workflows/rust-ci.yml
@@ -8,14 +8,14 @@ on:
branches:
- main
paths:
- - 'common/**'
- - 'src/**'
- - 'tests/**'
- - 'proto/**'
- - 'proto.rs/**'
- - 'ess/**'
- - 'keyvalue/**'
- - 'examples/**'
+ - 'intent_brokering/common/**'
+ - 'intent_brokering/src/**'
+ - 'intent_brokering/tests/**'
+ - 'intent_brokering/proto/**'
+ - 'intent_brokering/proto.rs/**'
+ - 'intent_brokering/ess/**'
+ - 'intent_brokering/keyvalue/**'
+ - 'intent_brokering/examples/**'
- '.github/workflows/rust-ci.yml'
- 'Cargo.lock'
- 'Cargo.toml'
diff --git a/Cargo.lock b/Cargo.lock
index a02e2e83..68cacf8c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -681,7 +681,6 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
name = "consumer"
version = "0.1.0"
dependencies = [
- "chariott-common",
"samples_proto",
"service_discovery_proto",
"tokio",
@@ -2434,7 +2433,6 @@ checksum = "cf7e6d18738ecd0902d30d1ad232c9125985a3422929b16c65517b38adc14f96"
name = "provider"
version = "0.1.0"
dependencies = [
- "chariott-common",
"samples_proto",
"service_discovery_proto",
"tokio",
diff --git a/Cargo.toml b/Cargo.toml
index 465e6b59..50c3a7bb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,60 +4,32 @@
[workspace]
members = [
- "common",
- "ess",
- "examples/applications/cloud-object-detection",
- "examples/applications/dog-mode-logic",
- "examples/applications/kv-app",
- "examples/applications/invoke-command",
- "examples/applications/local-object-detection",
- "examples/applications/lt-consumer",
- "examples/applications/lt-provider",
- "examples/applications/mock-vas",
- "examples/applications/simple-provider",
- "examples/applications/simulated-camera",
- "examples/common",
- "keyvalue",
- "proto.rs",
+ "intent_brokering",
+ "intent_brokering/common",
+ "intent_brokering/ess",
+ "intent_brokering/examples/applications/cloud-object-detection",
+ "intent_brokering/examples/applications/dog-mode-logic",
+ "intent_brokering/examples/applications/kv-app",
+ "intent_brokering/examples/applications/invoke-command",
+ "intent_brokering/examples/applications/local-object-detection",
+ "intent_brokering/examples/applications/lt-consumer",
+ "intent_brokering/examples/applications/lt-provider",
+ "intent_brokering/examples/applications/mock-vas",
+ "intent_brokering/examples/applications/simple-provider",
+ "intent_brokering/examples/applications/simulated-camera",
+ "intent_brokering/examples/common",
+ "intent_brokering/keyvalue",
+ "intent_brokering/proto.rs",
"service_discovery/core",
"service_discovery/samples/simple-discovery/consumer",
"service_discovery/samples/simple-discovery/provider"
]
-[package]
-name = "chariott"
-version = "0.1.0"
-edition = "2021"
-license = "MIT"
-
-[[test]]
-name = "store-e2e"
-test = false
-
-[[test]]
-name = "registry-e2e"
-test = false
-
-[dependencies]
-async-recursion = "1.0"
-async-trait = { workspace = true }
-chariott-common = { workspace = true }
-chariott-proto = { workspace = true }
-prost = { workspace = true }
-prost-types = { workspace = true }
-tokio = { workspace = true, features = ["rt-multi-thread", "time"] }
-tokio-util = { workspace = true }
-tonic = { workspace = true }
-tonic-reflection = "0.10"
-tracing = { workspace = true }
-tracing-subscriber = { workspace = true }
-url = { workspace = true }
-
[workspace.dependencies]
anyhow = "1.0"
async-trait = "0.1"
-chariott-common = { path = "./common/" }
-chariott-proto = { path = "./proto.rs/" }
+chariott-common = { path = "./intent_brokering/common/" }
+chariott-proto = { path = "./intent_brokering/proto.rs/" }
futures = { version = "0.3" }
lazy_static = "1.4.0"
parking_lot = "0.12.1"
@@ -77,19 +49,6 @@ uuid = { version = "1.6.1", features = ["v4"] }
url = "2.5"
test-case = "2.2.2"
-[build-dependencies]
-tonic-build = { workspace = true }
-
-[dev-dependencies]
-anyhow = { workspace = true }
-async-trait = { workspace = true }
-examples-common = { path = "./examples/common" }
-futures = { workspace = true }
-tokio-util = { workspace = true }
-uuid = { workspace = true }
-tokio-stream = { workspace = true }
-test-case = { workspace = true }
-
[profile.release]
strip = true
opt-level = "z"
diff --git a/Dockerfile b/Dockerfile.intent_brokering
similarity index 95%
rename from Dockerfile
rename to Dockerfile.intent_brokering
index 7b6de5dc..f46e0bd3 100644
--- a/Dockerfile
+++ b/Dockerfile.intent_brokering
@@ -32,7 +32,7 @@ COPY ./ .
RUN rustup target add x86_64-unknown-linux-musl
-RUN cargo build --release --target=x86_64-unknown-linux-musl
+RUN cargo build --release --target=x86_64-unknown-linux-musl -p chariott
####################################################################################################
## Final image
diff --git a/Dockerfile.arm64 b/Dockerfile.intent_brokering.arm64
similarity index 95%
rename from Dockerfile.arm64
rename to Dockerfile.intent_brokering.arm64
index f81b2ebc..a5158f48 100644
--- a/Dockerfile.arm64
+++ b/Dockerfile.intent_brokering.arm64
@@ -35,7 +35,7 @@ COPY ./ .
RUN rustup target add aarch64-unknown-linux-musl
-RUN cargo build --release --target=aarch64-unknown-linux-musl
+RUN cargo build --release --target=aarch64-unknown-linux-musl -p chariott
#############################################################x#######################################
## Final image
diff --git a/Dockerfile.valgrind b/Dockerfile.intent_brokering.valgrind
similarity index 98%
rename from Dockerfile.valgrind
rename to Dockerfile.intent_brokering.valgrind
index 8fbd7ab8..f19dbe72 100644
--- a/Dockerfile.valgrind
+++ b/Dockerfile.intent_brokering.valgrind
@@ -32,7 +32,7 @@ WORKDIR /sdv
COPY ./ .
-RUN cargo build --release
+RUN cargo build --release -p chariott
#############################################################x#######################################
## Final image
diff --git a/README.md b/README.md
index 9ced751d..e339706b 100644
--- a/README.md
+++ b/README.md
@@ -12,26 +12,23 @@
- [What is Chariott?](#what-is-chariott)
- [How to develop with Chariott](#how-to-develop-with-chariott)
- - [Terminology](#terminology)
- - [Concept of Intents](#concept-of-intents)
-- [Requirements](#requirements)
-- [Getting started](#getting-started)
- - [Using Dev Container](#dev-container)
- - [Build all binaries and run tests](#build-all-binaries-and-run-tests)
- - [Build on MacOS with Docker VirtuoFS](#build-on-macos-with-docker-virtuofs)
- - [Using Podman instead of Docker](#using-podman-instead-of-docker)
- - [Without Dev Container](#without-dev-container)
- - [Install Dependencies](#install-dependencies)
- - [Build all binaries and run tests natively](#build-all-binaries-and-run-tests-natively)
- - [Build and run Chariott only](#build-and-run-chariott-only)
-- [Use Chariott Service Discovery only](#use-chariott-service-discovery-only)
-- [How to run the examples and interact with Chariott](#how-to-run-the-examples-and-interact-with-chariott)
-- [How to run the dog mode demo](#how-to-run-the-dog-mode-demo)
- [Trademarks](#trademarks)
## What is Chariott?
-Chariott is a [gRPC](https://grpc.io) service that provides a common interface for interacting with applications. It facilitates Service Discovery for applications to advertise their capabilities by registering themselves with Chariott's service registry. Other applications that need to consume resources and capabilities can Discover services through Chariott's service registry. In the current version of Chariott, applications can also communicate with each other through Chariott. This is done by having applications register an _intent_ which Chariott will then _fulfill_ by brokering the communication with the appropriate application to fulfill that intent. Applications which fulfill these intents are known as _providers_. More information on Chariott's current design with diagrams can be found [here](./docs/design/README.md).
+Chariott is a [gRPC](https://grpc.io) service that provides a common interface for interacting with
+applications. It facilitates Service Discovery of applications which advertise their capabilities
+by registering themselves with Chariott's service registry. Other applications that need to consume
+resources and capabilities can Discover services through Chariott's service registry. There are two
+components in this project: [Intent Brokering](./intent_brokering/README.md) and
+[Service Discovery](./service_discovery/README.md). Today, they are two separate components which
+do not interact. Each has its own gRPC service.
+
+With Intent Brokering, applications can also communicate with each other through Chariott. This is
+done by having applications register an _intent_ which Chariott will then _fulfill_ by brokering
+the communication with the appropriate application to fulfill that intent. Applications which
+fulfill these intents are known as _providers_. More information on Intent Brokering's current
+design with diagrams can be found [here](./docs/design/intent_brokering_design.md).
## How to develop with Chariott
@@ -40,208 +37,6 @@ client application can be written in any language that supports gRPC. The
examples in this repository are written in Rust, but the same concepts apply to
any language.
-### Terminology
-
-| Term | Description |
-| --- | --- |
-| Application | An application is defined as any software component. |
-| Provider | A provider is also an application that in addition registers its capabilities with Chariott's service registry for other applications to consume. |
-| Consuming Application | A consuming application is a client application that interacts with Chariott to look up capability providers and interact with them through Chariott or directly. |
->Note: "provider" or "consuming application" are just roles for an application. Specifically, an application can be both a Chariott "provider" and "consuming application".
-
-### Concept of Intents
-
-Intents are the main way to interact with Chariott. Once a provider registers
-an intent with Chariott, other applications can use that intent to interact with
-the provider. The intent is a gRPC method that is defined in the provider's
-protobuf definition. That definition is only used by Chariott itself.
-
-Chariott also provides a gRPC interface for applications to interact with
-providers and delegates the calls based on the intent to the provider transparently.
-Therefore, clients don't need to know the location and details of the provider as long as
-their intent is fulfilled.
-
-Here is a list of the current supported intents:
-
-| Intent | Description |
-| --- | --- |
-| Discover | Retrieve native interfaces of providers. This comes in handy if you need specific interaction with a provider that you know is available in the system and you don't want to use Chariott to interact with it. This is also used for retrieving the streaming endpoints of a provider. |
-| Inspect | Support inspection of functionality, properties and events using a simple query syntax. |
-| Invoke | Invoke a method on a provider. |
-| Subscribe | Subscribe to events of a provider. Note that this does not open the streaming channel, this is done through the native streaming endpoint of the provider. |
-| Read | Read a property of a provider. |
-| Write | Write a property to a provider. |
-
-More information can be found in the protobuf definitions in `./proto`.
-
-There is a separate document that describes the example applications and
-scenarios that are supported by Chariott. It can be found
-[here](./examples/applications/README.md).
-
-## Requirements
-
-The current source is developed and tested under WSL2/Linux running Ubuntu 20.04
-on AMD64 architecture. It is not tested against any other configurations. You
-might experience missing support for other platforms, but please feel free to
-contribute to close the gaps.
-
-## Getting started
-
-### Dev Container
-
-For development and running the examples, we recommend using the
-[Devcontainer](https://code.visualstudio.com/docs/remote/containers) template
-provided at `.devcontainer/devcontainer.json`.
-[These](https://code.visualstudio.com/docs/devcontainers/containers#_system-requirements)
-are the system requirements (including the default requirement of docker) for using devcontainers.
-If you decide not to use the Devcontainer, refer to the `devcontainer.json` and the Dockerfile
-`.devcontainer/Dockerfile` for a list of the plugins and tools we use.
-
-> Note: If you use Devcontainers and you are running on Windows, make sure to check out the
-> repository on the WSL2 file system in the target distribution you're using.
-
-#### Build all binaries and run tests
-
-```bash
-cargo build --workspace
-cargo test --workspace
-```
-
-#### Build on MacOS with Docker VirtuoFS
-
-As reported in [this issue](https://github.com/eclipse-chariott/chariott/issues/111), some extra
-steps are needed to build if you are using MacOS with Docker VirtuoFS.
-
-Docker Desktop provides a fast VirtuoFS implementation on a Mac but the rust build process breaks
-in devcontainers if VirtuoFS is enabled. The solution is not disabling the VirtuoFS, because this
-significantly slows down the I/O operations in the containers.
-
-The workaround is to create a target folder outside the chariott workspace and set the environment
-variable to the new target folder. The following sequence works in the devcontainer:
-
-```shell
-vscode ➜ /workspaces/chariott (main) $ sudo mkdir ../target
-vscode ➜ /workspaces/chariott (main) $ sudo chown vscode:vscode ../target
-vscode ➜ /workspaces/chariott (main) $ CARGO_TARGET_DIR=../target cargo build -p chariott
-vscode ➜ /workspaces/chariott (main) $ CARGO_TARGET_DIR=../target cargo run -p chariott
-```
-
-#### Using Podman instead of Docker
-
-If you want to use Podman you have to [enable Podman in Visual Studio
-Code][vscode-podman] and update the `.devcontainer/devcontainer.json` file
-with the following additions:
-
- [vscode-podman]: https://code.visualstudio.com/remote/advancedcontainers/docker-options#_podman
-
-```jsonc
-{
- // ...
- "runArgs": [
- "--cap-add=SYS_PTRACE",
- "--security-opt",
- "seccomp=unconfined",
- "--userns=keep-id"
- ],
- // ...
- "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,Z",
- "workspaceFolder": "/workspace",
- "containerUser": "vscode",
- // ...
-}
-```
-
-> **NOTE**: Feel free to use another workspace folder name.
-
-### Without dev container
-
-#### Install Dependencies
-
-As stated above, the `devcontainer.json` and the Dockerfile
-`.devcontainer/Dockerfile` contain a list of the plugins/tools we use for Chariott.
-Below we have listed the steps to get started, but refer to those files if there are any discrepancies.
-
-This guide uses `apt` as the package manager in the examples. You may need to substitute your own
-package manager in place of `apt` when going through these steps.
-
-1. Install gcc:
-
- ```shell
- sudo apt install gcc
- ```
-
- > **NOTE**: Rust needs gcc's linker.
-
-1. Install git and git-lfs
-
- ```shell
- sudo apt install -y git git-lfs
- git lfs install
- ```
-
-1. Install [rust](https://rustup.rs/#), using the default installation, for example:
-
- ```shell
- sudo apt install curl
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- ```
-
- You will need to restart your shell to refresh the environment variables.
- > **NOTE**: The rust toolchain version is managed by the rust-toolchain.toml file, so once you
- install rustup there is no need to manually install a toolchain or set a default.
-
-1. Install Protobuf Compiler:
-
- ```shell
- sudo apt install -y protobuf-compiler
- ```
-
- > **NOTE**: The protobuf compiler is needed for building the project.
-
-1. Ensure you have openssl and pkg-config installed. These are needed for some of the tests and
-examples.
-
- ```shell
- sudo apt install pkg-config
- sudo apt install libssl-dev
- ```
-
-#### Build all binaries and run tests natively
-
-```bash
-cargo build --workspace
-cargo test --workspace
-```
-
-#### Build and run Chariott only
-
-```bash
-cargo run -p chariott
-```
-
-## Use Chariott Service Discovery Only
-
-There is a new Service Discovery mechanism that is decoupled from intent brokering. It is currently
-under development. Please refer to [this document](./service_discovery/README.md) for more
-information.
-
-## How to run the examples and interact with Chariott
-
-Refer to individual example applications' documentation for additional setup or dependencies that may be required.
-
-As Chariott's out of the box communication protocol is gRPC, the interaction with the
-examples is done through gRPC. To illustrate how to invoke the gRPC methods we
-use the [grpcurl](https://github.com/fullstorydev/grpcurl) command line tool with the example application
-**kv-app**. The **kv-app** is a key-value store that can be used to store
-and read state. The state is stored in memory and is not persisted. It also demonstrates
-the use of the `ess` and `keyvalue` crates.
-
-This walkthrough is described in the [examples kv-app README](examples/applications/kv-app/README.md).
-
-## How to run the dog mode demo
-
-To run the dog mode demo, please refer to the [dog mode demo](./examples/applications/README.md).
-
## Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
diff --git a/buf.work.yaml b/buf.work.yaml
index 81201f18..c36f8ad7 100644
--- a/buf.work.yaml
+++ b/buf.work.yaml
@@ -1,4 +1,4 @@
version: v1
directories:
- - proto
- - examples/applications/proto
+ - intent_brokering/proto
+ - intent_brokering/examples/applications/proto
diff --git a/build-all-containers.sh b/build-all-containers.sh
index 0efaa56e..cf1350cd 100755
--- a/build-all-containers.sh
+++ b/build-all-containers.sh
@@ -18,17 +18,17 @@ if [ -z "$IMAGE_TAG" ]; then
fi
# Build base image for all example applications
-docker build --tag "chariott:base" --file ./examples/applications/Dockerfile.base .
+docker build --tag "chariott:base" --file ./intent_brokering/examples/applications/Dockerfile.base .
# Build Chariott
-docker build --tag "$(concat_image_registry chariott:"$IMAGE_TAG")" --file ./examples/applications/Dockerfile.generic --build-arg APP_NAME=chariott .
+docker build --tag "$(concat_image_registry chariott:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile.generic --build-arg APP_NAME=chariott .
# Build Examples
-docker build --tag "$(concat_image_registry cloud-object-detection-app:"$IMAGE_TAG")" --file ./examples/applications/Dockerfile.cloud-object-detection --build-arg APP_NAME=cloud-object-detection-app .
-docker build --tag "$(concat_image_registry dog-mode-logic-app:"$IMAGE_TAG")" --file ./examples/applications/Dockerfile.generic --build-arg APP_NAME=dog-mode-logic-app .
-docker build --tag "$(concat_image_registry kv-app:"$IMAGE_TAG")" --file ./examples/applications/Dockerfile.generic --build-arg APP_NAME=kv-app .
+docker build --tag "$(concat_image_registry cloud-object-detection-app:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile.cloud-object-detection --build-arg APP_NAME=cloud-object-detection-app .
+docker build --tag "$(concat_image_registry dog-mode-logic-app:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile.generic --build-arg APP_NAME=dog-mode-logic-app .
+docker build --tag "$(concat_image_registry kv-app:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile.generic --build-arg APP_NAME=kv-app .
# Local object detection build is not executed as it is currently not working due to missing tensorflow libraries in the image
-# docker build --tag "$(concat_image_registry local-object-detection-app:"$IMAGE_TAG")" --file ./examples/applications/Dockerfile --build-arg APP_NAME=local-object-detection-app .
-docker build --tag "$(concat_image_registry mock-vas:"$IMAGE_TAG")" --file ./examples/applications/Dockerfile.mock-vas --build-arg APP_NAME=mock-vas .
-docker build --tag "$(concat_image_registry simulated-camera-app:"$IMAGE_TAG")" --file ./examples/applications/Dockerfile.simulated-camera --build-arg APP_NAME=simulated-camera-app .
-docker build --tag "$(concat_image_registry lt-provider-app:"$IMAGE_TAG")" --file ./examples/applications/Dockerfile.generic --build-arg APP_NAME=lt-provider-app .
+# docker build --tag "$(concat_image_registry local-object-detection-app:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile --build-arg APP_NAME=local-object-detection-app .
+docker build --tag "$(concat_image_registry mock-vas:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile.mock-vas --build-arg APP_NAME=mock-vas .
+docker build --tag "$(concat_image_registry simulated-camera-app:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile.simulated-camera --build-arg APP_NAME=simulated-camera-app .
+docker build --tag "$(concat_image_registry lt-provider-app:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile.generic --build-arg APP_NAME=lt-provider-app .
diff --git a/docs/adr/0020-integration-and-e2e-testing.md b/docs/adr/0020-integration-and-e2e-testing.md
index f6f1d2fd..cde5a70d 100644
--- a/docs/adr/0020-integration-and-e2e-testing.md
+++ b/docs/adr/0020-integration-and-e2e-testing.md
@@ -28,7 +28,7 @@ well as from the CI.
Integration tests will be invoking the Chariott runtime server code directly,
without using the [upstream gRPC
-layer](../../proto/chariott/runtime/v1/runtime.proto). We will not mock out any parts
+layer](../../intent_brokering/proto/chariott/runtime/v1/runtime.proto). We will not mock out any parts
from the Chariott runtime when integration testing, hence we will need to set up
a provider that is exposing a gRPC endpoint in order to handle intent
fulfillments.
@@ -88,4 +88,4 @@ This approach is equivalent to the setup in [ADR
`cargo test`, and come with the advantages a test framework has without
taking a dependency on test framework which we do not already use.
-[charc]: ../../tools/charc.md
+[charc]: ../../intent_brokering/tools/charc.md
diff --git a/docs/design/README.md b/docs/design/intent_brokering_design.md
similarity index 99%
rename from docs/design/README.md
rename to docs/design/intent_brokering_design.md
index 5ce67bcb..001cc5ed 100644
--- a/docs/design/README.md
+++ b/docs/design/intent_brokering_design.md
@@ -6,7 +6,7 @@
## Introduction
-Project Eclipse Chariott delivers a metadata-driven application programming model. Today, Chariott serves two main purposes. First, it offers service discovery of "provider" applications advertising their functionality. These providers register their capabilities with Chariott. Second, Chariott provides the brokering of intent requests from any application towards the offering providers. Chariott was founded on [Capability Oriented Architecture](https://www.linkedin.com/pulse/brief-introduction-capability-oriented-architecture-coa-haishi-bai/) (COA). Since Chariott provides a common [gRPC](https://grpc.io/) interface for interacting with applications, it can be used with any language supporting gRPC. For more details on the gRPC interfaces, please see the [proto folder](../../proto/chariott/).
+Project Eclipse Chariott delivers a metadata-driven application programming model. Today, Chariott serves two main purposes. First, it offers service discovery of "provider" applications advertising their functionality. These providers register their capabilities with Chariott. Second, Chariott provides the brokering of intent requests from any application towards the offering providers. Chariott was founded on [Capability Oriented Architecture](https://www.linkedin.com/pulse/brief-introduction-capability-oriented-architecture-coa-haishi-bai/) (COA). Since Chariott provides a common [gRPC](https://grpc.io/) interface for interacting with applications, it can be used with any language supporting gRPC. For more details on the gRPC interfaces, please see the [proto folder](../../intent_brokering/proto/chariott/).
## Architecture
diff --git a/intent_brokering/Cargo.toml b/intent_brokering/Cargo.toml
new file mode 100644
index 00000000..73a27fff
--- /dev/null
+++ b/intent_brokering/Cargo.toml
@@ -0,0 +1,45 @@
+# Copyright (c) Microsoft Corporation.
+# Licensed under the MIT license.
+# SPDX-License-Identifier: MIT
+
+[package]
+name = "chariott"
+version = "0.1.0"
+edition = "2021"
+license = "MIT"
+
+[dependencies]
+async-recursion = "1.0"
+async-trait = { workspace = true }
+chariott-common = { workspace = true }
+chariott-proto = { workspace = true }
+prost = { workspace = true }
+prost-types = { workspace = true }
+tokio = { workspace = true, features = ["rt-multi-thread", "time"] }
+tokio-util = { workspace = true }
+tonic = { workspace = true }
+tonic-reflection = "0.10"
+tracing = { workspace = true }
+tracing-subscriber = { workspace = true }
+url = { workspace = true }
+
+[dev-dependencies]
+anyhow = { workspace = true }
+async-trait = { workspace = true }
+examples-common = { path = "./examples/common" }
+futures = { workspace = true }
+tokio-util = { workspace = true }
+uuid = { workspace = true }
+tokio-stream = { workspace = true }
+test-case = { workspace = true }
+
+[build-dependencies]
+tonic-build = { workspace = true }
+
+[[test]]
+name = "store-e2e"
+test = false
+
+[[test]]
+name = "registry-e2e"
+test = false
diff --git a/intent_brokering/README.md b/intent_brokering/README.md
new file mode 100644
index 00000000..f64061ba
--- /dev/null
+++ b/intent_brokering/README.md
@@ -0,0 +1,221 @@
+# Intent Brokering
+
+- [Terminology](#terminology)
+- [Concept of Intents](#concept-of-intents)
+- [Requirements](#requirements)
+- [Getting started](#getting-started)
+ - [Using Dev Container](#dev-container)
+ - [Build all binaries and run tests](#build-all-binaries-and-run-tests)
+ - [Build on MacOS with Docker VirtuoFS](#build-on-macos-with-docker-virtuofs)
+ - [Using Podman instead of Docker](#using-podman-instead-of-docker)
+ - [Without Dev Container](#without-dev-container)
+ - [Install Dependencies](#install-dependencies)
+ - [Build all binaries and run tests natively](#build-all-binaries-and-run-tests-natively)
+ - [Build and run Chariott only](#build-and-run-chariott-only)
+- [How to run the examples and interact with Chariott](#how-to-run-the-examples-and-interact-with-chariott)
+- [How to run the dog mode demo](#how-to-run-the-dog-mode-demo)
+- [Trademarks](#trademarks)
+
+## Terminology
+
+| Term | Description |
+| --- | --- |
+| Application | An application is defined as any software component. |
+| Provider | A provider is also an application that in addition registers its capabilities with Chariott's service registry for other applications to consume. |
+| Consuming Application | A consuming application is a client application that interacts with Chariott to look up capability providers and interact with them through Chariott or directly. |
+>Note: "provider" or "consuming application" are just roles for an application. Specifically, an application can be both a Chariott "provider" and "consuming application".
+
+## Concept of Intents
+
+Intents are the main way to interact with Chariott. Once a provider registers
+an intent with Chariott, other applications can use that intent to interact with
+the provider. The intent is a gRPC method that is defined in the provider's
+protobuf definition. That definition is only used by Chariott itself.
+
+Chariott also provides a gRPC interface for applications to interact with
+providers and delegates the calls based on the intent to the provider transparently.
+Therefore, clients don't need to know the location and details of the provider as long as
+their intent is fulfilled.
+
+Here is a list of the current supported intents:
+
+| Intent | Description |
+| --- | --- |
+| Discover | Retrieve native interfaces of providers. This comes in handy if you need specific interaction with a provider that you know is available in the system and you don't want to use Chariott to interact with it. This is also used for retrieving the streaming endpoints of a provider. |
+| Inspect | Support inspection of functionality, properties and events using a simple query syntax. |
+| Invoke | Invoke a method on a provider. |
+| Subscribe | Subscribe to events of a provider. Note that this does not open the streaming channel, this is done through the native streaming endpoint of the provider. |
+| Read | Read a property of a provider. |
+| Write | Write a property to a provider. |
+
+More information can be found in the protobuf definitions in `./proto`.
+
+There is a separate document that describes the example applications and
+scenarios that are supported by Chariott. It can be found
+[here](./examples/applications/README.md).
+
+## Requirements
+
+The current source is developed and tested under WSL2/Linux running Ubuntu 20.04
+on AMD64 architecture. It is not tested against any other configurations. You
+might experience missing support for other platforms, but please feel free to
+contribute to close the gaps.
+
+## Getting started
+
+### Dev Container
+
+For development and running the examples, we recommend using the
+[Devcontainer](https://code.visualstudio.com/docs/remote/containers) template
+provided at `.devcontainer/devcontainer.json`.
+[These](https://code.visualstudio.com/docs/devcontainers/containers#_system-requirements)
+are the system requirements (including the default requirement of docker) for using devcontainers.
+If you decide not to use the Devcontainer, refer to the `devcontainer.json` and the Dockerfile
+`.devcontainer/Dockerfile` for a list of the plugins and tools we use.
+
+> Note: If you use Devcontainers and you are running on Windows, make sure to check out the
+> repository on the WSL2 file system in the target distribution you're using.
+
+#### Build all binaries and run tests
+
+```bash
+cargo build --workspace
+cargo test --workspace
+```
+
+#### Build on MacOS with Docker VirtuoFS
+
+As reported in [this issue](https://github.com/eclipse-chariott/chariott/issues/111), some extra
+steps are needed to build if you are using MacOS with Docker VirtuoFS.
+
+Docker Desktop provides a fast VirtuoFS implementation on a Mac but the rust build process breaks
+in devcontainers if VirtuoFS is enabled. The solution is not disabling the VirtuoFS, because this
+significantly slows down the I/O operations in the containers.
+
+The workaround is to create a target folder outside the chariott workspace and set the environment
+variable to the new target folder. The following sequence works in the devcontainer:
+
+```shell
+vscode ➜ /workspaces/chariott (main) $ sudo mkdir ../target
+vscode ➜ /workspaces/chariott (main) $ sudo chown vscode:vscode ../target
+vscode ➜ /workspaces/chariott (main) $ CARGO_TARGET_DIR=../target cargo build -p chariott
+vscode ➜ /workspaces/chariott (main) $ CARGO_TARGET_DIR=../target cargo run -p chariott
+```
+
+#### Using Podman instead of Docker
+
+If you want to use Podman you have to [enable Podman in Visual Studio
+Code][vscode-podman] and update the `.devcontainer/devcontainer.json` file
+with the following additions:
+
+ [vscode-podman]: https://code.visualstudio.com/remote/advancedcontainers/docker-options#_podman
+
+```jsonc
+{
+ // ...
+ "runArgs": [
+ "--cap-add=SYS_PTRACE",
+ "--security-opt",
+ "seccomp=unconfined",
+ "--userns=keep-id"
+ ],
+ // ...
+ "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,Z",
+ "workspaceFolder": "/workspace",
+ "containerUser": "vscode",
+ // ...
+}
+```
+
+> **NOTE**: Feel free to use another workspace folder name.
+
+### Without dev container
+
+#### Install Dependencies
+
+As stated above, the `devcontainer.json` and the Dockerfile
+`.devcontainer/Dockerfile` contain a list of the plugins/tools we use for Chariott.
+Below we have listed the steps to get started, but refer to those files if there are any discrepancies.
+
+This guide uses `apt` as the package manager in the examples. You may need to substitute your own
+package manager in place of `apt` when going through these steps.
+
+1. Install gcc:
+
+ ```shell
+ sudo apt install gcc
+ ```
+
+ > **NOTE**: Rust needs gcc's linker.
+
+1. Install git and git-lfs
+
+ ```shell
+ sudo apt install -y git git-lfs
+ git lfs install
+ ```
+
+1. Install [rust](https://rustup.rs/#), using the default installation, for example:
+
+ ```shell
+ sudo apt install curl
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+ ```
+
+ You will need to restart your shell to refresh the environment variables.
+ > **NOTE**: The rust toolchain version is managed by the rust-toolchain.toml file, so once you
+ install rustup there is no need to manually install a toolchain or set a default.
+
+1. Install Protobuf Compiler:
+
+ ```shell
+ sudo apt install -y protobuf-compiler
+ ```
+
+ > **NOTE**: The protobuf compiler is needed for building the project.
+
+1. Ensure you have openssl and pkg-config installed. These are needed for some of the tests and
+examples.
+
+ ```shell
+ sudo apt install pkg-config
+ sudo apt install libssl-dev
+ ```
+
+#### Build all binaries and run tests natively
+
+```bash
+cargo build --workspace
+cargo test --workspace
+```
+
+#### Build and run Chariott only
+
+```bash
+cargo run -p chariott
+```
+
+## How to run the examples and interact with Chariott
+
+Refer to individual example applications' documentation for additional setup or dependencies that may be required.
+
+As Chariott's out of the box communication protocol is gRPC, the interaction with the
+examples is done through gRPC. To illustrate how to invoke the gRPC methods we
+use the [grpcurl](https://github.com/fullstorydev/grpcurl) command line tool with the example application
+**kv-app**. The **kv-app** is a key-value store that can be used to store
+and read state. The state is stored in memory and is not persisted. It also demonstrates
+the use of the `ess` and `keyvalue` crates.
+
+This walkthrough is described in the [examples kv-app README](./examples/applications/kv-app/README.md).
+
+## How to run the dog mode demo
+
+To run the dog mode demo, please refer to the [dog mode demo](./examples/applications/README.md).
+
+## Trademarks
+
+This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
+trademarks or logos is subject to and must follow
+[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general).
+Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
+Any use of third-party trademarks or logos are subject to those third-party's policies.
diff --git a/common/Cargo.toml b/intent_brokering/common/Cargo.toml
similarity index 100%
rename from common/Cargo.toml
rename to intent_brokering/common/Cargo.toml
diff --git a/common/src/config.rs b/intent_brokering/common/src/config.rs
similarity index 100%
rename from common/src/config.rs
rename to intent_brokering/common/src/config.rs
diff --git a/common/src/error.rs b/intent_brokering/common/src/error.rs
similarity index 100%
rename from common/src/error.rs
rename to intent_brokering/common/src/error.rs
diff --git a/common/src/ext.rs b/intent_brokering/common/src/ext.rs
similarity index 100%
rename from common/src/ext.rs
rename to intent_brokering/common/src/ext.rs
diff --git a/common/src/lib.rs b/intent_brokering/common/src/lib.rs
similarity index 100%
rename from common/src/lib.rs
rename to intent_brokering/common/src/lib.rs
diff --git a/common/src/query.rs b/intent_brokering/common/src/query.rs
similarity index 100%
rename from common/src/query.rs
rename to intent_brokering/common/src/query.rs
diff --git a/common/src/shutdown.rs b/intent_brokering/common/src/shutdown.rs
similarity index 100%
rename from common/src/shutdown.rs
rename to intent_brokering/common/src/shutdown.rs
diff --git a/common/src/streaming_ess.rs b/intent_brokering/common/src/streaming_ess.rs
similarity index 100%
rename from common/src/streaming_ess.rs
rename to intent_brokering/common/src/streaming_ess.rs
diff --git a/common/src/tokio_runtime_fork.rs b/intent_brokering/common/src/tokio_runtime_fork.rs
similarity index 100%
rename from common/src/tokio_runtime_fork.rs
rename to intent_brokering/common/src/tokio_runtime_fork.rs
diff --git a/ess/Cargo.toml b/intent_brokering/ess/Cargo.toml
similarity index 100%
rename from ess/Cargo.toml
rename to intent_brokering/ess/Cargo.toml
diff --git a/ess/README.md b/intent_brokering/ess/README.md
similarity index 81%
rename from ess/README.md
rename to intent_brokering/ess/README.md
index 29ee0faf..c06e70fc 100644
--- a/ess/README.md
+++ b/intent_brokering/ess/README.md
@@ -1,7 +1,7 @@
# Event sub-system (ESS)
This crate contains the implementation of the event sub-system (ESS) based on
-[ADR-0008](../docs/adr/0008-event-sub-system.md). On a high level, the ESS
+[ADR-0008](../../docs/adr/0008-event-sub-system.md). On a high level, the ESS
connects components that subscribe to a set of events with components publishing
events.
diff --git a/ess/benches/load_bench.rs b/intent_brokering/ess/benches/load_bench.rs
similarity index 100%
rename from ess/benches/load_bench.rs
rename to intent_brokering/ess/benches/load_bench.rs
diff --git a/ess/src/ess.rs b/intent_brokering/ess/src/ess.rs
similarity index 100%
rename from ess/src/ess.rs
rename to intent_brokering/ess/src/ess.rs
diff --git a/ess/src/lib.rs b/intent_brokering/ess/src/lib.rs
similarity index 100%
rename from ess/src/lib.rs
rename to intent_brokering/ess/src/lib.rs
diff --git a/examples/applications/Dockerfile.base b/intent_brokering/examples/applications/Dockerfile.base
similarity index 100%
rename from examples/applications/Dockerfile.base
rename to intent_brokering/examples/applications/Dockerfile.base
diff --git a/examples/applications/Dockerfile.cloud-object-detection b/intent_brokering/examples/applications/Dockerfile.cloud-object-detection
similarity index 100%
rename from examples/applications/Dockerfile.cloud-object-detection
rename to intent_brokering/examples/applications/Dockerfile.cloud-object-detection
diff --git a/examples/applications/Dockerfile.generic b/intent_brokering/examples/applications/Dockerfile.generic
similarity index 100%
rename from examples/applications/Dockerfile.generic
rename to intent_brokering/examples/applications/Dockerfile.generic
diff --git a/examples/applications/Dockerfile.kv-app.ci b/intent_brokering/examples/applications/Dockerfile.kv-app.ci
similarity index 100%
rename from examples/applications/Dockerfile.kv-app.ci
rename to intent_brokering/examples/applications/Dockerfile.kv-app.ci
diff --git a/examples/applications/Dockerfile.lt-provider-app.ci b/intent_brokering/examples/applications/Dockerfile.lt-provider-app.ci
similarity index 100%
rename from examples/applications/Dockerfile.lt-provider-app.ci
rename to intent_brokering/examples/applications/Dockerfile.lt-provider-app.ci
diff --git a/examples/applications/Dockerfile.mock-vas b/intent_brokering/examples/applications/Dockerfile.mock-vas
similarity index 88%
rename from examples/applications/Dockerfile.mock-vas
rename to intent_brokering/examples/applications/Dockerfile.mock-vas
index 941e90c5..2020ad21 100644
--- a/examples/applications/Dockerfile.mock-vas
+++ b/intent_brokering/examples/applications/Dockerfile.mock-vas
@@ -15,7 +15,7 @@ RUN apk add bash
# Copy our build
COPY --from=base /sdv/target/x86_64-unknown-linux-musl/release/${APP_NAME} /sdv/${APP_NAME}
-COPY ./examples/applications/dog-mode-ui/mock_provider_dog_mode_demo.sh /sdv/
+COPY ./intent_brokering/examples/applications/dog-mode-ui/mock_provider_dog_mode_demo.sh /sdv/
# Use the unprivileged chariott user during execution.
USER ${USER_NAME}:${USER_NAME}
diff --git a/examples/applications/Dockerfile.simulated-camera b/intent_brokering/examples/applications/Dockerfile.simulated-camera
similarity index 89%
rename from examples/applications/Dockerfile.simulated-camera
rename to intent_brokering/examples/applications/Dockerfile.simulated-camera
index f4306ea8..bdf11f1f 100644
--- a/examples/applications/Dockerfile.simulated-camera
+++ b/intent_brokering/examples/applications/Dockerfile.simulated-camera
@@ -15,7 +15,7 @@ RUN mkdir -p /sdv/images
# Copy our build
COPY --from=base /sdv/target/x86_64-unknown-linux-musl/release/${APP_NAME} /sdv/${APP_NAME}
-COPY ./examples/applications/simulated-camera/images /sdv/images/
+COPY ./intent_brokering/examples/applications/simulated-camera/images /sdv/images/
# Use the unprivileged chariott user during execution.
USER ${USER_NAME}:${USER_NAME}
diff --git a/examples/applications/README.md b/intent_brokering/examples/applications/README.md
similarity index 98%
rename from examples/applications/README.md
rename to intent_brokering/examples/applications/README.md
index 182fcaab..6909ece6 100644
--- a/examples/applications/README.md
+++ b/intent_brokering/examples/applications/README.md
@@ -11,7 +11,7 @@ The dog mode allows a car owner to keep their dog safe while they are away from
the car. If the ambient temperature is high, different applications will
interact with each other to ensure that the temperature inside the car is at a
safe level for the dog. This works as follows: first, the dog mode logic
-application (`examples/applications/dog-mode-logic`) detects whether a dog is
+application (`intent_brokering/examples/applications/dog-mode-logic`) detects whether a dog is
present, either by automatically connecting a [camera][simulated camera] with
[object detection][local object detection], or through user interaction in the
[UI application][ui]. If a dog is detected, it will monitor various vehicle
@@ -53,7 +53,7 @@ SDK and ASP.NET Core runtime.
You can follow a simulation of this scenario by executing
```bash
-./examples/applications/run_demo.sh --cognitive_endpoint "" --cognitive_key ""
+./intent_brokering/examples/applications/run_demo.sh --cognitive_endpoint "" --cognitive_key ""
```
from the repository root directory.
diff --git a/examples/applications/cloud-object-detection/Cargo.toml b/intent_brokering/examples/applications/cloud-object-detection/Cargo.toml
similarity index 100%
rename from examples/applications/cloud-object-detection/Cargo.toml
rename to intent_brokering/examples/applications/cloud-object-detection/Cargo.toml
diff --git a/examples/applications/cloud-object-detection/README.md b/intent_brokering/examples/applications/cloud-object-detection/README.md
similarity index 82%
rename from examples/applications/cloud-object-detection/README.md
rename to intent_brokering/examples/applications/cloud-object-detection/README.md
index 0f058936..1d18b9fc 100644
--- a/examples/applications/cloud-object-detection/README.md
+++ b/intent_brokering/examples/applications/cloud-object-detection/README.md
@@ -7,7 +7,7 @@ To run the application:
1. Start chariott runtime by executing `cargo run` from the root directory
2. Start it by executing `cargo run` from the
- `examples/applications/cloud-object-detection` directory while specifying
+ `intent_brokering/examples/applications/cloud-object-detection` directory while specifying
`COGNITIVE_ENDPOINT` (i.e. `myendpoint.cognitiveservices.azure.com`) and
`COGNITIVE_KEY` environment variables.
3. In the root directory create a `detect_image.json` file with the following
@@ -36,7 +36,7 @@ To run the application:
```
4. Execute detection with `grpcurl -v -plaintext -import-path proto/ \
- -import-path examples/applications/proto -use-reflection -proto \
- examples/applications/proto/examples/detection/v1/detection.proto -d @ \
+ -import-path intent_brokering/examples/applications/proto -use-reflection -proto \
+ intent_brokering/examples/applications/proto/examples/detection/v1/detection.proto -d @ \
localhost:4243 chariott.runtime.v1.ChariottService/Fulfill < \
detect_image.json`
diff --git a/examples/applications/cloud-object-detection/src/chariott_provider.rs b/intent_brokering/examples/applications/cloud-object-detection/src/chariott_provider.rs
similarity index 100%
rename from examples/applications/cloud-object-detection/src/chariott_provider.rs
rename to intent_brokering/examples/applications/cloud-object-detection/src/chariott_provider.rs
diff --git a/examples/applications/cloud-object-detection/src/detection.rs b/intent_brokering/examples/applications/cloud-object-detection/src/detection.rs
similarity index 100%
rename from examples/applications/cloud-object-detection/src/detection.rs
rename to intent_brokering/examples/applications/cloud-object-detection/src/detection.rs
diff --git a/examples/applications/cloud-object-detection/src/main.rs b/intent_brokering/examples/applications/cloud-object-detection/src/main.rs
similarity index 100%
rename from examples/applications/cloud-object-detection/src/main.rs
rename to intent_brokering/examples/applications/cloud-object-detection/src/main.rs
diff --git a/examples/applications/dog-mode-logic/Cargo.toml b/intent_brokering/examples/applications/dog-mode-logic/Cargo.toml
similarity index 100%
rename from examples/applications/dog-mode-logic/Cargo.toml
rename to intent_brokering/examples/applications/dog-mode-logic/Cargo.toml
diff --git a/examples/applications/dog-mode-logic/src/dog_mode_status.rs b/intent_brokering/examples/applications/dog-mode-logic/src/dog_mode_status.rs
similarity index 100%
rename from examples/applications/dog-mode-logic/src/dog_mode_status.rs
rename to intent_brokering/examples/applications/dog-mode-logic/src/dog_mode_status.rs
diff --git a/examples/applications/dog-mode-logic/src/main.rs b/intent_brokering/examples/applications/dog-mode-logic/src/main.rs
similarity index 100%
rename from examples/applications/dog-mode-logic/src/main.rs
rename to intent_brokering/examples/applications/dog-mode-logic/src/main.rs
diff --git a/examples/applications/dog-mode-ui/.editorconfig b/intent_brokering/examples/applications/dog-mode-ui/.editorconfig
similarity index 100%
rename from examples/applications/dog-mode-ui/.editorconfig
rename to intent_brokering/examples/applications/dog-mode-ui/.editorconfig
diff --git a/examples/applications/dog-mode-ui/.gitignore b/intent_brokering/examples/applications/dog-mode-ui/.gitignore
similarity index 100%
rename from examples/applications/dog-mode-ui/.gitignore
rename to intent_brokering/examples/applications/dog-mode-ui/.gitignore
diff --git a/examples/applications/dog-mode-ui/DogModeDashboard.sln b/intent_brokering/examples/applications/dog-mode-ui/DogModeDashboard.sln
similarity index 100%
rename from examples/applications/dog-mode-ui/DogModeDashboard.sln
rename to intent_brokering/examples/applications/dog-mode-ui/DogModeDashboard.sln
diff --git a/examples/applications/dog-mode-ui/README.md b/intent_brokering/examples/applications/dog-mode-ui/README.md
similarity index 94%
rename from examples/applications/dog-mode-ui/README.md
rename to intent_brokering/examples/applications/dog-mode-ui/README.md
index 86665468..c2fd2982 100644
--- a/examples/applications/dog-mode-ui/README.md
+++ b/intent_brokering/examples/applications/dog-mode-ui/README.md
@@ -50,4 +50,4 @@ Use the `mock_provider_dog_mode_demo.sh` script to pipe its output into the mock
VAS to generate mocked sensor data (assuming the current working directory is
the root of the repo):
- ./examples/applications/dog-mode-ui/mock_provider_dog_mode_demo.sh | cargo run ...
+ ./intent_brokering/examples/applications/dog-mode-ui/mock_provider_dog_mode_demo.sh | cargo run ...
diff --git a/examples/applications/dog-mode-ui/global.json b/intent_brokering/examples/applications/dog-mode-ui/global.json
similarity index 100%
rename from examples/applications/dog-mode-ui/global.json
rename to intent_brokering/examples/applications/dog-mode-ui/global.json
diff --git a/examples/applications/dog-mode-ui/mock_provider_dog_mode_demo.sh b/intent_brokering/examples/applications/dog-mode-ui/mock_provider_dog_mode_demo.sh
similarity index 100%
rename from examples/applications/dog-mode-ui/mock_provider_dog_mode_demo.sh
rename to intent_brokering/examples/applications/dog-mode-ui/mock_provider_dog_mode_demo.sh
diff --git a/examples/applications/dog-mode-ui/src/DogModeDashboard.csproj b/intent_brokering/examples/applications/dog-mode-ui/src/DogModeDashboard.csproj
similarity index 100%
rename from examples/applications/dog-mode-ui/src/DogModeDashboard.csproj
rename to intent_brokering/examples/applications/dog-mode-ui/src/DogModeDashboard.csproj
diff --git a/examples/applications/dog-mode-ui/src/Program.cs b/intent_brokering/examples/applications/dog-mode-ui/src/Program.cs
similarity index 100%
rename from examples/applications/dog-mode-ui/src/Program.cs
rename to intent_brokering/examples/applications/dog-mode-ui/src/Program.cs
diff --git a/examples/applications/dog-mode-ui/src/Properties/launchSettings.json b/intent_brokering/examples/applications/dog-mode-ui/src/Properties/launchSettings.json
similarity index 100%
rename from examples/applications/dog-mode-ui/src/Properties/launchSettings.json
rename to intent_brokering/examples/applications/dog-mode-ui/src/Properties/launchSettings.json
diff --git a/examples/applications/dog-mode-ui/src/appsettings.Development.json b/intent_brokering/examples/applications/dog-mode-ui/src/appsettings.Development.json
similarity index 100%
rename from examples/applications/dog-mode-ui/src/appsettings.Development.json
rename to intent_brokering/examples/applications/dog-mode-ui/src/appsettings.Development.json
diff --git a/examples/applications/dog-mode-ui/src/appsettings.json b/intent_brokering/examples/applications/dog-mode-ui/src/appsettings.json
similarity index 100%
rename from examples/applications/dog-mode-ui/src/appsettings.json
rename to intent_brokering/examples/applications/dog-mode-ui/src/appsettings.json
diff --git a/examples/applications/dog-mode-ui/src/wwwroot/fa/LICENSE.txt b/intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/fa/LICENSE.txt
similarity index 100%
rename from examples/applications/dog-mode-ui/src/wwwroot/fa/LICENSE.txt
rename to intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/fa/LICENSE.txt
diff --git a/examples/applications/dog-mode-ui/src/wwwroot/fa/js/fontawesome.min.js b/intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/fa/js/fontawesome.min.js
similarity index 100%
rename from examples/applications/dog-mode-ui/src/wwwroot/fa/js/fontawesome.min.js
rename to intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/fa/js/fontawesome.min.js
diff --git a/examples/applications/dog-mode-ui/src/wwwroot/fa/js/solid.min.js b/intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/fa/js/solid.min.js
similarity index 100%
rename from examples/applications/dog-mode-ui/src/wwwroot/fa/js/solid.min.js
rename to intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/fa/js/solid.min.js
diff --git a/examples/applications/dog-mode-ui/src/wwwroot/index.css b/intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/index.css
similarity index 100%
rename from examples/applications/dog-mode-ui/src/wwwroot/index.css
rename to intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/index.css
diff --git a/examples/applications/dog-mode-ui/src/wwwroot/index.html b/intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/index.html
similarity index 100%
rename from examples/applications/dog-mode-ui/src/wwwroot/index.html
rename to intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/index.html
diff --git a/examples/applications/dog-mode-ui/src/wwwroot/streaming.html b/intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/streaming.html
similarity index 100%
rename from examples/applications/dog-mode-ui/src/wwwroot/streaming.html
rename to intent_brokering/examples/applications/dog-mode-ui/src/wwwroot/streaming.html
diff --git a/examples/applications/invoke-command/Cargo.toml b/intent_brokering/examples/applications/invoke-command/Cargo.toml
similarity index 100%
rename from examples/applications/invoke-command/Cargo.toml
rename to intent_brokering/examples/applications/invoke-command/Cargo.toml
diff --git a/examples/applications/invoke-command/README.md b/intent_brokering/examples/applications/invoke-command/README.md
similarity index 100%
rename from examples/applications/invoke-command/README.md
rename to intent_brokering/examples/applications/invoke-command/README.md
diff --git a/examples/applications/invoke-command/src/chariott_provider.rs b/intent_brokering/examples/applications/invoke-command/src/chariott_provider.rs
similarity index 100%
rename from examples/applications/invoke-command/src/chariott_provider.rs
rename to intent_brokering/examples/applications/invoke-command/src/chariott_provider.rs
diff --git a/examples/applications/invoke-command/src/main.rs b/intent_brokering/examples/applications/invoke-command/src/main.rs
similarity index 100%
rename from examples/applications/invoke-command/src/main.rs
rename to intent_brokering/examples/applications/invoke-command/src/main.rs
diff --git a/examples/applications/invoke_object_detection.sh b/intent_brokering/examples/applications/invoke_object_detection.sh
similarity index 92%
rename from examples/applications/invoke_object_detection.sh
rename to intent_brokering/examples/applications/invoke_object_detection.sh
index deb8b4e8..c939f1fb 100755
--- a/examples/applications/invoke_object_detection.sh
+++ b/intent_brokering/examples/applications/invoke_object_detection.sh
@@ -21,7 +21,7 @@ fi
DETECTION_NAMESPACE="sdv.detection"
-if [ "$(../../tools/charc inspect system.registry $DETECTION_NAMESPACE | jq '. | length')" -eq 0 ]
+if [ "$(../../intent_brokering/tools/charc inspect system.registry $DETECTION_NAMESPACE | jq '. | length')" -eq 0 ]
then
echo>&2 "No providers registered for $DETECTION_NAMESPACE."
exit 1
diff --git a/examples/applications/kv-app/Cargo.toml b/intent_brokering/examples/applications/kv-app/Cargo.toml
similarity index 100%
rename from examples/applications/kv-app/Cargo.toml
rename to intent_brokering/examples/applications/kv-app/Cargo.toml
diff --git a/examples/applications/kv-app/README.md b/intent_brokering/examples/applications/kv-app/README.md
similarity index 96%
rename from examples/applications/kv-app/README.md
rename to intent_brokering/examples/applications/kv-app/README.md
index d52eaf4f..7ca4f3cd 100644
--- a/examples/applications/kv-app/README.md
+++ b/intent_brokering/examples/applications/kv-app/README.md
@@ -66,7 +66,7 @@ Open a channel for receiving events:
```bash
grpcurl -v -plaintext -import-path proto -proto \
- proto/chariott/streaming/v1/streaming.proto 0.0.0.0:50064 \
+ intent_brokering/proto/chariott/streaming/v1/streaming.proto 0.0.0.0:50064 \
chariott.streaming.v1.ChannelService/Open | tee events.log &
```
diff --git a/examples/applications/kv-app/src/chariott_provider.rs b/intent_brokering/examples/applications/kv-app/src/chariott_provider.rs
similarity index 100%
rename from examples/applications/kv-app/src/chariott_provider.rs
rename to intent_brokering/examples/applications/kv-app/src/chariott_provider.rs
diff --git a/examples/applications/kv-app/src/main.rs b/intent_brokering/examples/applications/kv-app/src/main.rs
similarity index 100%
rename from examples/applications/kv-app/src/main.rs
rename to intent_brokering/examples/applications/kv-app/src/main.rs
diff --git a/examples/applications/local-object-detection/Cargo.toml b/intent_brokering/examples/applications/local-object-detection/Cargo.toml
similarity index 100%
rename from examples/applications/local-object-detection/Cargo.toml
rename to intent_brokering/examples/applications/local-object-detection/Cargo.toml
diff --git a/examples/applications/local-object-detection/README.md b/intent_brokering/examples/applications/local-object-detection/README.md
similarity index 82%
rename from examples/applications/local-object-detection/README.md
rename to intent_brokering/examples/applications/local-object-detection/README.md
index 3d0aa787..396fc328 100644
--- a/examples/applications/local-object-detection/README.md
+++ b/intent_brokering/examples/applications/local-object-detection/README.md
@@ -7,7 +7,7 @@ To run the application:
1. Start chariott runtime by executing `cargo run` from the root directory
2. Start detection application by executing `cargo run` from the
- `examples/applications/local-object-detection` directory.
+ `intent_brokering/examples/applications/local-object-detection` directory.
3. In the root directory create a `detect_image.json` file with the following
message structure:
@@ -34,7 +34,7 @@ To run the application:
```
4. Execute detection with `grpcurl -v -plaintext -import-path proto/ \
- -import-path examples/applications/proto -use-reflection -proto \
- examples/applications/proto/examples/detection/v1/detection.proto -d @ \
+ -import-path intent_brokering/examples/applications/proto -use-reflection -proto \
+ intent_brokering/examples/applications/proto/examples/detection/v1/detection.proto -d @ \
localhost:4243 chariott.runtime.v1.ChariottService/Fulfill < \
detect_image.json`
diff --git a/examples/applications/local-object-detection/models/categories.json b/intent_brokering/examples/applications/local-object-detection/models/categories.json
similarity index 100%
rename from examples/applications/local-object-detection/models/categories.json
rename to intent_brokering/examples/applications/local-object-detection/models/categories.json
diff --git a/examples/applications/local-object-detection/models/readme.txt b/intent_brokering/examples/applications/local-object-detection/models/readme.txt
similarity index 100%
rename from examples/applications/local-object-detection/models/readme.txt
rename to intent_brokering/examples/applications/local-object-detection/models/readme.txt
diff --git a/examples/applications/local-object-detection/models/ssd_mobilenet_v2_coco.pb b/intent_brokering/examples/applications/local-object-detection/models/ssd_mobilenet_v2_coco.pb
similarity index 100%
rename from examples/applications/local-object-detection/models/ssd_mobilenet_v2_coco.pb
rename to intent_brokering/examples/applications/local-object-detection/models/ssd_mobilenet_v2_coco.pb
diff --git a/examples/applications/local-object-detection/src/chariott_provider.rs b/intent_brokering/examples/applications/local-object-detection/src/chariott_provider.rs
similarity index 100%
rename from examples/applications/local-object-detection/src/chariott_provider.rs
rename to intent_brokering/examples/applications/local-object-detection/src/chariott_provider.rs
diff --git a/examples/applications/local-object-detection/src/detection.rs b/intent_brokering/examples/applications/local-object-detection/src/detection.rs
similarity index 100%
rename from examples/applications/local-object-detection/src/detection.rs
rename to intent_brokering/examples/applications/local-object-detection/src/detection.rs
diff --git a/examples/applications/local-object-detection/src/main.rs b/intent_brokering/examples/applications/local-object-detection/src/main.rs
similarity index 100%
rename from examples/applications/local-object-detection/src/main.rs
rename to intent_brokering/examples/applications/local-object-detection/src/main.rs
diff --git a/examples/applications/lt-consumer/Cargo.toml b/intent_brokering/examples/applications/lt-consumer/Cargo.toml
similarity index 100%
rename from examples/applications/lt-consumer/Cargo.toml
rename to intent_brokering/examples/applications/lt-consumer/Cargo.toml
diff --git a/examples/applications/lt-consumer/src/main.rs b/intent_brokering/examples/applications/lt-consumer/src/main.rs
similarity index 100%
rename from examples/applications/lt-consumer/src/main.rs
rename to intent_brokering/examples/applications/lt-consumer/src/main.rs
diff --git a/examples/applications/lt-provider/Cargo.toml b/intent_brokering/examples/applications/lt-provider/Cargo.toml
similarity index 100%
rename from examples/applications/lt-provider/Cargo.toml
rename to intent_brokering/examples/applications/lt-provider/Cargo.toml
diff --git a/examples/applications/lt-provider/src/main.rs b/intent_brokering/examples/applications/lt-provider/src/main.rs
similarity index 100%
rename from examples/applications/lt-provider/src/main.rs
rename to intent_brokering/examples/applications/lt-provider/src/main.rs
diff --git a/examples/applications/mock-vas/Cargo.toml b/intent_brokering/examples/applications/mock-vas/Cargo.toml
similarity index 100%
rename from examples/applications/mock-vas/Cargo.toml
rename to intent_brokering/examples/applications/mock-vas/Cargo.toml
diff --git a/examples/applications/mock-vas/README.md b/intent_brokering/examples/applications/mock-vas/README.md
similarity index 100%
rename from examples/applications/mock-vas/README.md
rename to intent_brokering/examples/applications/mock-vas/README.md
diff --git a/examples/applications/mock-vas/src/chariott_provider.rs b/intent_brokering/examples/applications/mock-vas/src/chariott_provider.rs
similarity index 100%
rename from examples/applications/mock-vas/src/chariott_provider.rs
rename to intent_brokering/examples/applications/mock-vas/src/chariott_provider.rs
diff --git a/examples/applications/mock-vas/src/communication.rs b/intent_brokering/examples/applications/mock-vas/src/communication.rs
similarity index 100%
rename from examples/applications/mock-vas/src/communication.rs
rename to intent_brokering/examples/applications/mock-vas/src/communication.rs
diff --git a/examples/applications/mock-vas/src/main.rs b/intent_brokering/examples/applications/mock-vas/src/main.rs
similarity index 100%
rename from examples/applications/mock-vas/src/main.rs
rename to intent_brokering/examples/applications/mock-vas/src/main.rs
diff --git a/examples/applications/mock-vas/src/simulation.rs b/intent_brokering/examples/applications/mock-vas/src/simulation.rs
similarity index 100%
rename from examples/applications/mock-vas/src/simulation.rs
rename to intent_brokering/examples/applications/mock-vas/src/simulation.rs
diff --git a/examples/applications/proto/buf.yaml b/intent_brokering/examples/applications/proto/buf.yaml
similarity index 100%
rename from examples/applications/proto/buf.yaml
rename to intent_brokering/examples/applications/proto/buf.yaml
diff --git a/examples/applications/proto/examples/detection/v1/detection.proto b/intent_brokering/examples/applications/proto/examples/detection/v1/detection.proto
similarity index 100%
rename from examples/applications/proto/examples/detection/v1/detection.proto
rename to intent_brokering/examples/applications/proto/examples/detection/v1/detection.proto
diff --git a/examples/applications/run_demo.sh b/intent_brokering/examples/applications/run_demo.sh
similarity index 71%
rename from examples/applications/run_demo.sh
rename to intent_brokering/examples/applications/run_demo.sh
index e2287922..db8908e5 100755
--- a/examples/applications/run_demo.sh
+++ b/intent_brokering/examples/applications/run_demo.sh
@@ -4,7 +4,7 @@
# SPDX-License-Identifier: MIT
set -e
-cd "$(dirname "$0")/../.."
+cd "$(dirname "$0")/../../.."
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo 'Run Chariott demo.
@@ -60,13 +60,13 @@ cargo build --workspace
sleep 2
-./examples/applications/dog-mode-ui/mock_provider_dog_mode_demo.sh | ANNOUNCE_URL=http://localhost:50051 ./target/debug/mock-vas > target/logs/mock_vas.txt 2>&1 & # DevSkim: ignore DS162092
+./intent_brokering/examples/applications/dog-mode-ui/mock_provider_dog_mode_demo.sh | ANNOUNCE_URL=http://localhost:50051 ./target/debug/mock-vas > target/logs/mock_vas.txt 2>&1 & # DevSkim: ignore DS162092
MOCK_VAS_PID=$!
ANNOUNCE_URL=http://localhost:50064 ./target/debug/kv-app > target/logs/kv_app.txt 2>&1 & # DevSkim: ignore DS162092
-SIMULATED_CAMERA_APP_IMAGES_DIRECTORY=./examples/applications/simulated-camera/images ANNOUNCE_URL=http://localhost:50066 ./target/debug/simulated-camera-app > target/logs/simulated_camera_app.txt 2>&1 & # DevSkim: ignore DS162092
+SIMULATED_CAMERA_APP_IMAGES_DIRECTORY=./intent_brokering/examples/applications/simulated-camera/images ANNOUNCE_URL=http://localhost:50066 ./target/debug/simulated-camera-app > target/logs/simulated_camera_app.txt 2>&1 & # DevSkim: ignore DS162092
CAMERA_PID=$!
TENSORFLOW_LIB_PATH="$(dirname $(find target -name libtensorflow.so -printf '%T@\t%p\n' | sort -nr | cut -f 2- | head -1))"
-LIBRARY_PATH=$TENSORFLOW_LIB_PATH LD_LIBRARY_PATH=$TENSORFLOW_LIB_PATH CATEGORIES_FILE_PATH=./examples/applications/local-object-detection/models/categories.json ANNOUNCE_URL=http://localhost:50061 ./target/debug/local-object-detection-app > target/logs/local_object_detection_app.txt 2>&1 & # DevSkim: ignore DS162092
+LIBRARY_PATH=$TENSORFLOW_LIB_PATH LD_LIBRARY_PATH=$TENSORFLOW_LIB_PATH CATEGORIES_FILE_PATH=./intent_brokering/examples/applications/local-object-detection/models/categories.json ANNOUNCE_URL=http://localhost:50061 ./target/debug/local-object-detection-app > target/logs/local_object_detection_app.txt 2>&1 & # DevSkim: ignore DS162092
LOCAL_DETECTION_PID=$!
if [[ ! -z "$cognitive_endpoint" || ! -z "$cognitive_key" ]]; then
COGNITIVE_ENDPOINT=$cognitive_endpoint COGNITIVE_KEY=$cognitive_key ANNOUNCE_URL=http://localhost:50063 ./target/debug/cloud-object-detection-app > target/logs/cloud_object_detection_app.txt 2>&1 & # DevSkim: ignore DS162092
@@ -81,6 +81,6 @@ sleep 5
sleep 2
-dotnet run --project examples/applications/dog-mode-ui/src > ./target/logs/ui.txt 2>&1 &
+dotnet run --project intent_brokering/examples/applications/dog-mode-ui/src > ./target/logs/ui.txt 2>&1 &
wait
diff --git a/examples/applications/simple-provider/Cargo.toml b/intent_brokering/examples/applications/simple-provider/Cargo.toml
similarity index 100%
rename from examples/applications/simple-provider/Cargo.toml
rename to intent_brokering/examples/applications/simple-provider/Cargo.toml
diff --git a/examples/applications/simple-provider/README.md b/intent_brokering/examples/applications/simple-provider/README.md
similarity index 100%
rename from examples/applications/simple-provider/README.md
rename to intent_brokering/examples/applications/simple-provider/README.md
diff --git a/examples/applications/simple-provider/src/chariott_provider.rs b/intent_brokering/examples/applications/simple-provider/src/chariott_provider.rs
similarity index 100%
rename from examples/applications/simple-provider/src/chariott_provider.rs
rename to intent_brokering/examples/applications/simple-provider/src/chariott_provider.rs
diff --git a/examples/applications/simple-provider/src/main.rs b/intent_brokering/examples/applications/simple-provider/src/main.rs
similarity index 100%
rename from examples/applications/simple-provider/src/main.rs
rename to intent_brokering/examples/applications/simple-provider/src/main.rs
diff --git a/examples/applications/simulated-camera/Cargo.toml b/intent_brokering/examples/applications/simulated-camera/Cargo.toml
similarity index 100%
rename from examples/applications/simulated-camera/Cargo.toml
rename to intent_brokering/examples/applications/simulated-camera/Cargo.toml
diff --git a/examples/applications/simulated-camera/LICENSE_IMAGES b/intent_brokering/examples/applications/simulated-camera/LICENSE_IMAGES
similarity index 100%
rename from examples/applications/simulated-camera/LICENSE_IMAGES
rename to intent_brokering/examples/applications/simulated-camera/LICENSE_IMAGES
diff --git a/examples/applications/simulated-camera/README.md b/intent_brokering/examples/applications/simulated-camera/README.md
similarity index 88%
rename from examples/applications/simulated-camera/README.md
rename to intent_brokering/examples/applications/simulated-camera/README.md
index 2c13cd40..fd5df7cb 100644
--- a/examples/applications/simulated-camera/README.md
+++ b/intent_brokering/examples/applications/simulated-camera/README.md
@@ -7,15 +7,15 @@ manual mode where you specify the frame rate event yourself.
## To run the application
-1. Start chariott runtime by executing `cargo run` from the root directory
-2. Navigate to `examples/applications/simulated-camera` directory
+1. Start chariott runtime by executing `cargo run -p chariott` from the root directory
+2. Navigate to `intent_brokering/examples/applications/simulated-camera` directory
3. Create a `images` directory and place there all the `.jpg` files you want the
camera application to stream
4. Start camera application by executing `cargo run` from the
- `examples/applications/simulated-camera` directory.
+ `intent_brokering/examples/applications/simulated-camera` directory.
5. In another terminal, open a channel to the simulated-camera with `grpcurl -v \
-plaintext -import-path proto -proto \
- proto/chariott/streaming/v1/streaming.proto localhost:50066 \
+ intent_brokering/proto/chariott/streaming/v1/streaming.proto localhost:50066 \
chariott.streaming.v1.ChannelService/Open` and take a note of the returned
channel id in the metadata _x-chariott-channel-id_.
6. In yet another terminal, call the following, using the channel id from the
diff --git a/examples/applications/simulated-camera/images/dog_1.jpg b/intent_brokering/examples/applications/simulated-camera/images/dog_1.jpg
similarity index 100%
rename from examples/applications/simulated-camera/images/dog_1.jpg
rename to intent_brokering/examples/applications/simulated-camera/images/dog_1.jpg
diff --git a/examples/applications/simulated-camera/images/dog_2.jpg b/intent_brokering/examples/applications/simulated-camera/images/dog_2.jpg
similarity index 100%
rename from examples/applications/simulated-camera/images/dog_2.jpg
rename to intent_brokering/examples/applications/simulated-camera/images/dog_2.jpg
diff --git a/examples/applications/simulated-camera/images/dog_3.jpg b/intent_brokering/examples/applications/simulated-camera/images/dog_3.jpg
similarity index 100%
rename from examples/applications/simulated-camera/images/dog_3.jpg
rename to intent_brokering/examples/applications/simulated-camera/images/dog_3.jpg
diff --git a/examples/applications/simulated-camera/images/dog_4.jpg b/intent_brokering/examples/applications/simulated-camera/images/dog_4.jpg
similarity index 100%
rename from examples/applications/simulated-camera/images/dog_4.jpg
rename to intent_brokering/examples/applications/simulated-camera/images/dog_4.jpg
diff --git a/examples/applications/simulated-camera/images/no_dog.jpg b/intent_brokering/examples/applications/simulated-camera/images/no_dog.jpg
similarity index 100%
rename from examples/applications/simulated-camera/images/no_dog.jpg
rename to intent_brokering/examples/applications/simulated-camera/images/no_dog.jpg
diff --git a/examples/applications/simulated-camera/src/camera.rs b/intent_brokering/examples/applications/simulated-camera/src/camera.rs
similarity index 100%
rename from examples/applications/simulated-camera/src/camera.rs
rename to intent_brokering/examples/applications/simulated-camera/src/camera.rs
diff --git a/examples/applications/simulated-camera/src/chariott_provider.rs b/intent_brokering/examples/applications/simulated-camera/src/chariott_provider.rs
similarity index 100%
rename from examples/applications/simulated-camera/src/chariott_provider.rs
rename to intent_brokering/examples/applications/simulated-camera/src/chariott_provider.rs
diff --git a/examples/applications/simulated-camera/src/communication.rs b/intent_brokering/examples/applications/simulated-camera/src/communication.rs
similarity index 100%
rename from examples/applications/simulated-camera/src/communication.rs
rename to intent_brokering/examples/applications/simulated-camera/src/communication.rs
diff --git a/examples/applications/simulated-camera/src/main.rs b/intent_brokering/examples/applications/simulated-camera/src/main.rs
similarity index 100%
rename from examples/applications/simulated-camera/src/main.rs
rename to intent_brokering/examples/applications/simulated-camera/src/main.rs
diff --git a/examples/common/Cargo.toml b/intent_brokering/examples/common/Cargo.toml
similarity index 100%
rename from examples/common/Cargo.toml
rename to intent_brokering/examples/common/Cargo.toml
diff --git a/examples/common/build.rs b/intent_brokering/examples/common/build.rs
similarity index 100%
rename from examples/common/build.rs
rename to intent_brokering/examples/common/build.rs
diff --git a/examples/common/src/chariott/api.rs b/intent_brokering/examples/common/src/chariott/api.rs
similarity index 100%
rename from examples/common/src/chariott/api.rs
rename to intent_brokering/examples/common/src/chariott/api.rs
diff --git a/examples/common/src/chariott/inspection.rs b/intent_brokering/examples/common/src/chariott/inspection.rs
similarity index 100%
rename from examples/common/src/chariott/inspection.rs
rename to intent_brokering/examples/common/src/chariott/inspection.rs
diff --git a/examples/common/src/chariott/mod.rs b/intent_brokering/examples/common/src/chariott/mod.rs
similarity index 100%
rename from examples/common/src/chariott/mod.rs
rename to intent_brokering/examples/common/src/chariott/mod.rs
diff --git a/examples/common/src/chariott/provider.rs b/intent_brokering/examples/common/src/chariott/provider.rs
similarity index 100%
rename from examples/common/src/chariott/provider.rs
rename to intent_brokering/examples/common/src/chariott/provider.rs
diff --git a/examples/common/src/chariott/registration.rs b/intent_brokering/examples/common/src/chariott/registration.rs
similarity index 100%
rename from examples/common/src/chariott/registration.rs
rename to intent_brokering/examples/common/src/chariott/registration.rs
diff --git a/examples/common/src/chariott/streaming.rs b/intent_brokering/examples/common/src/chariott/streaming.rs
similarity index 100%
rename from examples/common/src/chariott/streaming.rs
rename to intent_brokering/examples/common/src/chariott/streaming.rs
diff --git a/examples/common/src/chariott/value.rs b/intent_brokering/examples/common/src/chariott/value.rs
similarity index 100%
rename from examples/common/src/chariott/value.rs
rename to intent_brokering/examples/common/src/chariott/value.rs
diff --git a/examples/common/src/examples/detection.rs b/intent_brokering/examples/common/src/examples/detection.rs
similarity index 100%
rename from examples/common/src/examples/detection.rs
rename to intent_brokering/examples/common/src/examples/detection.rs
diff --git a/examples/common/src/examples/mod.rs b/intent_brokering/examples/common/src/examples/mod.rs
similarity index 100%
rename from examples/common/src/examples/mod.rs
rename to intent_brokering/examples/common/src/examples/mod.rs
diff --git a/examples/common/src/examples/proto.rs b/intent_brokering/examples/common/src/examples/proto.rs
similarity index 100%
rename from examples/common/src/examples/proto.rs
rename to intent_brokering/examples/common/src/examples/proto.rs
diff --git a/examples/common/src/lib.rs b/intent_brokering/examples/common/src/lib.rs
similarity index 100%
rename from examples/common/src/lib.rs
rename to intent_brokering/examples/common/src/lib.rs
diff --git a/examples/common/src/url.rs b/intent_brokering/examples/common/src/url.rs
similarity index 100%
rename from examples/common/src/url.rs
rename to intent_brokering/examples/common/src/url.rs
diff --git a/keyvalue/Cargo.toml b/intent_brokering/keyvalue/Cargo.toml
similarity index 100%
rename from keyvalue/Cargo.toml
rename to intent_brokering/keyvalue/Cargo.toml
diff --git a/keyvalue/README.md b/intent_brokering/keyvalue/README.md
similarity index 100%
rename from keyvalue/README.md
rename to intent_brokering/keyvalue/README.md
diff --git a/keyvalue/src/key_value_store.rs b/intent_brokering/keyvalue/src/key_value_store.rs
similarity index 100%
rename from keyvalue/src/key_value_store.rs
rename to intent_brokering/keyvalue/src/key_value_store.rs
diff --git a/keyvalue/src/lib.rs b/intent_brokering/keyvalue/src/lib.rs
similarity index 100%
rename from keyvalue/src/lib.rs
rename to intent_brokering/keyvalue/src/lib.rs
diff --git a/proto.rs/Cargo.toml b/intent_brokering/proto.rs/Cargo.toml
similarity index 100%
rename from proto.rs/Cargo.toml
rename to intent_brokering/proto.rs/Cargo.toml
diff --git a/proto.rs/build.rs b/intent_brokering/proto.rs/build.rs
similarity index 100%
rename from proto.rs/build.rs
rename to intent_brokering/proto.rs/build.rs
diff --git a/proto.rs/src/lib.rs b/intent_brokering/proto.rs/src/lib.rs
similarity index 100%
rename from proto.rs/src/lib.rs
rename to intent_brokering/proto.rs/src/lib.rs
diff --git a/proto/buf.yaml b/intent_brokering/proto/buf.yaml
similarity index 100%
rename from proto/buf.yaml
rename to intent_brokering/proto/buf.yaml
diff --git a/proto/chariott/common/v1/common.proto b/intent_brokering/proto/chariott/common/v1/common.proto
similarity index 100%
rename from proto/chariott/common/v1/common.proto
rename to intent_brokering/proto/chariott/common/v1/common.proto
diff --git a/proto/chariott/provider/v1/provider.proto b/intent_brokering/proto/chariott/provider/v1/provider.proto
similarity index 100%
rename from proto/chariott/provider/v1/provider.proto
rename to intent_brokering/proto/chariott/provider/v1/provider.proto
diff --git a/proto/chariott/runtime/v1/runtime.proto b/intent_brokering/proto/chariott/runtime/v1/runtime.proto
similarity index 100%
rename from proto/chariott/runtime/v1/runtime.proto
rename to intent_brokering/proto/chariott/runtime/v1/runtime.proto
diff --git a/proto/chariott/streaming/v1/streaming.proto b/intent_brokering/proto/chariott/streaming/v1/streaming.proto
similarity index 100%
rename from proto/chariott/streaming/v1/streaming.proto
rename to intent_brokering/proto/chariott/streaming/v1/streaming.proto
diff --git a/src/chariott_grpc.rs b/intent_brokering/src/chariott_grpc.rs
similarity index 100%
rename from src/chariott_grpc.rs
rename to intent_brokering/src/chariott_grpc.rs
diff --git a/src/connection_provider.rs b/intent_brokering/src/connection_provider.rs
similarity index 100%
rename from src/connection_provider.rs
rename to intent_brokering/src/connection_provider.rs
diff --git a/src/execution.rs b/intent_brokering/src/execution.rs
similarity index 100%
rename from src/execution.rs
rename to intent_brokering/src/execution.rs
diff --git a/src/intent_broker.rs b/intent_brokering/src/intent_broker.rs
similarity index 100%
rename from src/intent_broker.rs
rename to intent_brokering/src/intent_broker.rs
diff --git a/src/lib.rs b/intent_brokering/src/lib.rs
similarity index 100%
rename from src/lib.rs
rename to intent_brokering/src/lib.rs
diff --git a/src/main.rs b/intent_brokering/src/main.rs
similarity index 100%
rename from src/main.rs
rename to intent_brokering/src/main.rs
diff --git a/src/registry.rs b/intent_brokering/src/registry.rs
similarity index 100%
rename from src/registry.rs
rename to intent_brokering/src/registry.rs
diff --git a/src/streaming.rs b/intent_brokering/src/streaming.rs
similarity index 100%
rename from src/streaming.rs
rename to intent_brokering/src/streaming.rs
diff --git a/tests/README.md b/intent_brokering/tests/README.md
similarity index 100%
rename from tests/README.md
rename to intent_brokering/tests/README.md
diff --git a/tests/chariott_integration.rs b/intent_brokering/tests/chariott_integration.rs
similarity index 100%
rename from tests/chariott_integration.rs
rename to intent_brokering/tests/chariott_integration.rs
diff --git a/tests/common.rs b/intent_brokering/tests/common.rs
similarity index 100%
rename from tests/common.rs
rename to intent_brokering/tests/common.rs
diff --git a/tests/container-e2e-tests-wsl2.sh b/intent_brokering/tests/container-e2e-tests-wsl2.sh
similarity index 100%
rename from tests/container-e2e-tests-wsl2.sh
rename to intent_brokering/tests/container-e2e-tests-wsl2.sh
diff --git a/tests/cover.sh b/intent_brokering/tests/cover.sh
similarity index 100%
rename from tests/cover.sh
rename to intent_brokering/tests/cover.sh
diff --git a/tests/provider.rs b/intent_brokering/tests/provider.rs
similarity index 100%
rename from tests/provider.rs
rename to intent_brokering/tests/provider.rs
diff --git a/tests/registry-e2e.rs b/intent_brokering/tests/registry-e2e.rs
similarity index 100%
rename from tests/registry-e2e.rs
rename to intent_brokering/tests/registry-e2e.rs
diff --git a/tests/store-e2e.rs b/intent_brokering/tests/store-e2e.rs
similarity index 100%
rename from tests/store-e2e.rs
rename to intent_brokering/tests/store-e2e.rs
diff --git a/tools/charc b/intent_brokering/tools/charc
similarity index 100%
rename from tools/charc
rename to intent_brokering/tools/charc
diff --git a/tools/charc.md b/intent_brokering/tools/charc.md
similarity index 100%
rename from tools/charc.md
rename to intent_brokering/tools/charc.md
diff --git a/service_discovery/samples/simple-discovery/consumer/Cargo.toml b/service_discovery/samples/simple-discovery/consumer/Cargo.toml
index f9bd6669..57680b5f 100644
--- a/service_discovery/samples/simple-discovery/consumer/Cargo.toml
+++ b/service_discovery/samples/simple-discovery/consumer/Cargo.toml
@@ -9,7 +9,6 @@ edition = "2021"
license = "MIT"
[dependencies]
-chariott-common = { path = "../../../../common/" }
samples_proto = { path = "../../proto_build/" }
service_discovery_proto = { path = "../../../proto_build/"}
tokio = { workspace = true, features = ["rt-multi-thread", "time"] }
diff --git a/service_discovery/samples/simple-discovery/provider/Cargo.toml b/service_discovery/samples/simple-discovery/provider/Cargo.toml
index 704ff27c..daf99455 100644
--- a/service_discovery/samples/simple-discovery/provider/Cargo.toml
+++ b/service_discovery/samples/simple-discovery/provider/Cargo.toml
@@ -9,7 +9,6 @@ edition = "2021"
license = "MIT"
[dependencies]
-chariott-common = { path = "../../../../common/" }
samples_proto = { path = "../../proto_build/" }
service_discovery_proto = { path = "../../../proto_build" }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/service_discovery/samples/simple-discovery/provider/src/main.rs b/service_discovery/samples/simple-discovery/provider/src/main.rs
index 33a28f74..f3ba279f 100644
--- a/service_discovery/samples/simple-discovery/provider/src/main.rs
+++ b/service_discovery/samples/simple-discovery/provider/src/main.rs
@@ -11,7 +11,6 @@
// Tells cargo to warn if a doc comment is missing and should be provided.
#![warn(missing_docs)]
-use chariott_common::error::Error;
use hello_world_impl::HelloWorldImpl;
use samples_proto::hello_world::v1::hello_world_server::HelloWorldServer;
use std::net::SocketAddr;
@@ -51,11 +50,8 @@ async fn main() -> Result<(), Box> {
// Intitialize addresses for provider communication.
let provider_url_str = format!("http://{HELLO_WORLD_ENDPOINT}"); // DevSkim: ignore DS137138
- let socket_address: SocketAddr = HELLO_WORLD_ENDPOINT
- .parse()
- .map_err(|e| Error::from_error("error getting SocketAddr", Box::new(e)))?;
- let _provider_url: Url = Url::parse(&provider_url_str)
- .map_err(|e| Error::from_error("error getting Url", Box::new(e)))?;
+ let socket_address: SocketAddr = HELLO_WORLD_ENDPOINT.parse()?;
+ let _provider_url: Url = Url::parse(&provider_url_str)?;
let service_metadata: ServiceMetadata = ServiceMetadata {
namespace: "sdv.samples".to_string(),