# exem **Repository Path**: rippleos/exem ## Basic Information - **Project Name**: exem - **Description**: MOSS 节点执行管理器 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-10 - **Last Updated**: 2026-05-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mexem - MOSS Executor Manager DAG-based node execution orchestrator for the MOSS middleware. Manages startup ordering, health monitoring, and safe cascading shutdown of interdependent nodes. Supports functional groups for organizing nodes into logical units with group-level dependencies and lifecycle operations. ## Build ```bash # Build dependencies first (mlog, mlaunch, msafety) cd ../mlog && mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make -j$(nproc) cd ../../mlaunch && mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make -j$(nproc) cd ../../msafety && mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make -j$(nproc) # Build mexem cd ../../mexem && mkdir -p build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release make -j$(nproc) ``` ## CLI Usage ```bash # Validate a config file ./mexem check ../config/moss_system.json # Show dependency topology ./mexem topo ../config/moss_system.json # Start all nodes ./mexem start ../config/moss_system.json # View status ./mexem status # Watch status (refreshes every 1s) ./mexem status --watch # JSON output ./mexem status --json # Single node operations ./mexem start-node perception ./mexem stop-node planning --no-cascade ./mexem restart-node localization # Node details ./mexem info control # Stop everything ./mexem stop ``` ## Functional Groups Nodes can be organized into functional groups. Each group has its own state (derived from member node health), inter-group dependencies, and independent lifecycle operations. ### Group Commands ```bash # List all groups and their states ./mexem groups # Group details (state, nodes, dependencies) ./mexem group-info sensing # Start/stop/restart a group ./mexem start-group sensing ./mexem stop-group perception_stack ./mexem restart-group planning_control # JSON output ./mexem groups --json ``` ### Group States | State | Description | |-----------|----------------------------------------------------| | STOPPED | All nodes are stopped or not yet started | | STARTING | At least one node is in starting state | | RUNNING | All nodes are running and healthy | | PARTIAL | Some nodes are healthy, others are degraded/failed | | STOPPING | At least one node is in stopping state | | FAILED | All nodes have failed | ### Config Format Groups are defined in the `"groups"` array and referenced by each node's `"group"` field. Both are optional — configs without groups work as before (all nodes go into a `__default__` group). ```json { "groups": [ { "name": "sensing", "depends_on": [] }, { "name": "perception_stack", "depends_on": ["sensing"] }, { "name": "planning_control", "depends_on": ["perception_stack"] } ], "nodes": [ { "name": "sensor_driver", "group": "sensing", ... }, { "name": "perception", "group": "perception_stack", ... }, { "name": "planning", "group": "planning_control", ... } ] } ``` Cross-group node dependencies automatically create implicit group-level edges if no explicit group `depends_on` is defined. ## Config Format See `config/moss_system.json` for an example 6-node automotive perception system with functional groups and dependency DAG: ``` sensing ──► perception_stack ──► planning_control sensor_driver ──┬──► perception ──► planning ──► control │ ╱ can_gateway ────┴──► localization ────────────┘ ```