How this tutorial works
This tutorial starts with a tiny Process that just adds 1 to its argument, and grows that example little by little to teach you how juiz thinks. Each chapter is built around running things yourself, so you can follow along with your hands on the keyboard.
Chapters
Section titled “Chapters”-
Run a Process that adds 1 to its argument, call it from outside and get the result back. You learn that a Process is an idempotent function, and how to use it with call.
-
Keeping state: Container and ContainerProcess
Using a counter as the example, you learn a design where state lives in a Container and only ContainerProcesses touch it.
-
Starting everything from a configuration file
Start the Process and Container from the previous chapters with a single configuration file. You learn the difference between loading (plugins) and instantiating (processes / containers).
-
Connecting Processes: connect and Execution Context
Connect a talker and a listener and run them periodically with an Execution Context. You learn connect, the other way to use a Process.
-
Bundle several building blocks into one project. You learn that a Component is the unit of distribution.
-
Connect juiz instances started separately, using only commands and no configuration file. You learn that Processes connect by their ID (a URL), wherever they run.
-
Choosing a transport: the QUIC broker
Make the chapter 6 connection over the QUIC broker instead of HTTP. You learn that the transport is a broker you can swap, and that the start of an ID tells which one is used.
How to read each chapter
Section titled “How to read each chapter”- Each chapter starts with “What you will learn” and ends with a “Summary”.
- Code examples can be switched between Rust, Python and C++ with tabs. The language you pick is kept on every other page.
- The code is the same as the files in the example repositories (Rust, Python, C++). Each chapter links to the corresponding files.
- If you already know what you want to do, you can also look it up in the Guides.
Before you start
Section titled “Before you start”Follow Installation to install the juiz command and the package for the language you use.
If you use only Python, pip install juiz-cli gives you both the juiz command and pyjuiz, with no Rust toolchain needed (chapter 1 installs it from the example repository’s requirements.txt).
For Rust or C++, install the juiz command with cargo install juiz_app. C++ also needs CMake and a compiler that supports C++17.
When you are ready, move on to Your first Process.