random-access-storage/random-access-http

Merging http-random-access and random-access-http

Closed this issue · 4 comments

e-e-e commented

I am opening this issue to discuss merging our two implementations.

I have not moved https://github.com/e-e-e/http-random-access into the random-access-storage org yet as I knew that this module already existed and it felt silly to have two versions of essentially the same thing. However they are structurally different.

I created http-random-access for use as a drop in replacement for raf and ram in dat storage. random-access-http does not work for this purpose as it requires absolute urls, and throws errors on write. http-random-access also uses axios rather than nodes native http module, so that its browser compatible.

I just updated my implementation to use the latest random-access-storage and while I was at it I made it work with absolute urls too in addition to relative urls. It now also passes your tests in addition to mine. I wanted to suggest that we simply merge my implementation into this repository and do a major version bump, and deprecate http-random-access. Although is there anything in this implementation that is not currently covered by http-random-access? Have I missed anything?

What are your thoughts @bcomnes, @mafintosh, @scriptjs, @juliangruber?

This repo was a fairly early implementation, and I never ended up using it beyond experimentation. Did the API change? Anyway, yeah, if you want to PR a merge of the two happy to merge.

e-e-e commented

Cool! I just opened this PR for your eyes - #16.

Re: API, basically the it remains the same although now with a few new additions like destroy, and del. The old abstract-random-access has been deprecated.

e-e-e commented

Also just thinking - we could easily add write, del and destroy, if the servers themselves support patch and del methods. We would then also probably need to add authentication options too, but that would be trivial.

e-e-e commented

We are now merged - and published as v2.0.0