JOpt.TourOptimizer overview

JOpt.TourOptimizer is a Spring Boot application on Spring WebFlux that serves the JOpt core over REST. A client sends an optimization as JSON, TourOptimizer runs it with the JOpt core and keeps the result for the client to read. One container image runs in one of two modes. In trusted mode your own backend handles sign-in, tenants and licenses. In auth mode the JOpt Platform stack handles them.

JOpt.TourOptimizer is a Spring Boot application on Spring WebFlux that serves the JOpt core over REST. Your REST clients, JOpt.Solve and the MCP connector call its REST API. It checks each request, queues jobs, sends completion webhooks and runs each optimization in the JOpt core, Java 25 line. MongoDB stores jobs and results; in trusted mode it is optional. In the JOpt Platform stack, GeoCoderRouter supplies the geo data.

The diagram opens full size on click. The JOpt core itself, its lines and its use in your own Java application are in JOpt.Core.

This section describes TourOptimizer in both modes: its API, its jobs, its checks and its settings. How to run it is in System Integration: Trusted Mode for trusted mode and JOpt Platform for auth mode. Choose a mode helps to decide. The two modes side by side:

JOpt.TourOptimizer is one image. In both modes it has the same REST API, jobs with a job queue and several copies, completion webhooks, admission checks with reason codes, and the JOpt core. Trusted mode is the default: no sign-in, the backend sends the tenant and the license, MongoDB is optional and needed for jobs, synchronous runs and live streams are available. Auth mode runs in the JOpt Platform stack: users sign in with Keycloak, the tenant comes from the token, the license of each tenant comes from the stack, and stored results are always encrypted.

The diagram opens full size on click.

Image and versions

ItemValue
Imagednaevolutions/jopt_touroptimizer on Docker Hub
Image tagsOne tag per release with its version number, for example 2.1.0; pin a version tag (Docker Hub tags)
Runtime in the imageJava 25, started as a user without root rights
API port8081 inside the container
Optimization libraryThe Java 25 line of the JOpt core
API schemaThe OpenAPI schema of each release on the API page

The mode is not part of the image. It is chosen when the container starts: see Settings.

Same in both modes

TopicWhat TourOptimizer doesDetails
REST APIThe same endpoints and the same JSON model; every server serves its own OpenAPI schemaAPI and clients
JobsSubmit, queue, run, state, progress and result; several copies share one job queue in MongoDBJobs
Completion webhooksA message to your URL when a job ends, sent again until your server answers with 2xxJobs
Admission checksChecks before a job is stored; a refusal names an HTTP status and a reason codeChecks and limits
Run time and keep timeA run stops at its time limit and keeps its best result; a result is deleted after its keep timeSettings
Health and metricsLiveness and readiness checks; metrics on a separate management port when one is setSettings
JOpt coreEvery optimization runs in the JOpt core of the Java 25 lineJava 25 line of the JOpt core

What differs

TopicTrusted modeAuth mode
How it is chosenNo Spring profile auth (the default)The Spring profile auth
Sign-inNone; restrict access in your networkUsers and clients sign in with Keycloak and send a token
TenantYour backend sends it in the header X-Tenant-Id; TourOptimizer takes it as sentFrom a signed claim of the token; a header X-Tenant-Id is replaced
JOpt licenseWith the request, otherwise the default license of the serverPer tenant, from the secret store of the stack
Rates and quotasNonePer tenant, from the plan of the tenant
MongoDBOptional; needed for jobsNeeded, since auth mode runs optimizations only as jobs
Synchronous runs, live streams and job importAvailableNot available; jobs only
Stored resultsEncrypted when you set a master keyAlways encrypted
Webhook URL checkYour choice: none (the default), relaxed or strictAlways strict
Default limitsNone unless you set themSet by the stack and by the plan of the tenant
Where it runsOne container or several, on your own servers or in your cloudIn the JOpt Platform stack, with GeoCoderRouter for geo data
How to run itTrusted ModeJOpt Platform

Added: 2026-11-27 | Last updated: 2026-11-27