beakerbrowser / homebase

Self-deployable tool for hosting hyper:// websites
MIT License
406 stars 36 forks source link

How can I use homebase HTTP pinning service ? #58

Open Ddataa opened 3 years ago

Ddataa commented 3 years ago

Hi there,

Thanks a lot for that amazing project.

I did deploy an instance of homebase in my server and add one hyperdrive to test together linking with a domain : It works like a charm ! 👍

Now I am trying to update the content of my hosted hyperdrive via a script/API and I am not sure how or where to start.

I have read a few times mentions about an HTTP pinning service made available with a homebase instance...but then I don't find any documentation on how to use it.

Can someone advise some guidelines or any info to help ?

pfrazee commented 3 years ago

Unfortunately there's not currently a pinning Web API. (There was in a previous version, it got removed to reduce maintenance loads when we switched to hypercore.) There's some talk of bringing that kind of API back though.

Ddataa commented 3 years ago

ok

Would that be possible to do with a self-hosted hashbase ?

pfrazee commented 3 years ago

Hashbase is still on the old Dat stack so it would need to be rewritten to use Hyper

Ddataa commented 3 years ago

I see.

How do I get an HTTP pinning service api running on a server then ?

Ddataa commented 3 years ago

I am thinking dirty tricks like

dat-store + webhook + script bash

pfrazee commented 3 years ago

Could work! I've been talking about tackling this (again) with the team lately and I know @rangermauve is thinking about it too, so there may be a gooder solution on the horizon

Ddataa commented 3 years ago

I know it could work but I don't want to re-do something in a less good way than it was done before....like all was so elegantly described in the DEP-0003 https://www.datprotocol.com/deps/0003-http-pinning-service-api/

or could also works better to add an API into homebase directly than can modify the existing configuration file...

pfrazee commented 3 years ago

That spec wasn't bad, I want to give it a chance to be tweaked with the next round but it's not a bad start.

If you look through the commit history on this repo, that spec was implemented and then pulled out, and it worked exactly like you describe. If you wanted to revive it, I wouldn't want to merge until we get together to re-discuss the spec but you could maintain it as a fork until then

Ddataa commented 3 years ago

would it be that one ?

https://github.com/beakerbrowser/homebase/commit/736f81195a384d45971197cd52ea254e1cdf82c2

pfrazee commented 3 years ago

Yep that's it

Ddataa commented 3 years ago

why is hyperdrive making it incompatible with dat & web api ?

pfrazee commented 3 years ago

The move from dat -> hyperdrive was a protocol replacement (hyper replaced dat). I pulled out the web api because I was short on time and needed to get homebase into a working state with hyper quickly

Ddataa commented 3 years ago

ok I see, so it might just work then...

little side questions, how is hyperdrive better/different than dat protocol ? (there is no DEP for hyperdrive by the way...) Is it directly link to the development of beakerbrowser or not ?

RangerMauve commented 3 years ago

As Paul said, we're going to be working out a new standard for the HTTP API. In the meantime, dat-store's HTTP API is still there and I think the docs link to a client which you can use to talk to it from web pages.

pfrazee commented 3 years ago

little side questions, how is hyperdrive better/different than dat protocol ?

It was a bunch of breaking-change improvements, we switched from a tracker server to a DHT, and we majorly improved the performance and scalability of the files storage

Is it directly link to the development of beakerbrowser or not ?

Beaker isn't driving development so much as following iit

Ddataa commented 3 years ago

little side questions, how is hyperdrive better/different than dat protocol ?

It was a bunch of breaking-change improvements, we switched from a tracker server to a DHT, and we majorly improved the performance and scalability of the files storage

Is it directly link to the development of beakerbrowser or not ?

Beaker isn't driving development so much as following iit

Thanks @pfrazee

pfrazee commented 3 years ago

np