Why Not a Native Solver?

Your models have become larger or harder, and now you want a stronger solver. That sounds like one decision, but it is actually a stack of obligations you are inheriting — and most of them have nothing to do with solving.

What you are really signing up for

JNI and native binaries. The solver is C or C++ code called through JNI or the Foreign Function Interface. A segfault in native code takes down the JVM with no stack trace you can read. Debugging requires tools and skills that have nothing to do with Java, and the failure modes are different from anything else in your application. Every platform you deploy to needs its own binary, and every JDK upgrade is a compatibility question.

Container images. Your Dockerfile was simple: a JDK base image and a JAR. Now it carries native libraries, OS-level dependencies, and architecture-specific binaries. You are building and maintaining multi-platform images for code you did not write, and a broken solver build blocks your release pipeline the same way a broken test does.

Licence servers. Most commercial solvers enforce their licence at runtime, either through a network call to a licence server or a licence file that has to be present in the container. That is a network dependency in production — one more thing to provision, monitor and explain to the people who own the infrastructure. If the licence server is unreachable, the solver does not start.

Security review. Native code running inside your application process is a different risk profile from pure Java. Someone in your organisation has to sign off on it, and they will have questions: where did the binary come from, who built it, what does it link against, and what access does it have. Every solver upgrade reopens that conversation.

Vendor lock-in. Write your model against a solver vendor’s own API and every constraint, parameter and callback ties you to that vendor. Switching later means rewriting the model, not changing a dependency. Modelling through ojAlgo avoids that: the same model runs on ojAlgo’s own solvers or any of the commercial solvers ojAlgo integrates with. The native-code obligations above still apply, though.

The cost no one quotes

Commercial solver licences are expensive. Pricing is typically quote-gated, but the numbers are not small — tens of thousands per year for a single production deployment is normal, and it scales with cores, machines, or users depending on the vendor. Everyone evaluating a commercial solver knows that part.

What they do not account for is that the licence fee is only the beginning. The engineering hours — building platform-specific images, debugging across the JNI boundary, maintaining licence server infrastructure, defending native binaries in security reviews, and keeping all of it working as JDK versions and solver versions move independently — are a cost that recurs every sprint. It does not appear on any vendor’s pricing page, and it is almost never part of the evaluation.

The total cost of putting a commercial native solver into a Java application in production, and keeping it there, routinely exceeds the licence fee within the first year. The licence is the line item people compare. The engineering is the cost that actually matters, and most of it is invisible until the team is already committed.

Do you actually need the strongest solver on the market?

The top commercial solvers are the best there is, and for the hardest models they are worth both the cost and the complexity. But most models are not the hardest models, and the problems that genuinely need the very top of the range are rarer than vendors’ marketing suggests. A best-of-breed suite of open-source native solvers, tuned and kept current, is more than enough for the great majority of production LP, QP and MIP workloads.

Paying for the strongest solver available when a capable one will do is the same mistake as over-provisioning any other part of your infrastructure — except this one also brings all the complexity described above.

An alternative

The problem is not that native solvers exist. The problem is that they end up inside your application.

The Optimisation Service keeps a best-of-breed suite of native solvers in a separate server, and your application stays pure Java — one Maven dependency, no JNI, no native binaries, no licence servers in your process. Use the public shared instance, or deploy the image privately in your own environment. The model code you already have does not change.

The solver suite is assembled from permissively licensed open-source solvers. No commercial solver licence is required, and none is included — there is nothing to buy from anyone else.

Without a licence key the service runs in a limited mode on ojAlgo’s own pure-Java solvers. That is enough to wire it into your application and see how it works. A subscription unlocks the full solver suite.

See the Optimisation Service

The question is not whether you need a stronger solver. It is whether the solver needs to live in your application.