Reusable Object-oriented Concurrency System — a C++20 framework plus a concrete Linux NBD (Network Block Device) storage path.
| Component | Role |
|---|---|
| ThreadPool | Command queue, suspend/resume, dynamic resize |
| WPriorityQueue | Thread-safe priority queue (mutex + condition_variable) |
| Singleton | Double-checked locking with atomics + cleanup |
| Factory | Key → creator registry (singleton-backed) |
| Message broker | Dispatcher / Callback pub-sub |
| PlugNPlay (PnP) | inotify DirMonitor + dlopen SOLoader for hot-loading plugins |
| Logger | Leveled, thread-aware logging |
| Component | Role |
|---|---|
| NBDDriverCommunicator | Talks to the Linux NBD interface (sockets + listener thread) |
| RamStorage | In-memory block storage behind IStorage |
Drop folder for shared-object plugins. PnP watches plugins/watch/ and loads
new .so files at runtime (SOLoader).
rocs/
├── framework/
│ ├── include/ interface/ template/ src/ test/ utils/
│ └── Makefile
├── concrete/
│ ├── include/ interface/ src/ test/
│ └── Makefile
├── plugins/
│ ├── src/att_ctor.cpp # sample plugin constructor
│ └── watch/ # runtime drop directory
├── log/ # created on build
├── Makefile
└── README.md
- Linux (NBD, inotify,
dlopen) g++with C++20pthread,dl
# from rocs/
make # builds framework + concrete tests
make -C framework test_thread_pool && ./framework/bin/test_thread_pool
make -C framework test_pnp && ./framework/bin/test_pnp
make -C concrete test_ram_storage && ./concrete/bin/test_ram_storage