Skip to content

Roost 2.5.0

Latest

Choose a tag to compare

@Maartz Maartz released this 22 Oct 17:43

Roost 2.5.0 adds channels in Phoenix's protocol, jobs kept in PostgreSQL, live pages the server updates, PubSub between servers, and HTTPS.

  • Channels accept WebSockets at /socket in Phoenix's V2 protocol, so phoenix.js connects unchanged. Presence events follow Phoenix's format, and with RoostApp.pubSub channel broadcasts reach the sockets of every server.
  • JobQueue.postgres(_:) keeps jobs in the app's PostgreSQL database through swift-jobs: they survive restarts, run on every server, and retry with backoff. RoostApp.scheduledJobs runs cron jobs from one server at a time.
  • A LivePage names its topics, and handleInfo(_:state:conn:) updates its open pages from server broadcasts. LiveRoute(_:pubSub:) reaches the pages open on every server.
  • ValkeyPubSub delivers PubSub messages between servers through Valkey or Redis, with the Valkey trait.
  • ServerConfig(tls:) serves HTTPS and negotiates HTTP/2. A missing certificate or key stops the app at startup.

Upgrade: Roost requires macOS 15 on macOS, as swift-jobs does. Set .macOS(.v15) in the app's Package.swift, or SwiftPM rejects it. Tests that read a presence_diff, and channels with an intercept, have changes described in the changelog.

Requires Swift 6.3+, macOS 15+ or Linux; ESW 1.7.0+, Nexus 2.1.0+, and Spectro 2.3.1+. Use roost-cli 3.0.1, whose generated apps support macOS 15.

See the changelog. The attached archive contains Roost and RoostTest documentation.

Validation: the framework's five CI jobs passed locally: framework tests on macOS (Swift 6.4) and Linux (Swift 6.3.3), the Valkey trait, the example app with its browser tests, and the generated app in release mode. Strict DocC, website checks, and all eight playground tests passed.