-
Notifications
You must be signed in to change notification settings - Fork 0
serp demo
Oleksandr Geronime edited this page Jun 27, 2026
·
1 revision
serp-demo — standalone C++ examples demonstrating each SERP framework primitive.
Each demo is a single self-contained .cpp file and a minimal CMakeLists.txt. Ideal for learning one concept at a time without needing a full project setup.
brew install OleksandrGeronime/serp/serp-dev # macOS
# or: install the serp-dev .deb package on Ubuntugit clone https://github.com/OleksandrGeronime/serp-demo
cd serp-demo
./scripts/build.sh| Demo | Binary | What it demonstrates |
|---|---|---|
method/ |
demo_method |
RPC methods: fire-and-forget, args-only, return values; async subscribe vs polling vs blocking wait |
property/ |
demo_property |
Observable properties: owner updates, subscriber receives every change via connect()
|
notification/ |
demo_notification |
One-shot events: owner fires Notification, subscriber lambdas invoked |
timer/ |
demo_timer |
Repeating timers: Timer::create → start() → fires every second → stop() on shutdown |
watchdog/ |
demo_watchdog |
Watchdog timeout: service blocks past deadline → process intentionally aborts |
command/ |
demo_command |
CommandProcessor queue: DemoCommand → onExecute() → onPostProcessing()
|
runtime_console/ |
demo_runtime_console |
Interactive REPL: call service methods by name from the terminal |
client_stream/ |
demo_client_stream |
Client-streaming: caller opens write stream, pushes data, service aggregates and replies |
server_stream/ |
demo_server_stream |
Server-streaming: service pushes integers every 500 ms, caller cancels after 5 received |
component_test/ |
demo_test |
Component test: mock dependencies, drive lifecycle, assert results with GTest |
./scripts/run.sh method # runs demo_method
./scripts/run.sh runtime_console # opens interactive REPLFor newcomers, work through the demos in this order:
-
method— understand the basic call pattern -
property— observable state -
notification— events -
timer— scheduling -
command— async orchestration -
component_test— testing your services -
runtime_console— dynamic invocation -
watchdog,client_stream,server_stream— advanced patterns
Getting Started
The Development Model
Architecture Language
Code Generator
- Generator Overview
- Generated Code Layout
- Deployment Configurations
- Lifecycle Backends
- CMake Integration
Framework Internals
- Core Concepts
- Services & Lifecycle
- Methods
- Properties
- Notifications
- Timers & Watchdog
- Promises & Async
- Streams
- Commands
- Logging
- Test Engine
- Transports
- Runtime & Debug Tools
VS Code Plugin
Examples