Skip to content

Releases: cablehead/xs

v0.2.0

04 Jan 04:51
8b982cf
Compare
Choose a tag to compare

Highlights

  • .get is now available as an internal nu command (for handlers)
  • We have a new docs site! Powered by astro starlight ✨

new docs site

Handlers

  • env is now preserved from your handler configuration script and between handler calls. This makes it convenient to set variables, e.g. access tokens, from your configuration script and to preserve state between handler calls.
  • Your configuration script can now specify modules to load for your handler.

Miscellaneous

  • Nushell to v0.101.0 πŸš€
  • Fjall to 2.4.4 πŸš€
  • Improved tracing / logging

logging

Breaking Changes

  • There is no longer the concept of "stateful" handers, which take a second argument for state. Since env is preserved between handler calls, you can use that to store state.
  • All configuration for handlers has been moved from the frame metadata to a configuration script.
  • The handler configuration script now returns a table of configuration options instead of the closure.

Raw commit messages:

  • feat: add .get as in internal nu command
  • docs: add reference/generators
  • docs: nu-fmt
  • docs: port reference/handlers over from the wiki
  • docs: typo
  • docs: getting-started/first-stream
  • docs: tweaks to installation and architecture
  • docs: add an architecture overview
  • chore: update next release to 0.2.0: we're skipping the path 0.1.1 took
  • chore: update to Nushell v0.101.0
  • chore: bump fjall dependency to 2.4.4
  • docs: getting started / installation
  • feat: move handler config out of frame meta to a configuration script (#37)
  • fix: restore the .rm to .remove alias
  • feat(nu): replace async/await with sync operations in command implementations
  • refactor: move AppendCommand buffer to nu/commands
  • feat: add sync versions of the Store.cas_* methods
  • feat: add a sync version of Store.read: that only retrieves historic frames
  • feat: move cleaning up expired frames to a background thread
  • feat: drop async from store.append -- it's not needed
  • refactor: store into its own module, including ttl
  • refactor: move topic_index_key from Store impl to standalone function
  • refactor: Store::new doesn't require async
  • refactor: move compaction from ReadOptions to inline tasks.rs, match handler pattern
  • refactor: consolidate thread pool and span handling
  • example(discord): update to make use of modules and with_env
  • feat: add with_env variables option to handler registration
  • feat: rename use_modules to modules
  • feat: add the ability to load modules to handlers
  • feat(deps): switch from async-std to tokio runtime for cacache
  • chore: .gitignore
  • fix: backoff for logging long outstanding spans
  • feat: fleshing out tracing (#35)
  • fix: updated handlers now start, on restart (#34)
  • example(discord): reduce heartbeat ttl to 5mins

v0.1.0

06 Dec 21:11
Compare
Choose a tag to compare

Highlights

A Major Rework of Handlers

https://github.com/cablehead/xs/wiki/Handlers

  • Prior to this release, handlers had virtually no error handling. Now, when an error occurs, handlers will unregister themselves and record the error in the unregister frame's metadata.
  • The handlers closure shape is now {|frame, state| ... }, meaning the frame is passed as an argument instead of being supplied as $in.
  • Treatment of return values has been normalized: there is no longer any difference between handler return values for stateful and stateless handlers. By default, non-empty return values are appended as <handler>.out (previously it was just <handler>).
  • You can configure the return value suffix and TTL using the return_options in the metadata of the handler registration frame.
  • .append calls from a handler are now batched and processed together after the handler successfully completes. They aren't yet emitted in a fjall atomic batch but will be in the future. handler_id, frame_id, and state_id (if there is state) are now automatically included in the metadata of these appended frames.
  • Stateful handlers now communicate state updates by appending a <handler>.state frame.
  • A handy trick is to set the return value suffix to .state: then your return value will become the next state value for the subsequent handler call.

Miscellaneous

  • You can now import from one store into another: https://github.com/cablehead/xs/wiki/Export-and-Import
  • The CLI client can now access stores behind HTTPS and BasicAuth
  • Two new TTL options for frames:
    • time:<milliseconds>: the frame will exist for the specified number of milliseconds
    • head:<count>: keeps the most recent count frames for a given topic; among other uses, this is useful for using xs as a KV store

Breaking Changes

  • See handlers notes above
  • fjall dependency has been upgraded from 1.5 to 2.4
  • $env.XSPWD has been renamed to $env.XS_ADDR
  • xs pipe has been renamed to xs process -- .pipe -> .process

Raw commit messages:

  • 4d983f3 docs: add --locked to the cargo install instructions πŸ™ @fdncred
  • 2d840a8 rename $env.XSPWD to $env.XS_ADDR
  • e02edab feat: add a version endpoint; bump version in toml to 0.1.0
  • 96c482b feat: add conveniences to dump and load a store
  • a190163 feat: add frame import endpoint for backup/restore operations
  • 6b5b51f feat: add xs cas-post: which inserts content into the CAS without needing to insert a corresponding frame
  • ca9b5bf s/postfix/suffix/g -- πŸ™ @marvin-j97
  • 1fa2678 feat: lots and lots of work on handlers (#28)
  • 0c9e689 tuning: use less (lsm) threads πŸ™ @marvin-j97 (#27)
  • ecf1e2e fix: update the example handlers to take frame as an argument
  • 5ab960b fix(handlers): ignore unregistered handlers on startup
  • 5f07a3a feat(handlers): validate closure shape and emit .unregister on registration error
  • f4f01f3 refactor: rename HandlerMeta to Meta, reuse Handler for /process endpoint
  • c5a0390 refactor: rename pipe to process
  • ee6193c refactor(handlers): pass frame/state as args instead of pipeline, encapsulate eval
  • ea648e9 refactor(handlers): split handlers.rs into module with handler and serve
  • 5907db4 fix: only include expose in xs.start meta when expose option is set
  • abe717f fix: pull TTL into its own module: bring nu/commands/append_command.rs up to date with TTL changes (#26)
  • cf30c8d feat(store): add Head TTL to retain latest N frames per topic (#24)
  • cbf70a8 fix: topic index encoding (#25)
  • 02938f6 feat: support unregister for handlers
  • d1106ae fix: avoid sending any events generated as a response to a handler, back to that handler
  • 71b3c83 fix: 's/eval_block/eval_block_with_early_return/g'
  • f7d367b feat: flesh out support for TTL::Time(Duration)
  • 5d1f2d0 feat: bump fjall dependency from 1.5 to 2.4 πŸŽ‰
  • 9af2792 fix: .pipe now uses eval_block_with_early_return
  • 82edbf3 fix: iterate on error handling / messages when using the cli to call the API
  • 674181d image: add deno2
  • aa02716 example(discord-bot): add README note for slash command handler
  • ed4a5ee example(discord-bot): add an example /dice slash command handler
  • 48776da example(discord-bot): bump API version to v10
  • 4e9b2c7 Update README.md
  • dd00b68 Update README.md
  • ff3a931 example(discord-bot): read access token from the stream
  • ceace87 chore: iterate on the packaged container image
  • 6d2d558 chore: iterate on the packaged container image
  • 6b74142 feat: client support for stores behind https and basicauth (#22)
  • 76e37d1 release: allow --expose to be enabled in the container image
  • 84921cf release: allow --expose to be enabled in the container image
  • f170252 fix(example/solid-ui): actually push up store/cas.ts

v0.0.9

01 Nov 17:00
Compare
Choose a tag to compare

Highlights

Builtin Nushell commands:

  • .cat: added, not follow features though
  • .head: added
  • .append: binary support
  • embedded Nushell version is now: 0.99.1

CLI / xs.nu:

  • xs pipe: added
  • xs get: added
  • xs head: added

Performance / Fixes:

  • @marvin-j97 added a secondary index for topic to better support .head <topic> operations ✨
  • replaying frames for new subscribers: Better, Faster, Stronger

raw commit messages:

  • chore: bump Nushell dependency to 0.99.1
  • fix(nu/commands/append): add support for ByteStream inputs
  • feat(nu): add .cat command to read event stream with limit and last-id support
  • feat(cli): expose xs pipe cli command
  • feat(nu): add .head command to get most recent frame for topic
  • feat: topic secondary index (#19)
  • fix: replaying history to new subscribers (#18)
  • feat(cli): add xs get command to get frame by id
  • feat(cli): add xs head command to get head frame for topic
  • feat(http): detect http client disconnect & emit disconnect events for streaming responses
  • fix: prevent stateless handlers from processing their own frames

v0.0.8 - First Binary Release

07 Oct 18:13
Compare
Choose a tag to compare

This release contains the first precompiled macOS binary of cross-stream.