Very cool library for read-centric use cases but I'd be very careful using this for use cases with frequent writes.
Very cool library for read-centric use cases but I'd be very careful using this for use cases with frequent writes.
I know they provide different features but I just needed a nosql type of storage so I didn’t care.
Ofc its a different matter if you write to the same key in the same file. But that could be solved with special method that allows you to do a setOrUpdate on a key in the json and when retrying the update method is executed again (allowing you to do increments or add a new item to an array) while guaranteeing consistency.
So if you write to the same file twice, one write will succeed before the other and change the etag of the file, which should in theory cause the other request to R2 to fail because the etag you send with as conditional no longer matches.