API proposal for discussion - Unify PublicArchive and PrivateArchive structs

I had an idea… I know :laughing:

I suggest it will be best to keep discussion on github but posting here for visibility:

Have tagged some on github I found easily and for those I didn’t…

@riddim didn’t find your handle there easily (at least not you I think)
@safemedia
Who did I miss?!

6 Likes

Kindof related for anyone creating directories online using archives, so also for publishing websites… (FYI @Traktion, @riddim)…

I’ve just pushed (not yet published) changes to dweb so that it:

  • stores websites using PrivateArchive instead of PublicArchive (this doesn’t make the sites private, but saves one chunk per file and speeds up access because you have one chunk less to fetch per file - the datamap chunk).
  • can access files given the address of either PublicArchive or PrivateArchive (@Traktion it would be great if you could also support this even if you don’t want to publish data using PrivateArchive. Then both our apps will read data published using each other. Reading either is a little tricky you you can find the code which differentiates between one and the other here).
5 Likes

Forgive my ignorance, but do you not need the datamap chunk to list the files in the archive?

I’ve not played much with PrivateArchive, but I assumed you wouldn’t be able to list the files in the archive without the datamap?

1 Like

I’m referring to the datamap for each file in the archive.

So yes, you still have the datamap, or rather the data address for the archive. That can point either a public private archive.

1 Like