How juiz works
juiz takes apart the kind of component that bundles state and behavior together (like a ROS Node), and treats behavior as a Process and state as a Container.
Process
Section titled “Process”A Process is an idempotent function with inputs (arguments) and outputs: the same arguments always give the same result. Because it holds no state, it is easy to test and predictable when combined with others.
Container and ContainerProcess
Section titled “Container and ContainerProcess”When you need to keep state, use a Container: a piece of data (a struct) that holds the state. Only the ContainerProcesses bound to a Container read or write it, so it is always clear where state changes.
Two ways to use it
Section titled “Two ways to use it”- connect: wire one Process’s output to another’s input and drive the robot as a dataflow, much like ROS and other robot middleware.
- call: call a Process from outside and receive its result, much like client/server software.
Brokers and Execution Contexts
Section titled “Brokers and Execution Contexts”- A Broker exposes Processes and Containers over the network. HTTP+JSON and QUIC brokers are built in, and the HTTP broker serves an OpenAPI definition you can try from Swagger UI.
- An Execution Context decides when a Process runs: TimerEC runs it periodically, MainLoopEC on the main thread, and OneShotEC once.
The motivation and design philosophy behind juiz are in MOTIVATION.md (Japanese).