Skip to content

[5.1.0] Experimental queues, refactored schedules#76

Merged
cjbrooks12 merged 65 commits into
mainfrom
dev
Jun 8, 2026
Merged

[5.1.0] Experimental queues, refactored schedules#76
cjbrooks12 merged 65 commits into
mainfrom
dev

Conversation

@cjbrooks12

Copy link
Copy Markdown
Member

What's New Since 5.0.1

New Modules

Server-side (all experimental)

Module Summary
ballast-ktor-server Ktor plugin to run Ballast ViewModels natively inside Ktor server applications
ballast-autoscale Wraps a pool of ViewModels and dynamically scales worker count based on load — suited for server-side job processing
ballast-queue-core Persistent background job queue with retries, backoff, cancellation, checkpointing, and stored results
ballast-queue-viewmodel ViewModel wrapper around the job queue for familiar Ballast code patterns
ballast-queue-exposed-driver PostgreSQL-backed queue driver using Jetbrains Exposed (MySQL experimental)

Scheduler (split out and expanded from ballast-schedules)

Module Summary
ballast-scheduler-core Core scheduler infrastructure, independent of Ballast MVI — coroutine delay and cron-like polling executors
ballast-scheduler-viewmodel Integrates scheduler with ViewModels via SchedulerInterceptor to dispatch inputs on a schedule
ballast-scheduler-cron Full cron expression support using OCPS syntax
ballast-scheduler-android-alarmmanager Android AlarmManager-based persistent scheduler for exact-timing tasks when the app is backgrounded

Utilities

Module Summary
ballast-kotlinx-serialization Registers KSerializers once per ViewModel config so all plugins (debugger, queue, etc.) share them

Deprecations

  • ballast-repository — Marked deprecated. The MVI repository pattern is being phased out as it turned out to be a failed experiment.
  • ballast-schedules — Marked deprecated. Superseded by the new ballast-scheduler-* family of modules.
  • KillSwitch interceptor — Deprecated. Graceful shutdown is now a first-class API on BallastViewModel via AutoCloseable (close()) and SideJobScope.

API Changes

  • BallastEncoder / BallastDecoder — New unified serialization interfaces on the ViewModel config. Previously each plugin had its own serialization logic; now they all share one. ballast-kotlinx-serialization provides the implementation.
  • ballast-navigation — Added pathFormat() helper for sharing route definitions between Ktor client and server.

Documentation

The entire documentation system was overhauled — docs moved from an SSG/Orchid website into plain Markdown files living alongside the code:

  • docs/ is the new home for all Ballast documentation
  • Each module now has its own README.md co-located with the source code
  • Old Orchid/MkDocs build system and all generated pages removed

…. Backpressure should be handled with standard Flow operators instead of being an intrinsic part of the executor.
…, so each plugin does not need to implement its own (de)serialization APIs. Lifts graceful shutdown to the VM's public API through AutoCloseable interface, and also as a function on the SideJobScope, therefore deprecating Killswitch interceptor
…ry, rather than a dedicated SSG website on GitHub Pages
@cjbrooks12 cjbrooks12 merged commit 14325d2 into main Jun 8, 2026
24 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant