Implementing Complex Sites

Where should a new user begin when wanting to implement some common expectations of a website?

I know things have changed quite significantly over time so where do we stand, on stuff like;

Video Streaming?
Search?
Asynchronous content updating?
Connecting peers over the network?

Any code snippets are suggested implementation methods for this will do wonders to kick start on integrating them into some basic but usable sites.

Thanks!

1 Like

The key thing for now is static content and you can do a lot with that. You can even do search within the site, though I’ve not tried that myself.

I’m not sure what you mean by asynchronous content updating, but @Traktion has demonstrated video streaming at least to a degree, that is you can watch videos hosted on the network.

You don’t need anything special. Begin with a static website and if it works locally - without a web server - it should work on Autonomi. This doesn’t just mean using hand-crafted HTML, there are plenty of static website generators out there, including Publii which looks and feels like WordPress but runs on your PC or laptop.

I hope to be demonstrating this before long, and showing others how to publish these kinds of sites too. For now though I’m waiting on a fix to the Autonomi client APIs for upload of directories for this bug.

People are building sites for this right now, or waiting for help to do so in this topic: Website builders - an invitation

4 Likes

It sounds like you want to build applications rather than focus on data storage.

Applications were always envisaged as an integral part of the project, and providing users not just with storage but a free and open ecosystem where they choose the app, but retain control of their data (with privacy baked in).

2 Likes

So yes, building sites with static content can achieve a lot. Its more about the framework to do that with and how the functional code within a site would have to change to facilitate this.

By video streaming I was referring to RTSP (webRTC eg) for one safe node to another safe node… it should be able to transverse data via the network to make this happen or is this something missing to make this realistic today? I was thinking of using this network as a replacement for STUN/TURN which sucks.

By Search, is there a way to search public data on the network? If so, how? how can I deal with containers of data and such for user content etc.

Im sure there must be some examples of stuff somewhere… I just dont know where…

If it’s a static site it won’t need to change. What’s needed is an app to publish and view such sites and I have made a demo which works locally, but needs a bug in the network fixing (as mentioned above) before everyone can publish sites with it.

That’s really an app more than a website, and not something I can comment on although I do expect that kind of thing to be built by someone.

No, that isn’t built in so will need to be built on top. My app supports a simple way for people to share and find sites (a public index) but it isn’t search and we won’t really need that for a while.

Websites themselves will be able to support search of their own content if the creator designs them to do so, but that’s not quite what you are asking.

For static sites all you need is the site. You can build it exactly as you would now, so the examples are out there and not specific to Autonomi. To publish and view on Autonomi you will need an app like the demo I have made, which I will publish as soon as it will work on the public network. I can use it on a local test network fine so it is a matter of waiting for the Autonomi bug to be fixed to make it usable with a public network (ie one where nanos are scarce).

1 Like

Until we get this for :ant: maybe you could use webtorrent javascript in your static site. Then just create the torrent for the video you want to stream.

You seem to know a lot about the current state of the API and it’s capabilities - is it also designed to facilitate direct P2P connections between users?

How are you going about the indexing?

1 Like

There’s nothing built into the API for that at this point.

Regarding indexing, I said ‘index’ like in the back of a book!

1 Like

Looks like that was an annoying question. You’re probably wanted to say “RTFM” but are too polite. My bad, I just couldn’t find API docs.

Nope, I was just answering. Nothing else in there.

And BTW, there isn’t much to RTFM at the moment so I definitely wouldn’t say that. Ask away.

2 Likes

Thanks. How would I get started learning the API?

It’s likely not finalized, but if you made a demo app then you probably also know how to do a “hello world” for someone who wants to learn how to interact with the safe network programmatically.

2 Likes

The answer to this depends on what you want to build and how, what you know and what you are willing to learn.

If you want to use Rust there are some examples in the safe_network README, so that’s what I regard as a “hello world” app, or the closest we have right now. Ideal for creating a command line app, which is a good place to start anyway.

You could then graduate to a TUI by using the ratatui crate (use by both Autonomi’s launchpad and vdash).

If you want to build a website it’s a whole different answer: create a static html website and await my demo would be a good first step.

If you want to build something with a GUI, it’s a combination of the above. So I would suggest starting with those and then look at how I built my app awe which has a web front-end and a Rust back-end (using Tauri enables this to be built for multiple desktop and mobile platforms).

Those are the main options for me at the moment. Others have their own approach but I can’t advise on those.

At some point choice of languages will expand provided they compile to WASM but I’ve not done anything with that for a while.

2 Likes