Skip to content

Releases

ubusio v0.2.2

Choose a tag to compare

@ddffcczz ddffcczz released this 04 Dec 15:03

Pre-1.0: the API may still change. No change of the exported API against v0.2.1.

Fixes three defects of subscriptions and notifications.

Changed behaviour

  • Unsubscribe and UnsubscribeID carry the removal through whatever happens to their context, which bounds only the wait. A later subscription to the same object is sent after it. While the connection is lost they return nil: the subscription went with the session.
  • NotifyWait returns one result for a subscriber that ubusd lists several times. It is done when every delivery is answered, holds the data of all and the first status other than StatusOK.

Fixed

  • Unsubscribe or UnsubscribeID with an already ended context forgot the subscription without removing it at ubusd; subscribing again then delivered twice.
  • A target removed before the subscription to it was recorded left a path subscription marked as made, so it was not made again when the object returned. A watched path now stays pending; a Subscribe that was making the subscription returns StatusNotFound.
  • NotifyWait did not return before its context ended when another client had subscribed the same subscriber to the object twice.

Known issues

  • If the removal request of Unsubscribe or UnsubscribeID cannot be sent in time, the subscription stays at ubusd until the Subscriber is closed, and subscribing again then delivers twice. See the changelog.

Verification

Compatibility and unit tests on an MT7981 router (OpenWrt 25.12.5, arm64) and an Orange Pi Zero (OpenWrt 21.02.2, ARMv7); an arm64 virtual machine with ubusd of OpenWrt 21.02 and 25.12 (race detector included); scripts/ci.sh and GitHub Actions.
10 minute stress runs passed on both routers. Not run for this release: emulation, 10 minute stress runs on the virtual machine, benchmarks:
docs/compatibility.md.

See CHANGELOG.md.

ubusio v0.2.1

Choose a tag to compare

@ddffcczz ddffcczz released this 04 Dec 10:23

Pre-1.0: the API may still change. No change of the exported API against v0.2.0.

Fixes the known issues listed for v0.2.0.

Changed behaviour

  • The default request timeout bounds a whole operation, the wait for a new connection and for a restore under way included. WithRequestTimeout(0) disables it.
  • The subscription changes of one Subscriber take turns.
  • Subscribe of a path that is only watched, because the object is missing, returns StatusNotFound (the watch stays) instead of nil.

Fixed

  • Waiting for another subscription change ignored the caller's context.
  • A cancelled Subscribe, Watch or SubscribeID could leave the subscription at ubusd.
  • A concurrent call for the same target could report success before the subscription existed.
  • Subscribing by path and by id to one object delivered notifications twice.
  • A cut off lazy connection attempt could report i/o timeout instead of context.DeadlineExceeded.
  • Subscribe racing with the appearance of the object could report StatusNotFound.

See CHANGELOG.md, also for the known issues.

Verification

An arm64 virtual machine with ubusd of OpenWrt 21.02 and 25.12 (race detector included) and scripts/ci.sh.
Not run for this release: physical hardware, emulation, long stress runs, benchmarks:
docs/compatibility.md.

ubusio v0.2.0

Choose a tag to compare

@ddffcczz ddffcczz released this 04 Dec 07:32

Pre-1.0: the API may still change.

Added

  • Conn.Shutdown(ctx): graceful close with a drain.
  • File descriptor passing (SCM_RIGHTS): Conn.CallFD, CallIDFD, Request.TakeFD, Request.SetReplyFD.
  • Conn.Monitor: the ubus monitor interface (root only).

Changed behaviour

  • Redesigned connection lifecycle: one connection attempt at a time, Close interrupts blocked I/O.
  • Objects and wildcard Lookup are bounded by WithReplyLimits.
  • Fewer allocations and context switches per request.

Exported API against v0.1.2: only additions. New Stats fields break unkeyed Stats literals.
See CHANGELOG.md for the full list and the known issues.

Verification

Run on two physical routers (OpenWrt 25.12.5 arm64, OpenWrt 21.02.2 ARMv7), an arm64 virtual machine
(21.02 and 25.12, race detector) and under x86-64 emulation. No amd64 or mips hardware.
Exact commits, counts and runs not made:
docs/compatibility.md.

Performance

libubus is faster than ubusio in the speed measurements on both routers:
docs/performance-results.md.