reader icon indicating copy to clipboard operation
reader copied to clipboard

Resource tags optimistic locking

Open lemon24 opened this issue 1 year ago • 0 comments

Some kind of locking is probably required to implement a use case like reactions (thumbs up/down etc., https://github.com/lemon24/reader/issues/228#issuecomment-817072794) correctly. Use cases like implementing comments (with versions) might benefit too.

Optimistic locking seems like a reasonable enough solution.

(Note we don't need this for feeds/entries because they're more or less eventually consistent.)

Relevant resources:

  • https://docs.peewee-orm.com/en/latest/peewee/hacks.html#optimistic-locking

Open questions:

  • What does the API look like?
    • Can we use a reserved top level key?
      • I seem OK with .reader.search in https://github.com/lemon24/reader/issues/228#issuecomment-835767543.
    • OTOH, reserved keys are for end-user-facing features...
      • But, is it reader's responsibility to control how they are shown? Presumably, for a use case like the one described above, the user would not see those tags directly, but see them rendered as 👍, 👎 anyway.

lemon24 avatar Jun 04 '23 21:06 lemon24