Storage of versioned websites for browsing on Safe Network

(Related to DNS stuff here a bit too: A Safe Naming System to support versioned Websites (NRS/DNS) - #20 by Traktion)

I had some experimentation with this here: https://github.com/traktion/sn_httpd/blob/master/example-config.json

sn_httpd reads the data map associated with a site (see above link), then named files are lookup up in the map within sn_httpd and resolved to XOR addresses.

From experimentation, having a single map works pretty well (at least for websites - for FUSE/file systems it wouldn’t be ideal), especially given the XOR space is flat (without trees/hierarchy). The ‘shape’ of the site is essentially what this data map illustrates.

I also added the concept of a route map for sn_httpd to allow Angular URLs to be routed correctly (i.e. SPA site).

Combining the two (along with experimental DNS), I can upload the standard/native Angular dist files for IMIM, then use friendly URL names to access IMIM articles, e.g. http://vader:8080/traktion/blog/traktion/article/blogging-with-imim-and-safe-network#article

Lmk what you think!

1 Like