High-level datatypes library

Good initiative @loziniak - it would be great if this kind of thing would get sponsorship from Autonomi IMO, not just app comps like IF. cc @JimCollinson

I have some enhancements to Archive and other data types:

For Archives, I have a PublicArchive and PrivateArchive types, and code which will return whichever it finds at an Archive address. This enables the History<Tree> type to read archives of either type and can be used by other apps to do the same, using the dweb::files::directory::Tree type.

This code has to handle the fact that the Autonomi API doesn’t know the difference, so will return success when deserialising the “wrong” type, and return valid but incorrect content.

For all data types, but currently only in the REST APIs, I provide a name based interface where:

  • each app has its own name space
  • each type has its own name space

So you can use a single owner secret for all your apps (provided each uses a unique app-id), and the app can just give each object a name when creating it, and can retrieve any object using its name or address.

You can see and try this out in the dweb REST APIs by running dweb serve and opening the Swagger / OpenAPI UI with dweb openapi-docs.

It would make sense to provide this slightly higher level API to the Autonomi data types, not just in the dweb REST API but also as a Rust library either dweb-lib or another. It makes sense to have this in dweb-lib and then use that for the dweb REST API but I don’t know when I’ll be able to get to that.

9 Likes