Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROCS

Reusable Object-oriented Concurrency System — a C++20 framework plus a concrete Linux NBD (Network Block Device) storage path.

What's inside

framework/

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

concrete/

Component Role
NBDDriverCommunicator Talks to the Linux NBD interface (sockets + listener thread)
RamStorage In-memory block storage behind IStorage

plugins/

Drop folder for shared-object plugins. PnP watches plugins/watch/ and loads new .so files at runtime (SOLoader).

Layout

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

Requirements

  • Linux (NBD, inotify, dlopen)
  • g++ with C++20
  • pthread, dl

Build & Run

# 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

About

C++20 framework: thread pool, pub-sub, PlugNPlay (inotify + dlopen), and Linux NBD storage.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages