Skip to content

cablehead/xs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xs

CI Discord

Status: WIP  [██████.......... 40%]

An event stream store for personal, local-first use. Kinda like the sqlite3 cli, but specializing in the event sourcing use case.

screenshot

Built with:

  • fjall: for indexing and metadata
  • cacache: for content (CAS)
  • hyper: provides an HTTP/1.1 API over a local Unix domain socket for subscriptions, etc.
  • nushell: for scripting and interop

desired features

  • event stream:
    • append
    • cat
      • last-id
      • follow
      • tail
      • threshold / heartbeat synthetic events
    • tac
      • last-id
    • get
    • last
    • first
    • next?
    • previous?
  • cas, get
  • ephemeral events / content
  • content can be chunked, to accomodate slow streams, e.g server sent events
  • as well as the event stream: a k/v store fo cursors and materialized views
  • ability to subscribe to updates
    • to both events (cat --follow)
    • and materialized views
  • should be able to manage processes ala daemontools, runit, Pueue
    • or: simply runs snippets of nushell on new event
    • the snippets are registered via the event stream
    • server facilitates watching for updates + managing processes
  • builtin http server:
    • You can optionally serve HTTP requests from your store. Requests are written to the event stream as http.request and then the connection watches the event stream for a http.response.
    • You can register event handlers that subscribe to http.request events and emit http.response events.

Path Traveled

  • xs-3: sled index with cacache CAS, no concurrency
  • xs-0 original experiment. -LMDB combined index / content store (pre realizing the event primary content should be stored in a CAS)
    • Multi-process concurrent, but polling for subscribe