MSAPI is a modular, high-performance C++ library for building Linux-based microservice and macrosystem architectures. It provides internal protocols, utilities, and server logic for efficient, scalable system development.
- ✅ Has no dependencies on third-party libraries.
- ✅ Is thoroughly documented.
- ✅ Is well covered by unit and end-to-end tests.
To build library follow next simple steps:
cd library/build
cmake -DCMAKE_BUILD_TYPE=Release .
cmake --build . -j $(nproc)
- Build system: CMake 3.2+
- Compiler: GCC 16+
- Runtime: Linux (POSIX threads, Linux sockets)
- Pure C++ standard library
BUILD_PROFILE variable can be set to choose build type: Debug or Release. See CMakeListsCommonOptions.txt for more details.
Number of bash scripts are available in the bash/ folder to simplify building process. MSAPI_PATH variable should be set to the root of the MSAPI repository.
- Server: Provides communication ability via TCP sockets and current-state model to manage server lifetime;
- Application: Provides customization ability via parameters and current-state model to manage application behavior.
- Authorization: Generic thread-safe account management and authentication.
Server provides data to be handled by calling a callback in case if this data is not a part of internal Application protocol.
- Object protocol: Transfers simple copyable objects using stream and filter models.
- Standard protocol: Handles dynamic-size messages as arrays of key-value pairs.
- HTTP protocol: Basic HTTP message parsing and handling.
- WebSocket protocol: Implementation of data and parallel execution safe functional abstractions for 13 version (RFC 6455) WebSocket protocol.
- WebSocket events protocol: Parallel execution distributing model which works on top of web socket protocol with json payload, supports single and stream events with filters. Uses Authorization to control data access rights.
- Log: Multiple log levels and console/file outputs.
- Time: Time utilities and event scheduling.
- HTML: Parser module.
- JSON: Parser and producer module.
- Table: Data structure.
- Lock: Mutexes and atomic locks to manage concurrency.
- IO: Filesystem I/O utilities.
- Helper: Miscellaneous utilities for common tasks.
- Meta: Static enum translation, type helpers, and compile-time utilities.
- SHA256: SHA-256 hashing implementation.
- SHA1: SHA-1 hashing implementation.
Unit/end-to-end tests utilities with ability to run servers as daemons.
Manager app for orchestrating custom apps on the same host, with a user-friendly web interface, authorization and data access control capabilities, with live data transferring via web socket.
- Web Interface: Manage applications through an intuitive, web-based UI.
- Installed Application Management: Automatically detect, register, and manage applications from a configuration file.
- Application Lifecycle Management: Create, modify, delete, run, pause, and monitor applications seamlessly.
- Dynamic Metadata Handling: Metadata is automatically generated by the C++ library and dynamically managed, ensuring the frontend loads only the relevant data when needed.
- Customizable Parameters: Modify application parameters with built-in validation and error handling.
- Real-Time Updates: Monitor and change system state in real time via web socket with single and stream events with filters.
- Window Snapping: Drag and resize views with automatic snapping to other views or window borders.
- Logging Configuration: Customize logging options, including log levels, console/file output, and log file rotation by day.
- Error Handling: Provides mechanisms to handle invalid operations or configurations, ensuring robustness and reliability.
- Full Customization: Define each view using unique HTML templates on top of standardized structures, further customizable with CSS and extendable via JavaScript.
MSAPI frontend provides a modular set of views for managing, configuring, and interacting with MSAPI applications and their parameters through a unified web interface.
Scenario: Load page -> open created apps view (some apps were created before) -> attempt to create app -> login -> create app -> search for app by type filter -> create app view -> run app -> interact with run app.
- View: Abstraction for UI views, supporting creation, movement, resizing, snapping, maximizing, hiding, closing, and error handling.
- Table: Dynamic table creation and management, supporting mutable and immutable tables, validation, and custom column types.
- Grid: Flexible grid component for displaying and managing tabular data with sorting, filtering, and column/row operations.
- Timer: Timestamp input handling, normalization, and validation with timezone support.
- Duration: Duration input parsing, normalization, and validation for multiple time units.
- Select: Custom select input with searchable options, validation, and dynamic metadata integration.
- WebSocket handler: Client implementation of events protocol to interact with server.
- Helper: Utility functions for type limits, validation, formatting, deep equality, and more.
- Dynamic: Helpers to add interface dynamic.
- Server simulator: Server's behavior simulator.
- Test runner: Test execution controller, assertions result tracker.
- Installed apps: Displays a grid of installed MSAPI applications.
- Created apps: Shows a grid of created/running apps with parameters and action buttons.
- New app: Presents a form for creating new applications.
- Modify app: Allows modification of application parameters.
- App view: Embeds the application’s custom UI in an iframe.
- Table view: Displays a read-only MSAPI table for a given parameter.
- Select view: Provides a searchable, case-sensitive select dialog for choosing parameter values.
- Grid settings view: Offers a settings panel for grid columns, including alignment, sorting, and filtering options.
- Account: View to display logging and sign up forms, manage account and its information.
This software is licensed under the Polyform Noncommercial License 1.0.0, see LICENSE.md.
You may use, copy, modify, and distribute it for noncommercial purposes only.
For commercial use, please contact: maks.angels@mail.ru
Contributions are welcome!
By contributing to this repository, you agree to the Contributor License Agreement.
