rocicorp / replicache

Realtime Sync for Any Backend Stack
https://doc.replicache.dev
1.01k stars 37 forks source link

Support collecting old client records from server #1033

Open aboodman opened 1 year ago

aboodman commented 1 year ago

The current protocol does not support deleting old client records. This is because clients are created implicitly by either push or pull, and the clientID is user-supplied.

So if a client record is deleted, it is not possible to distinguish a truly new client ID that should be allowed to be created, from a reused clientID that should be rejected. And we cannot allow clientID to be reused because it would break sequentiality of mutations from that client.

user72356 commented 1 year ago

I can't find this information now but, I thought I had read somewhere that Replicache clients invalidate themselves after a month or so of not connecting to the backend? If this was the case, would we be able to delete old clients and also old soft-deletes?

agallio commented 1 week ago

Hi there, I encounter this issue where the replicache client & client group data growth becomes problematic due to write-only operations without deletion.

I understand this was raised about two years ago, and I'm curious about any developments since then. Has there been any progress on addressing the challenge of deleting old client records? I'd be interested to know if any solutions or workarounds have been found, or if this is still an open problem in the current protocol.