Skip to main content

SolverForge

·269 words·2 mins
Author
Vittorio Distefano
Turning complex tech into systems that actually work.
An open-source AI constraint solver I’m building to continue Timefold’s discontinued Python project.

What it solves
#

SolverForge tackles complex optimization problems—employee scheduling, vehicle routing, resource allocation—by finding optimal assignments against real-world constraints.

Scheduling
Routing
Resource Allocation

Architecture
#

Legacy: Python + JPype (Production)
#

The production solver uses JPype for direct in-process JVM access. Python bytecode is translated to Java bytecode at runtime via the JPyInterpreter, enabling constraint callbacks. Input data types are validated at the API boundary via Pydantic.

graph TD
    A["Python Model"]

    A --> B["JPype Bridge"]
    B --> C["JPyInterpreter"]
    C --> D["Java Bytecode"]
    D --> E["Timefold Solver"]
    E -.->|callbacks| B

Next-Gen: Rust + WASM/HTTP (In Development)
#

The new architecture decouples language bindings from the solver via HTTP. Constraints compile to WebAssembly via the timefold-wasm-service module, enabling language-agnostic support and sandboxed execution.

graph TD
    A["Language Binding"]

    A --> B["Rust Core"]
    B --> C["WASM Generator"]
    C -->|HTTP| D["Quarkus Service"]
    D --> E["Chicory WASM"]
    D --> F["Class Generator"]
    F --> G["Timefold Solver"]
    G -.->|execute| E
Why the change? JPype requires tight Python-JVM coupling and presents significant overhead, due to runtime type validation for every Pydantic operation. The WASM/HTTP approach guarantees near-native speed and enables Python, Go, C# — any language with a LanguageBridge implementation.

Project Timeline
#

  1. Continuity

    SolverForge (Legacy)

    Providing active maintenance the production-ready Python solver after Timefold deprecated official support.
  2. Rust Core

    Solverforge

    Building a Rust-native language bridge with WASM compilation for browser and edge deployment.
  3. Multi-language Support

    LanguageBridge Trait

    Python via PyO3 first - with architecture supporting Go, C# and more.

Tech Stack
#

Rust
Python
WebAssembly
Timefold JVM

Links#

Website GitHub PyPI HuggingFace