Repository navigation
felix-gateway v0.8.0
Tested against Felix 0.6.2. Four opt-in additions, each turned on by naming it
in the features of join:
cache_versionslets a browser write or delete a cache entry only if nobody
changed it since it read it.past_endanswers a read or subscribe beyond the end of a log with a code
and the log's tail.principalhashellotell a session who Felix knows it as.timefinds 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_versionsfeature:cache_valuecarries the entry's version, andcache_put_ifandcache_delete_ifwrite only if the entry is absent or still at the version the browser read, answered withcache_put_resultandcache_delete_result.cacheGetVersioned,cachePutIfandcacheDeleteIfin the browser client and its fake. Cache watches carry no versions yet; that needs a change in Felix (GetFelix/felix#1736) (#46). state_gettakes ashardunder theshardsfeature, andstate_valueechoes it. A browser no longer has to guess how a stream routes entity keys: theas_ofandversionit gets are offsets of the shard it named, which areadorsubscribeon that shard understands (#45).- The
past_endfeature: areador asubscribefrom an offset beyond the end of the log is answered with the codepast_endand the log'stail, instead of a message to match (#45). - The
principalfeature:hellonames the session's Felix principal, the stringstamp_senderwrites in front of its records, so a page can tell its own records from the rest. The browser client'sHellohas it asprincipal(#47). - The
timefeature:offset_for_timeanswers, as anoffsetmessage, 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 needssubscribeon the stream and shares the 4 requests a session may have waiting withread(#48).
Fixed
- The join pattern in the protocol reference could hang a browser against a Felix 0.6.0 cluster: a
livesubscribe 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 runnablecatchUpfunction for the join, takes the catch-up target from the replay'ssubscribed, says whatlive_offsetpromises, and notes that 0.6.1 and later report a tail a browser can wait for (#43).
Changed
- The protocol reference says that
as_ofandversionare offsets of the shard that answered, and that areadofas_ofon 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.0docs/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