graffy icon indicating copy to clipboard operation
graffy copied to clipboard

Rethink Watch

Open aravindet opened this issue 2 years ago • 0 comments

TL:DR; Replace watch() with incremental read() polling

Why

The current implementation of watch() is complex to implement in providers and doesn't support back-pressure or resumption.

Steps

  • [ ] Implement the new where query version semantics ("if-changed-after")
    • [ ] Specify that version is a non-negative number, and that version 0 has a special meaning
    • [ ] Implement the querying of linked paths in graffy-link and drop graffy-fill completely
    • [ ] Restrict the use of finalize() to queries with version 0 in core, pg and link
  • [ ] Implement query version filtering in slice(): exclude unchanged from both known and unknown
  • [ ] Implement query version filtering in pg by adding a condition on verCol
  • [ ] Implement the async iterator form of read() to perform incremental polling

aravindet avatar Dec 10 '22 15:12 aravindet