Skip to main content

Java SDK Comparison

6.5 Java SDK Comparison​

The Python SDK was built as a successor to the Simudyne Java SDK, maintaining compatibility with its core abstractions while extending the platform with AI agent support, a rigorous analytical layer, and modern deployment tooling. This section provides a structured comparison for teams evaluating migration or dual-SDK strategies.

Feature Matrix​

DimensionPython SDK v0.7.0Simudyne Java SDKAssessment
Core primitivesAgent, Message, Link, Action, Sequence, Split, GlobalState, Accumulator, EnvironmentEquivalent API surfaceParity
Agent types5 (Agent, LLMAgent, HybridAgent, RLAgent, ExternalAgentProxy) + async + cache1 (Agent only)Python significantly ahead
Execution8 backends (Local, Threaded, ProcessPool, MCP, Emulator, Async, Pregel, Dask)2 (Local, Spark)Python more versatile
CalibrationABC-SMC, 5 prior types, compare_models, posterior predictiveNonePython only
ValidationGeneric Feature protocol, 3 domain libraries, ablation, variance decompositionNonePython only
Statistical testing4 tests, 4 distances, 4 corrections, bootstrapNonePython only
Metrics27 standard metrics (21 core + 6 generic aliases)Basic accumulatorsPython significantly ahead
Raw throughput~1M agent-steps/sec (CPython)~10M agent-steps/sec (JVM)Java 10x faster
Agent ceiling~100K agents practical limit~1M+ agentsJava scales further
OutputCSV, Parquet, PostgreSQL, ClickHouse, S3, DuckDB, WebSocketCSV, Parquet, JDBC, WebSocketPython more formats
DeploymentDocker, Helm (8 templates), REST API, OTelDocker, REST API, Simudyne StudioJava has Studio IDE
Hooks / Guardrails11 events, 4 guardrails + custom predicatesNonePython only
ObservabilityOpenTelemetry (5 spans, 7 metrics)JMX metricsPython more modern
Developer experiencepip install -e ., JSON configMaven/Gradle, XML, JFrog credentialsPython simpler
Production track recordPre-production (v0.7.0)15+ enterprise deploymentsJava more battle-tested

Lines of Code Comparison​

Equivalent SIR epidemic model implementation:

AspectPython SDKJava SDKRatio
Model implementation45 lines120 lines2.7x
Configuration15 lines (JSON)40 lines (XML)2.7x
Build / packaging0 (pip)80 lines (pom.xml)--
Total60 lines240 lines4.0x

Migration Guide​

Key differences for teams moving from the Java SDK:

  1. Agent state: __state_schema__ class variable replaces typed Java fields. State fields are still typed (int, float, str, bool) but declared in a dictionary.
  2. Messages: agent.send(DoubleMessage, target, body=x) replaces agent.send(Messages.create(Double.class, x), target). The **payload keyword argument pattern replaces setter chains.
  3. Actions: Action.create(BankType, Bank.method) replaces Action.create("name", BankType.class, agent -> { ... }). Python uses function references instead of lambdas.
  4. Lifecycle: Identical (init -> setup -> step -> done). The super().setup(config) call is mandatory in both SDKs.
  5. Seeding: Both implement the same SHA-256 hierarchy (Patent 2). Cross-SDK determinism is guaranteed for identical seeds.
  6. Configuration: settings.json + config.json replaces Java properties files. The three-file separation (settings/config/model) is identical in spirit.
  7. LLM agents: Native in Python (LLMAgent, HybridAgent), not available in Java. Models using LLM agents cannot be ported to Java.
  8. Performance: For models exceeding 100K agents where throughput is the binding constraint, Java remains the better choice. For models under 100K agents with complex analytical requirements (calibration, validation, ablation), Python is strictly superior.

Strategic Recommendation​

The two SDKs are complementary rather than competitive. The recommended workflow is: discover and validate in Python, promote to Java for maximum-scale production. Python's analytical layer (features, calibration, ablation, variance decomposition) makes it the right tool for model development, where the primary bottleneck is scientific rigour, not raw throughput. Java's JVM performance makes it the right tool for production deployment at scale, where the model is already validated and the primary requirement is throughput.

For new projects that do not require >100K agents or existing JVM infrastructure, the Python SDK is the recommended starting point. Its 4x code reduction, zero-build setup, native LLM support, and integrated analytical tooling make it the faster path to production-quality models.