[{"content":"","date":"2 June 2026","externalUrl":null,"permalink":"/","section":"Andres Pastrana","summary":"","title":"Andres Pastrana","type":"page"},{"content":"","date":"2 June 2026","externalUrl":null,"permalink":"/tags/c++/","section":"Tags","summary":"","title":"C++","type":"tags"},{"content":"","date":"2 June 2026","externalUrl":null,"permalink":"/tags/gempba/","section":"Tags","summary":"","title":"Gempba","type":"tags"},{"content":"GemPBA just learned a new language. 🎉\nAs of the v4.1 line, you can drive GemPBA\u0026rsquo;s parallel branch-and-bound engine straight from the JVM. Add one Maven dependency, write plain Java, and let the same battle-tested C++ scheduler do the heavy lifting underneath. No JNI to hand-roll, no native libraries to chase down, no LD_LIBRARY_PATH archaeology.\nThat\u0026rsquo;s a big door to open. Whole worlds of work live on the JVM (Spark pipelines, Airflow jobs, enterprise services), and until now, using a serious parallel optimizer from any of them meant writing C++ and bridging it yourself. Now you just import it.\nThe same engine, now in Java # The Java API mirrors the C++ one almost beat for beat. If you\u0026rsquo;ve used GemPBA before, this will look immediately familiar:\nLoadBalancer lb = GemPBA.createLoadBalancer(BalancingPolicy.QUASI_HORIZONTAL); NodeManager nm = GemPBA.createNodeManager(lb); nm.setGoal(Goal.MAXIMISE, ScoreType.I32); nm.setThreadPoolSize(8); Node seed = GemPBA.createSeedNode(lb, myTask, 0, intToBytes, bytesToInt); nm.tryLocalSubmit(seed); nm.waitForCompletion(); System.out.println(nm.getScore()); GemPBA.shutdown(); Set a goal, seed the recursion, wait, read the result. It\u0026rsquo;s the exact shape GemPBA users already know, now from Java.\nHow it stays fast # A binding is only worth having if it doesn\u0026rsquo;t tax you for the convenience, so this one was built to get out of the way:\nOne JAR, every platform. Each published artifact bundles native binaries for Linux, Windows, and macOS, and a loader picks the right one at runtime. You add a dependency, not a build system. Bytes at the boundary. Java has no C++ templates, so task arguments and results cross over as bytes: you hand GemPBA a serializer/deserializer pair when you seed. The neat part is that on a single machine only the seed is serialized (children capture their arguments from the Java closure), so you pay that cost exactly where work actually moves. And the same serializer code scales from threads on one box to a full MPI cluster by flipping a single classifier. No rewrite. The numbers hold up. On a depth-25 search tree (33M+ leaves) on a 24-core machine, the Java run tracked native C++ to within a fraction of a percent multithreaded, and paid only about 6% across processes. Convenience, basically for free. Under all of it sits a new stable C ABI, the foundation a future Python, Rust, or .NET binding will sit on too. Java just happens to be the first guest.\nThe full Java guide, requirements (JDK 25, Maven 3.9+), and a pile of runnable examples are in the Java documentation and the gempba-java-examples repo.\nInstall it, don\u0026rsquo;t clone it # The other half of growing up: you don\u0026rsquo;t clone GemPBA to use it anymore. You install it, like any real library.\nGemPBA now ships as native packages for apt, Homebrew, and MSYS2/pacman (and as a Maven dependency for Java). It comes in two flavors, plain multithreading and MPI-powered multiprocessing, that install side by side, and you pick the one you want at find_package time, not in your code. Your source stays identical either way. A bonus that quietly removes a lot of friction: multithreading builds no longer require MPI to be installed at all.\nsudo apt install libgempba-dev # multithreading brew install rapastranac/gempba/gempba # macOS Add the -mpi package when you want to go distributed.\nSee what your run is actually doing # Long parallel runs used to be black boxes. You kicked off a job across 24 cores or six machines and just\u0026hellip; waited. Not anymore.\nSince v3.3.0, and on by default in every v4 build, GemPBA ships a runtime telemetry hub: live worker and node activity over TCP and MPI (on its own private communicator, so it never fights your application\u0026rsquo;s traffic), plus hardware topology probed through hwloc. Point a viewer at it and watch load balance, idle workers, and lopsided ranks in real time. Those are exactly the things that decide whether a big run finishes in minutes or hours. Don\u0026rsquo;t want it? One runtime call turns it off.\nThe telemetry docs cover how to turn it on, connect a viewer, and read the stream.\nMoving up from v3 # If you\u0026rsquo;re coming from the v3.0.0 redesign (announced here), the upgrade is gentle: the call site got simpler (an unqualified gempba::create_*), the multithreading/multiprocessing namespaces were renamed for clarity, the examples moved to their own repo, and apt\u0026rsquo;s base package is now multithreading-only (add -mpi for distributed). The release notes walk through every step.\nGo build something big # GemPBA started life as a fast C++ research framework. It\u0026rsquo;s now an installable, JVM-speaking, self-observing distributed library, without giving up the performance that was the entire point.\nGrab it from the docs, browse the internals on DeepWiki, or dive into the source. Then go point it at a problem that used to be too big.\nHappy solving!\n","date":"2 June 2026","externalUrl":null,"permalink":"/posts/2026-06-01-gempba-v4-speaks-java/","section":"Posts","summary":"","title":"GemPBA Now Speaks Java","type":"posts"},{"content":"","date":"2 June 2026","externalUrl":null,"permalink":"/tags/java/","section":"Tags","summary":"","title":"Java","type":"tags"},{"content":"","date":"2 June 2026","externalUrl":null,"permalink":"/tags/open-source/","section":"Tags","summary":"","title":"Open-Source","type":"tags"},{"content":"","date":"2 June 2026","externalUrl":null,"permalink":"/posts/","section":"Posts","summary":"","title":"Posts","type":"posts"},{"content":"","date":"2 June 2026","externalUrl":null,"permalink":"/tags/release/","section":"Tags","summary":"","title":"Release","type":"tags"},{"content":"","date":"2 June 2026","externalUrl":null,"permalink":"/tags/","section":"Tags","summary":"","title":"Tags","type":"tags"},{"content":"","date":"2 June 2026","externalUrl":null,"permalink":"/tags/telemetry/","section":"Tags","summary":"","title":"Telemetry","type":"tags"},{"content":"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.\nWhy 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.\nGemPBA now has a modern API with a template free workflow that is much easier to integrate into real codebases.\nMajor features # A modern facade based API # The library now exposes a clean entry point through one header.\n#include \u0026lt;gempba/gempba.hpp\u0026gt; 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.\nBefore v3.0.0:\nauto \u0026amp;dlb = gempba::DLB_Handler::getInstance(); auto \u0026amp;branchHandler = gempba::branch_handler::get_instance(); using HolderType = gempba::ResultHolder\u0026lt;void, MyClass, float, double\u0026gt;; Now in v3.0.0:\nauto *load_balancer = gempba::mt::create_load_balancer(gempba::balancing_policy::QUASI_HORIZONTAL); auto \u0026amp;node_manager = gempba::mt::create_node_manager(load_balancer); This is all you need to start.\nTemplate 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.\nThere is no template noise and no unnecessary verbosity.\nExtensible 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.\nLightweight 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.\nvoid 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.\nauto stats_vector = scheduler-\u0026gt;get_stats_vector(); for (auto \u0026amp;stats : stats_vector) { auto visitor = gempba::mp::get_default_mpi_stats_visitor(); stats-\u0026gt;visit(visitor.get()); } Lazy node evaluation # Nodes can defer argument construction until needed. This is ideal for dynamic pruning and reduces unnecessary work.\nauto node = gempba::mt::create_lazy_node\u0026lt;void\u0026gt;( load_balancer, parent, \u0026amp;foo, [\u0026amp;]() -\u0026gt; std::optional\u0026lt;std::tuple\u0026lt;Args...\u0026gt;\u0026gt; { 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.\nRemoved # 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.\nThank you to everyone using the project and to those who shared feedback or ideas. As always, issues and contributions are welcome on GitHub.\nHappy coding!\n","date":"7 December 2025","externalUrl":null,"permalink":"/posts/2025-12-07-gempba-v3-0-0/","section":"Posts","summary":"","title":"🚨 Sound the alarms. GemPBA v3.0.0 has touched down","type":"posts"},{"content":"","date":"7 December 2025","externalUrl":"https://rapastranac.github.io/gempba-docs/","permalink":"/projects/gempba/","section":"Projects","summary":"A modern C++ library for massively parallelizing branch-and-bound and other branching algorithms. Template-free facade API, type-erased nodes, pluggable schedulers and load balancers, and a quasi-horizontal load-balancing strategy tested on national supercomputing clusters.","title":"GemPBA","type":"projects"},{"content":"Here are some things I\u0026rsquo;ve built.\n","date":"30 November 2025","externalUrl":null,"permalink":"/projects/","section":"Projects","summary":"","title":"Projects","type":"projects"},{"content":"Hey, I\u0026rsquo;m Andrés.\nI\u0026rsquo;m a software engineer who cares a lot about three things: performance, reliability, and building tools that last. My strongest experience is in C++ systems and Java applications, especially in areas involving graphs, parallel computing, and discrete optimization.\nThese days I\u0026rsquo;m a Senior Software Engineer at Halliburton, in the Landmark Software \u0026amp; Solutions division, working on the DecisionSpace Geosciences platform. My focus is the user experience of complex scientific and engineering software: making it intuitive, responsive, and efficient to work in. It\u0026rsquo;s the same care for performance and reliability I\u0026rsquo;ve always had, now aimed at the part of the system people actually touch.\nBefore that, I helped build studioSL, a reservoir simulation platform used globally in energy operations, where I turned engineering requirements into solid code, improved performance, and kept the platform stable through strong test coverage and constant code reviews.\nBefore that, I completed a Master\u0026rsquo;s in Computer Science in Canada, where I also built an open-source C++ framework to massively parallelize branching algorithms. It was tested at scale in national supercomputing clusters, and introduced a load-balancing strategy that improved performance in distributed environments.\nI have a Bachelor\u0026rsquo;s in Engineering, which gave me that analytical mindset I still lean on today when designing systems and solving complex problems. I didn\u0026rsquo;t land in software by accident, I went after it, and I\u0026rsquo;ve been writing high-performance code long enough to know that good optimization is never about tricks, it\u0026rsquo;s about understanding the system deeply.\nOne of the projects I\u0026rsquo;m most proud of is GemPBA, a C++ optimization library that continues to grow based on real community needs. I enjoy creating work that other people can actually use, improve, and build on.\nI\u0026rsquo;m always open to connecting with people who like working on efficient systems, open-source ideas, or software that solves real problems.\n","date":"30 November 2025","externalUrl":null,"permalink":"/about/","section":"Andres Pastrana","summary":"","title":"About me","type":"page"},{"content":"","externalUrl":null,"permalink":"/authors/","section":"Authors","summary":"","title":"Authors","type":"authors"},{"content":"","externalUrl":null,"permalink":"/categories/","section":"Categories","summary":"","title":"Categories","type":"categories"},{"content":" Your name Email address Message Send message ","externalUrl":null,"permalink":"/contact/","section":"Andres Pastrana","summary":"","title":"Contact me","type":"page"},{"content":"","externalUrl":null,"permalink":"/series/","section":"Series","summary":"","title":"Series","type":"series"}]