Skip to content

LLD-03: Add uProtocol Subscriber to apiserver#11

Merged
leeeunkoo merged 3 commits into
mainfrom
copilot/add-uprotocol-subscriber
Mar 6, 2026
Merged

LLD-03: Add uProtocol Subscriber to apiserver#11
leeeunkoo merged 3 commits into
mainfrom
copilot/add-uprotocol-subscriber

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 6, 2026

Implements Cloud → Vehicle scenario reception via uProtocol in apiserver. Adds optional subscriber that listens for ScenarioDownload messages and routes them through existing artifact apply/withdraw pipelines.

Changes

  • New uprotocol module (src/server/apiserver/src/uprotocol/)

    • config.rs - Environment-based configuration (ZENOH_CONFIG, UPROTOCOL_TOPIC_FILTER, UPROTOCOL_LOCAL_URI)
    • listener.rs - ScenarioListener implementing UListener trait, parses JSON to ScenarioDownload
    • subscriber.rs - Zenoh transport initialization and listener registration
  • Manager integration

    • handle_uprotocol_scenario() - Routes DEPLOY/UPDATE/DELETE actions to existing apply_artifact/withdraw_artifact
    • start_uprotocol_subscriber() - Conditionally starts subscriber based on env config
  • Feature-gated dependencies

    • up-rust, up-transport-zenoh, zenoh-config, async-trait under uprotocol feature

Usage

# Build with uProtocol support
cargo build --features uprotocol

# Enable at runtime
ZENOH_CONFIG=/path/to/zenoh.json ./apiserver

Default build unchanged. Subscriber only activates when ZENOH_CONFIG env var is set.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 6, 2026 09:21
- Add uprotocol feature flag with optional dependencies (up-rust, up-transport-zenoh, zenoh-config, async-trait)
- Create uprotocol module with config, listener, and subscriber submodules
- Implement UProtocolConfig for environment-based configuration
- Implement ScenarioDownload struct and ScenarioListener (UListener)
- Implement start_subscriber function for Zenoh transport
- Add handle_uprotocol_scenario and start_uprotocol_subscriber to manager.rs
- Update initialize() to conditionally start uProtocol subscriber
- Export uprotocol module from lib.rs and main.rs

Co-authored-by: leeeunkoo <170624174+leeeunkoo@users.noreply.github.com>
Co-authored-by: leeeunkoo <170624174+leeeunkoo@users.noreply.github.com>
Copilot AI changed the title [WIP] Add uProtocol Subscriber integration for apiserver LLD-03: Add uProtocol Subscriber to apiserver Mar 6, 2026
@leeeunkoo leeeunkoo marked this pull request as ready for review March 6, 2026 09:48
@leeeunkoo leeeunkoo merged commit 7ed5f28 into main Mar 6, 2026
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.

2 participants