boxlang-express 0.2.9

Released .

  • Added app.getClusterManager() — cross-process peer discovery and manager election backed by a durable, shared cache(), so instances never need to know each other's addresses in advance. Two consumers built on top of it: app.schedule(intervalMs, callback, { clustered: true }) (only the elected instance runs the tick, with passive failover on a missed heartbeat) and boxExpressStomp({ cluster: app.getClusterManager() }) (relays a publish to every other instance over a mesh of outbound WebSocket connections, delivered through each instance's own subscriber/exchange/listener path — a message that arrived via the relay is never relayed back out). Configured via boxlang.json's modules.boxexpress.settings.cluster (module default: off) or app.set("cluster", {...}). cacheProvider is required once enabled, and is validated at startup against BoxLang's own IObjectStore.isDistributed() — the in-memory default cache is rejected outright rather than silently leaving every instance unable to see any peer, the same durability requirement boxExpressCacheStore() already has for sessions. Verified first across real separate boxlang OS processes (including a live leader-kill failover and a cross-process STOMP relay), then written up as tests/specs/ClusterManagerSpec.bx, ClusterSchedulerSpec.bx, and ClusterStompRelaySpec.bx. Deliberately not built: per-job leader affinity (one elected instance runs every clustered job, not different jobs on different instances), general peer-to-peer RPC, and binary relay payloads. See ClusterManager.bx and plans/cluster-support.md.