General-purpose, distributed, object-oriented system for applications that demand high modularity and rich communication.
Sen is a simple way for applications to talk to one another and create, connect, and integrate complex systems with ease.
Technically speaking, Sen is a general-purpose, distributed, object-oriented system with a focus on applications that demand low-latency, high-performance, rich inter/intra process communication, high modularity, and platform independence while providing low-overhead, full introspection and an extensible tooling support.
🏗️ Architecture
- Distributed component-based system for easy microservice-based solutions.
- Object-oriented and event-driven architecture on top of a light (user-space) micro-kernel.
- Package-based, plugin-oriented system for higher reuse, modularity and lower coupling.
- Rich type system with full compile-time and run-time introspection.
- Native support of HLA FOMs. You can directly use the SISO standards as your ICD.
- Simple language for easy definition of your interfaces: Sen Type Language (STL).
⚙️ Execution model
- Real-time, faster-than real-time (as fast as possible) and stepped execution.
- Built-in object and data ownership management.
- Inherently asynchronous. Callers cannot be blocked. Callees can postpone their execution.
- Thread-safe: your components don't need to use synchronization primitives.
- Dependency management and controlled component execution by levels and groups.
- Built-in type-safe configuration mechanism based on YAML or Python.
🔗 Communications model
- Conditional subscription with both producer-side and consumer-side filtering.
- Data segregation enabled through the usage of dedicated logical buses.
- Broker-less design. No central orchestrator required. Participants discover each-other.
- Quality-of-service attributes: confirmed & ordered, best-effort directed, best-effort broadcast.
- Generation of documentation and UML diagrams and MkDocs out of the ICD definition.
- Pluggable data transport, allowing multiple implementations.
📦 Shipped components
- Recorder, highly customizable, with LZ4 compression, indexes, snapshots and annotations.
- Ethernet transport supporting asynchronous I/O over TCP, UDP unicast and multicast.
- Replayer with support for real-time, stepped execution and random access.
- Python Interpreter embedded. You can script your components and tests.
- Shell for CLI interaction, with auto-completion, introspection, and remote connectivity.
- Grafana visualization via the InfluxDB component.
- Tracer based on the excellent Tracy frame-based profiler.
- Explorer GUI to inspect and interact with your system (objects, events, sessions, plots).
- REST API Server for interfacing external (non-Sen) systems.
💻 Implementation
- Lightweight, multi-platform implementation. Works on Linux and Windows.
- Run-time and compile-time introspection provided by the code generator.
- Optimized memory management by extensive use of memory pools.
- Natively integrated with CMake. Meta info is baked into the binaries.
- Self-contained: no 3rd-party dependencies on the public interface.
- Python bindings for accessing recorded data.
- Backward compatible ICDs with runtime interoperability.
We provide binary releases and Conan packages. To use Conan:
- Create Conan configuration file in your project's top-level directory and add Sen as a dependency of your project.
- Run
conan install . --profile <your_conan_profile> --build=missingto download Sen before running CMake.
To ensure your system is able to find all paths, add the bin folder to your PATH environment variable (in Linux also
add it to the LD_LIBRARY_PATH). Check that everything works by running sen shell. You can play with the objects in the local session.
To write you first package:
sen package init my_package --class MyClass # Generate the skeleton
cd my_package # Go to the new folder
cmake -S . -B build -G "Ninja" && cmake --build build # Build it
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/build/bin # Set the library path
sen run config.yaml # Run itTake a look to the examples, but there's much more to Sen, so don't forget to read the docs.
You need Conan and a C++17 compiler (GCC, Clang, Visual Studio).
For Debian-based systems, you can get all the dependencies using:
pip install conan
sudo apt-get install -y pkg-config graphviz pytest libxext-devYou can find some commonly-used conan profiles in the .conan/profiles folder. Those can be
installed by running conan config install -tf profiles .conan/profiles/<profile>. Here we use 'sen_gcc'
but you can use the profile of your choice.
conan install . --profile=sen_gcc --build=missing # Fetch third-party dependencies (only needed once)
conan build . --profile=sen_gcc # Build the softwareAlternatively, build with cmake -S . -B build -G Ninja --preset sen_gcc && cmake --build build.
Sen is currently under active development. If you choose to use it right now, be prepared for potential bugs and breaking changes.
Always check the official documentation and release notes for updates and proceed with caution. Happy coding! 🚀
Contributions are encouraged and valued. Have a look at our guidelines for the full picture.
Huge thanks to all the people using Sen and providing active feedback!
Sen is possible thanks to the sponsorship and engagement of the Airbus engineering community.