SAFE Network + database-driven websites

@happybeing that’s genius!! Where can I read more about it?

@dirvine is that really how it works?

@happybeing Any plans for a requirement to pay in order to access SAFE Network? I would be in favor of it. I can imagine a micropayment for each GET request eliminating a lot of problems.

Of course, your getting info from a well informed hand old there in SAFE timescales (no offence @happybeing :smiley: )

On a GET request there is a mod arithmetic number (say X) so every X requests is a farm attempt. Every X * 10 requests is a dev farm request payment (the 10%) and every X * 20 a core dev payment (representing 10% and 5% respectively). Core payment wallet address will have to be the foundation for now and we need ot distribute those to committers unless we can automate it in some way, at least is open and auditable. App devs include their wallet address in GET requests for their app, the payment is sent to the address used in the GET.

5 Likes

There’s no charge for accessing public data. @dirvine just summed it all up - I can’t add to that as even those details were new to me. Most of what I know is from things that David has posted here, just like the above.

Respect to you David. Hope your shoulder is OK, take care - after all, we need you! :slight_smile:

4 Likes

Storj dev here. One big difference is that we work with blockchain tech (for file metadata, e.g. with factom, but not actual file data) and MaidSafe does not (their project was inaugurated before Bitcoin whitepaper even came out). MaidSafe Ltd is also aiming to build a new kind of internet (including a new implementation of RUDP), whereas we are currently focused on decentralized storage. Our latest whitepaper was just released so you could take a look at that to get a better understanding of our project. I’m sure the SAFE Network community here can answer all your questions about their technology. We’re all about cooperation though, so one day our front-end applications could talk to both our own backend tech and that of SAFE Network.

9 Likes

Is there a doc for how to programmatically access and manipulate data on safenet?

See the documentation which includes tutorials, but be aware that there are changes coming to the API as we move to safeapp_nodejs. Keep an eye on developer updates (every Thursday evening, GMT) for these.

[ @frabrunelle I had trouble going from the main landing pages to SAFE API documentation. Maybe needs reviewing to help people find it starting from each of:

I couldn’t find the index until I went to https://safenetwork.org]

1 Like

Maybe this topic will help refresh your memory on the current plan. Need to read it all since the opening post is not entirely correct.

tl;dr in summary

FR - farming rate amount per GET.
1/FR - Gets per coin

  • Farmers are paid at FR (whole coins at the moment so after (ave) 1/FR GETs
  • APP developers are paid one coin after 10/FR GETs (10% of FR) on their APPs (data?)
  • PTP (maybe) are paid one coin after 10/FR GETs (10% of FR) on their content
  • Core Developers are paid one coin after 20/FR GETs
2 Likes

I am sorry to resurrect this post, but with the coming test 17, and MD being delivered soon, I think some people like me need clarification on a few points:

Let’s say that I want to develop my own app/website on SAFE, and this app needs Mutable data because it is a user-generated content app, even though not very data intensive.

If the websites use common HTML, CSS and IMG folders, how am I supposed to create a dynamic website without SQL, AJAX or HTML5 ? Where is the database ? since it is not located on a server, does the data populated by a user, and shown on my site belong to the user ? is my site just the viewer of a massive decentralized key-value DB à la redis, and is it just here to organize and sort locally data that were contributed & stored to my website by users from all over the network ?

4 Likes

I am not technical enough to tell you exactly what to do but I can direct you to the DOM API that is for dynamic websites. I bet down the road they’ll make it super easy to upload an existing dynamic site but for now in the demo app AFAIK you can upload a static site that has CSS etc. In one of the previous testnets I found a very good looking template that was beyond me as I know nothing of CSS or HTML and I uploaded it easy peasy to the network. I’ll find a link for the DOM API and link it in a moment

Link above is prolly best place to start, there are links to documentation as well

6 Likes

thanks so much exactly what I needed.
So there is a container specifically for data, that users can taper with through my website interface.

But if the user edit data on my site it will cost him of his safe balance.I guess it might be possible to subsidy white listed users.

How many time are containers deduplicated across the network for redundancy?

Yeah okay then I have a question. How is this done? Say I upload a picture or poem. How do I tag that and get paid by the network?

You’ll have to wait until it is implemented before anyone can answer that.

Safenet is the database and it comes in the form of a dezentralized key-value storage. All application logic is done on the client side and data modification is achieved through interfaces to safenet. Currently there is an interface for javascript (dom api from SAFE browser), nodejs (safe_app_nodejs), and a java version is currently in the making (safe_app_java).

Compared to traditional web development this is a whole new concept. In my opinion one of the biggest advantages is, that developers can’t “hide” their code on servers which forces them to think about various security aspects much more than it could’ve been in the past.

4 Likes

Yeah but there are containers for data, so the data is gathered here, it is not spread out all across the network without a logic.

I’m not sure what you mean by ‘gathered here’. The data is stored across the network, but there is an API that allows you to view and access it as if it were in containers. The data remains where it is until you access it (e.g. by saying get me this item from the container). But this is just using Mutable Data to provide a container style way of accessing data that is stored across the network.

Hope that clarifies.

So it is up to client side code to provide the ‘style’ of interface that your app / code wants to see. Either the API (such as SAFE-NFS) or something else yet to be written, for now by third parties, but in time I expect the SAFE API will be extended to support more complex data models (such as MapReduce etc.).

3 Likes

Very simple question: If I have a website, and someone comes and drops a comment. Where is the comment stored ?

The container is a way to access in bulk data on my website even though all this data is spread out every where. I think I get you.

I am really looking forward to start coding my own little dynamic website and get my hands dirty to understand things better. I am going to be a pain with my questions I am afraid.

5 Likes

It depends how you decide to implement it, but there was an earlier demo which I think was a good guide. Using the new API it could/would be stored using Mutable Data, in the old demo (old API) it used Structured Data / Append.

Storage such as this means the user pays for the storage (so it is their data) but it would be the App which determined how, what permissions, and whether to just use the containers (app or public), or use Mutable Data directly.

We’re at the frontier here, so there is no established rule or convention for the best way to implement any particular design pattern or application function, though I’m sure common ones will emerge quite fast, and that MaidSafe’s own demo apps / tutorials will provide examples we can follow.

8 Likes

The code can not be hidden, but others will not be able to read it all. Part of the code should be stored by one network member, and the other part from another network member.

But in the case of say javascript the code is brought together when you run/open the site. Thus you can read it. Or easier is to request the file and its there to read.

You are correct that the vaults cannot read it or know what file the parts are from, but the file has to be readable in order to be loaded into the web page.

The same is not true for compiled programs since the source code is not included. Only if the program is “open sourced” (or similar) would the source code normally be available.