GemPBA v3.0.0 is finally here. This is the largest and most important update the library has received. It is not a minor cleanup or an incremental patch. It is a complete architectural redesign focused on giving users a simpler, cleaner, and more modern experience while keeping the performance characteristics the project is known for.
Why this release matters#
The goal with v3.0.0 was straightforward. Make the library easier to use without losing power. Earlier versions depended heavily on templates, required several components to be wired manually, and created an entry barrier for new users. The new version removes that weight. The core is now cleaner, the public API is smaller, and most of the heavy lifting has been moved behind a consistent facade.
GemPBA now has a modern API with a template free workflow that is much easier to integrate into real codebases.
Major features#
A modern facade based API#
The library now exposes a clean entry point through one header.
#include <gempba/gempba.hpp>All the old boilerplate, such as setting up DLB handlers, result holders, or branching components, is gone. The facade gives you a single place to create what you need without sacrificing flexibility.
Before v3.0.0:
auto &dlb = gempba::DLB_Handler::getInstance();
auto &branchHandler = gempba::branch_handler::get_instance();
using HolderType = gempba::ResultHolder<void, MyClass, float, double>;Now in v3.0.0:
auto *load_balancer = gempba::mt::create_load_balancer(gempba::balancing_policy::QUASI_HORIZONTAL);
auto &node_manager = gempba::mt::create_node_manager(load_balancer);This is all you need to start.
Template free node experience#
Previous versions forced users to manage large templated types everywhere. v3.0.0 removes that entirely. Nodes now rely on an internal type erasure mechanism that hides all template details. After a node is created, types disappear from the surface API. You work with simple value like handles and let the engine manage the rest.
There is no template noise and no unnecessary verbosity.
Extensible architecture#
Almost every subsystem is now built for extension. Users can provide custom schedulers, custom load balancers, node core implementations, MPI or IPC runnables, or their own visitor based stats collectors. Implement the interface you need and pass it through the facade. The library stays out of your way.
Lightweight node design#
Nodes are now small and cheap to copy. Internally they reference a node core through a shared pointer. This provides efficient memory usage, structural tracking for distributed work, and a much cleaner design than before.
void foo(std::thread::id tid, Args... args, gempba::node parent) {
// node is cheap to copy
}Unified statistics system#
The old mix of stats code has been replaced with a visitor based design that is easy to extend and customize. This allows users to collect and process performance metrics cleanly across multithreaded and multiprocess workloads.
auto stats_vector = scheduler->get_stats_vector();
for (auto &stats : stats_vector) {
auto visitor = gempba::mp::get_default_mpi_stats_visitor();
stats->visit(visitor.get());
}Lazy node evaluation#
Nodes can defer argument construction until needed. This is ideal for dynamic pruning and reduces unnecessary work.
auto node = gempba::mt::create_lazy_node<void>(
load_balancer, parent, &foo,
[&]() -> std::optional<std::tuple<Args...>> {
if (/* worth exploring */) return std::make_tuple(/* args */);
return std::nullopt;
}
);Breaking changes#
The new architecture introduces breaking changes that simplify the library and remove outdated components.
Removed#
- DLB_Handler singleton
- branch_handler singleton
- ResultHolder
- try_push_mt and try_push_mp
- Manual virtual root linking
Renamed#
- branch_handler to node_manager
- mpi_scheduler to scheduler
- Factory functions moved under gempba::mt and gempba::mp
New requirements#
- C++23
Final notes#
This release took years of iteration, redesigns, and trial and error. The result is the version of GemPBA I always wanted to build. Simple, powerful, extensible, and no longer burdened by unnecessary template complexity. If you have been following the project, this version is the one that finally delivers the design philosophy behind the library.
Thank you to everyone using the project and to those who shared feedback or ideas. As always, issues and contributions are welcome on GitHub.
Happy coding!
