Offline backlog uploads in full after reconnecting
Signal K AIS plugin 0.3.1
Release AIS
- Fixes a queue that never emptied. While the plugin was replaying a backlog to aiscast it wrote every sentence its receiver heard to a new queue file, so it traded one file for another and the replay never reached the end. On a boat that had been offline a while, the queue directory stayed at tens of thousands of files no matter how long the connection was up. A replay now carries up to a thousand sentences from as many files in one frame, and sentences heard mid-replay go out from memory.
- The queue keeps far fewer files. Time offline used to leave one behind every fifteen seconds; the plugin now fills each file to 500 sentences before starting another, so the count follows how much is owed rather than how long the boat was out of range.
- Sentences past the server's publish limit are no longer lost. aiscast accepts 6000 sentences a minute and quietly drops the rest, so a large replay used to arrive mostly empty while the plugin counted it as delivered. The plugin now paces a replay under the limit and keeps anything the server did not take. A boat with a big backlog takes about a minute for every 5400 sentences owed to catch up, with live sending held back until it is done.