Changes for version v0.0.61 - 2026-12-03

  • An action or request that could not be handled because PostgreSQL was unreachable is no longer answered: until now the action was acknowledged without having taken effect, and the request failed with internal_error, or either was left without an answer on a connection that stayed open. The server now closes that connection (code 1013), so the client sends the message again and it takes effect once. Nothing changes on the wire
  • New plugin option max_connections (default 10): the most PostgreSQL connections that the hub of one process uses at a time; further work waits. Until now a burst of messages, such as every client sending again what was unconfirmed after an outage, opened a connection per message, PostgreSQL refused them ("too many clients"), and the backlog never cleared
  • A client that came back more than 500 updates behind was given the whole state and a gap, although the history was all there. It is now sent everything it missed, however much that is
  • A request sent again while its first copy was still being handled (the client lost its connection in between) was answered at once as succeeded but without the payload. The server now waits up to about five seconds for the first copy's answer and gives that. Only if none appears, because the process handling the first copy died, is the answer still the one without payload
  • A worker that stopped while several updates of one channel were under way could hang as it exited, each of its database connections waiting for a query that another of them was blocking. The hub now cancels its unfinished queries when the process exits
  • New stress test, t/08_restarts.t, which runs only when TEST_STRESS is set: it restarts PostgreSQL and the server at about the same time while clients listen and send, and compares what they received with the database. Its header says how to run it
  • The promises of update and emit reject with a BoardStreams::Hub::Unavailable object, which reads as the error message, when they fail because the database is unreachable

Documentation

Modules

WebSocket channels for Mojolicious whose events and state survive disconnections
Connect to a BoardStreams server from Perl

Provides

in lib/BoardStreams/Client/Channel.pm
in lib/BoardStreams/Client/Error.pm
in lib/BoardStreams/Client/Handshake.pm
in lib/BoardStreams/Client/Membership.pm
in lib/BoardStreams/Context.pm
in lib/BoardStreams/Diff.pm
in lib/BoardStreams/Hub.pm
in lib/BoardStreams/Hub.pm
in lib/BoardStreams/Hub.pm
in lib/BoardStreams/Rejection.pm
in lib/BoardStreams/Update.pm
in lib/Mojolicious/Plugin/BoardStreams.pm