3 ms·
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,
by crazygringo 6y 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.
- TimTheTinker 6y agoTA 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.
- csomar 6y agoThat'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.
- anonydsfsfs 6y agoThe write equivalent would be the PATCH method using a "message/byteranges" body: https://tools.ietf.org/id/draft-wright-http-partial-upload-01.html https://tools.ietf.org/id/draft-wright-http-partial-upload-0...
- crazygringo 6y agoWow 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.
- NoInkling 6y agoEven if there was, I can't imagine your everyday static host ever supporting it.