Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Agemo extension and extension model #42

Merged
merged 22 commits into from
Sep 21, 2023
Merged

Add Agemo extension and extension model #42

merged 22 commits into from
Sep 21, 2023

Conversation

devkelley
Copy link
Contributor

This PR introduces 3 things:

Adds a flexible extension model that allows for services and layers to be added or removed at compile time behind the feature flag.
Relevant files:

  • core/common/grpc_interceptor.rs - Modified to allow for a GrpcInterceptor implementation to be passed into the layer rather than the factory.
  • core/common/grpc_service.rs
  • core/extension/src/extension.rs
  • core/extension/src/lib.rs
  • core/extension/src/extension_config.rs - tool to load configuration settings from a file. (move to common?)
  • core/invehicle-digital-twin/Cargo.toml - Shows how the feature flags are used
  • core/invehicle-digital-twin/src/main.rs

Adds a 'managed_subscribe' extension that communicates with the Agemo service to handle subscription requests that need a custom frequency interval. Also introduces an interceptor for this extension that injects the managed_subscribe endpoint for Providers at register time.
Relevant files:

  • core/extension/src/managed_subscribe/*
  • interfaces/extension/managed_subscribe/v1/managed_subscribe.proto
  • external/agemo/*

Adds a sample consumer and provider that utilize the managed_subscribe extension to get some temperature data every 10 seconds.
Relevant files:

  • samples/managed_subscribe/*

Additionally, upgrades tonic 0.9.2 > 0.10.0 and prost 0.11 > 0.12

Copy link
Contributor

@ashbeitz ashbeitz left a comment

Choose a reason for hiding this comment

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

Please take a look at my comments.

core/common/src/grpc_service.rs Outdated Show resolved Hide resolved
core/common/src/grpc_service.rs Outdated Show resolved Hide resolved
core/extension/src/extension.rs Show resolved Hide resolved
external/agemo/proto/publisher/v1/publisher.proto Outdated Show resolved Hide resolved
Copy link
Contributor

@ashbeitz ashbeitz left a comment

Choose a reason for hiding this comment

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

One new comment.

core/common/src/grpc_extension.rs Outdated Show resolved Hide resolved
core/common/src/utils.rs Outdated Show resolved Hide resolved
core/extension/src/extension_config.rs Show resolved Hide resolved
samples/managed_subscribe/provider/src/provider_impl.rs Outdated Show resolved Hide resolved
samples/managed_subscribe/provider/src/main.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@ashbeitz ashbeitz left a comment

Choose a reason for hiding this comment

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

Approved.

@ashbeitz ashbeitz merged commit 6cc2768 into eclipse-ibeji:main Sep 21, 2023
@devkelley devkelley deleted the devkelley/add_extensions branch September 21, 2023 17:20
mobicatk pushed a commit to Mobica/EclipseSDV_ibeji that referenced this pull request Apr 24, 2024
* Add v1 of managed subscribe extension service

* Moved extension code into its own sub directory

* start adding extension builder

* Integrated interceptors into extension library

* implemented interceptor request deconstruction logic

* v1 working extension

* v2 working extension

* v3 optimized service creation, tonic upgraded to 0.10.0

* fixed fmt and clippy errors

* Moved grpcService trait to common, simplified extension code

* Renamed grpcService to grpcExtension

* Added param definition

* Add retries, add constants

* remove hand added protos. will add new protos in separate step

* add agemo service as submodule

* update comment

* addressed pr comments

* modified retry to match whats in cloud sync (looks more flexible)

* push spelling change

* fixed spelling

* change yaml perms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants