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.
I wish there was a simple stupid "just drop an artifact with a main.js" file and that's it.
Cloudflare is one of those companies I really want to like, but as a developer I just don't think they care. They want to chase big guys with big contracts that can get the love and support average Joe does not.
They seem to strongly underestimate the traction and money they could get by giving engineers rather than sales and accounts some more love.
And thus we have moved our stack, initially built around Cloudflare, to Azure. It also helps Microsoft throws lots of credits at startups and Cloudflare does not. But DX rather than money has been the biggest reason we moved off CF offerings.
In my mind Cloudflare gets the big picture of DX exactly right. When deploying your service the deployment itself is not stateful, there's only one step to it: 'wrangler deploy'. Compare that to AWS Lambda: 1. build you code, 2. pack into a zip file, 3. make sure the S3 bucket exists, 4. upload the zip to the bucket, 5. deploy lambda, 6. update API gateway... And don't even get me started on Cloudfront - every change takes like 5min to apply.
Every so often I do encounter some rough edges, like service bindings binding to deployed services or workerd binary dynamically linking to some shared libraries so wrangler installed through npm doesn't work on Nixos etc. That said I respect the approach Cloudflare team is taking by focusing on the really important stuff first.
For AWS are you aware of SAM for CloudFormation[1]? The CDK[2]? You picked the best representation of Cloudflare (via `wrangler.toml`) but the worst representation for AWS of the developer experience. `cdk deploy` is pretty seamless and similar to `wrangler deploy` [3].
1 - https://docs.aws.amazon.com/serverless-application-model/lat...
2 - https://docs.aws.amazon.com/cdk/v2/guide/home.html
3 - https://docs.aws.amazon.com/cdk/v2/guide/serverless_example....
As soon as azure credits stop, it gets really expensive really fast and migrating off is labor intensive ( been there, done that and I regret going through it).
In comparison with cloudflare, which is relatively cheap.
Ps. Uploading a zip to Cloudflare: https://developers.cloudflare.com/pages/get-started/direct-u...
I think it was for WebP files but I can’t remember.