Comment by crazygringo
5 years ago
This is hilariously clever.
Using the "Range" HTTP header to read chunks of the database file absolutely works!
But to be clear, there's no write equivalent, is there? You can't use "Range" with a PUT request.
5 years ago
This is hilariously clever.
Using the "Range" HTTP header to read chunks of the database file absolutely works!
But to be clear, there's no write equivalent, is there? You can't use "Range" with a PUT request.
The write equivalent would be the PATCH method using a "message/byteranges" body: https://tools.ietf.org/id/draft-wright-http-partial-upload-0...
Wow that's fascinating, thanks. That would actually turn HTTP into a kind of random-access filesystem, if adopted.
It's amazing but also slightly terrifying in the knowledge that then someone's going to write an SMB-over-HTTP connector.
TA was clear - there's no way to write, since static file hosting doesn't support dynamic write to begin with.
However, I imagine a service to support your scenario could be written in a standard back-end server language like Go or JS. The challenges involved would be much greater, however -- how to handle concurrency in particular. I suspect one would do better to just run PostgreSQL behind a web API.
That's basically re-inventing the Database but on the client side. We have gone a long way but we are closer to having the server side just as a data store.
Even if there was, I can't imagine your everyday static host ever supporting it.