Skip to content

felix-gateway v0.8.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 03:35
· 12 commits to main since this release
42311a0

Tested against Felix 0.6.2. Four opt-in additions, each turned on by naming it
in the features of join:

  • cache_versions lets a browser write or delete a cache entry only if nobody
    changed it since it read it.
  • past_end answers a read or subscribe beyond the end of a log with a code
    and the log's tail.
  • principal has hello tell a session who Felix knows it as.
  • time finds a shard's offset for a wall-clock time.

state_get also takes a shard, under the shards feature from 0.7.0.
Sessions that do not ask for these features see no change.

Added

  • The cache_versions feature: cache_value carries the entry's version, and cache_put_if and cache_delete_if write only if the entry is absent or still at the version the browser read, answered with cache_put_result and cache_delete_result. cacheGetVersioned, cachePutIf and cacheDeleteIf in the browser client and its fake. Cache watches carry no versions yet; that needs a change in Felix (GetFelix/felix#1736) (#46).
  • state_get takes a shard under the shards feature, and state_value echoes it. A browser no longer has to guess how a stream routes entity keys: the as_of and version it gets are offsets of the shard it named, which a read or subscribe on that shard understands (#45).
  • The past_end feature: a read or a subscribe from an offset beyond the end of the log is answered with the code past_end and the log's tail, instead of a message to match (#45).
  • The principal feature: hello names the session's Felix principal, the string stamp_sender writes in front of its records, so a page can tell its own records from the rest. The browser client's Hello has it as principal (#47).
  • The time feature: offset_for_time answers, as an offset message, the first offset of a durable stream's shard appended at or after a time, so a browser can seek by wall-clock time in one lookup. It needs subscribe on the stream and shares the 4 requests a session may have waiting with read (#48).

Fixed

  • The join pattern in the protocol reference could hang a browser against a Felix 0.6.0 cluster: a live subscribe reports the raw log tail there, which can sit past a generation-start record that is never delivered. The reference now has a worked example and a runnable catchUp function for the join, takes the catch-up target from the replay's subscribed, says what live_offset promises, and notes that 0.6.1 and later report a tail a browser can wait for (#43).

Changed

  • The protocol reference says that as_of and version are offsets of the shard that answered, and that a read of as_of on that shard succeeds at once, barring a leader change (#45).
  • Built on and tested against Felix 0.6.2: felix-client and felix-wire 0.6.2, and the dev stack runs the 0.6.2 images.

Install

docker pull ghcr.io/getfelix/felix-gateway:0.8.0
cargo install felix-gateway --version 0.8.0
npm install felix-gateway-client@0.8.0

docs/configuration.md covers the settings and the scope file.

Image

ghcr.io/getfelix/felix-gateway:0.8.0 is sha256:0aab6b6039086e2865047c00caea301f17d1a5f24e4fd943321cb19fef3019c5, signed with cosign:

cosign verify ghcr.io/getfelix/felix-gateway@sha256:0aab6b6039086e2865047c00caea301f17d1a5f24e4fd943321cb19fef3019c5 \
  --certificate-identity-regexp '^https://github.com/GetFelix/felix-gateway/' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com