That’s excellent news @Krishna_Kumar and looking forward to that RFC; I’m sure many people will be eager to use this
This is great @Krishna_Kumar
Any chance of a Structured Data for dummies post? I understand the RFC, but it’s how you would do clever stuff with it - things like enumeration. If that’s just links/refs in the SD objects themselves, simply knowing that is what I need, but if there are none obvious/clever ways to use them I want to know!
I can’t find a thread with that name?
What’s the actual use case? I have a bit of a hard time understanding what you want to do. An enumeration of constants (enum) could be done in immutable data as well. If you want a mutable list/array, you could let a client store that in an SD object, yes. But it’s also possible to create “decentralised” data structures of multiple SD’s, like how this project lets the users build up a tree data structure together, where every branch of SD’s in the tree is a conversational “thread”.
The thread doesn’t exist, sorry to confuse. It was a suggested title to avoid cluttering this topic.
I got the impression from David’s early comments about Structured Data that there were clever ways of almost querying the network to discover SD objects of a given type, or to iterate the child objects of a given SD without having kept track of what had been created. In his brief talk about implementing blog posts and comments using SD - do you recall?
As I said, if this is all self managed by maintaining references, lists, indexes etc within SD, that’s all I need to know. I just want to be sure I’m not missing some clever features.
If it’s still not clear don’t worry.
@seneca, can I use this project as a disqus replacement? I have several websites with a comment section, and I normally use facebook or disqus to implement the comments. Can I use your project just as the “Facebook Comments Plugin” or the “Disqus Comment System”?
This is exactly what I do with Decorum, yes. This sort of thing can be done because the programmer can decide from which values the address of an SD object will be derived. The address of an SD object is SHA-512(tag_type + identifier), and we pick the tag_type and the identifier ourselves. By establishing rules (a protocol) how these are chosen, the addresses become predictable.
For example, the decentralised forum of Decorum will allow anyone to create a new forum category (think subreddit). I establish the rule (this is an example, it’s not accurate) in the protocol that every category SD object shall have tag_type “12345”, and as identifier it shall have the SHA-512 of the name of the category. Let’s say someone wants to add a category “Music”, then the address of that SD object = SHA512(“12345” + SHA512(“Music”)).
Yes, that’s the core feature really!
On SAFE we won’t integrate third party plugins like “Facebook Comments”. Everything is already integrated with the SAFE Network itself by definition, so everything can be embedded/linked/shared between websites. Websites/apps become merely user interfaces and protocol implementations to interact with the data stored on this huge global unified filesystem, the SAFE Network.
I think getting this is the most vital thing if one wants to build an app/website for SAFE. We should explain this to every dev new to SAFE.
Thanks for explaining @Seneca. This is like saying SD objects will be created with sequential addresses (ie calculable possible IDs) and then retrieving them from 0, 1, 2… until we get an error - yes? I had understood this from David’s explanation but it seemed like he might be alluding to more than this.
I’m still not certain but will take that as it until I hear otherwise! Thanks again.
Yes, that’s the idea. But as we know it probably won’t return an actual error, but a garbage SD to make brute-forcing account SD’s impractical. So the error will for example come from a failure to parse the data string to a JSON format.
I don’t know, but in my view this is extremely powerful already!
but what if we get a gap? I mean what if we have 10 comments and then the comment #3 is deleted by its owner? How the app will know to not stop on the comment #2?
We can simply check for several more than one to be sure, possibly with some randomization added to the mix. There are more such potential exceptions, and you’re right that they need to be taken into account (which is definitely doable). Good thinking!
Quite. This is why I’m not sure we have the real deal here. Another is that accessing non-existent data is, I think, treated as spam and can lead to disconnection.
It sounds like it’s not set in stone yet how exactly this will be handled, but I’m convinced that “searchable” general purpose SD’s will exist. Not having them would necessitate servers being reintroduced for many kinds of apps.
In addition, the “delete” button on the decentralised forum won’t truly delete the SD, it will only empty it’s data field and invalidate/empty it’s ownership. It won’t be displayed in the thread anymore, but the SD will be there. So someone would have to use custom code to try to create such “gaps” in threads by truly deleting them.
I also described how everyone can be a “moderator” and hide messages and how such “moderator metadata” can be shared with other users. By invalidating (hiding) the addresses of the gaps, the protocol will automatically skip them and resume with any posts after the gap.
So yes, people could try to sabotage threads, but they’ll have to get out of their way to do so, it will start costing them quite a bit if they want to keep doing it, and communities can find and fix such sabotage themselves. It will undoubtedly happen from time to time, but I personally expect 99.99% of the threads won’t be bothered by this.
Edit: In short, I don’t think this is a bigger problem than “regular” spam. Popular forums/threads will require moderation, that’s life…
some thoughts in order to help mitigate this problem:
besides doing a linear search to find the last comment, you can double-check it with some half-interval search algorithm. In this case, with just 8 GETs, we can find the last comment, even if we’re talking about a 4 billion comments universe. By using these 2 methods at same time, we can get a more accurate result.
you can implement a NOOP comment to replace deleted comments. A maintenance script can be run by the admin to sequentially scan the comments, find gaps and replace them with NOOPs. It can check until the last one and keep going for thousands more (it’s an admin tool, not the client, so no one will complain the time spent to find the last one). This would be a sort of integrity tool (on the future this can run on the safe map-reduce/cloud computing).
you can also have an admin tool to scan and write the total amount of comments on some key-value. Then, this value can be used by the client as a 3rd method to calculate the comments counter. New comments can send a message to another tool, via safe messages, which will update the counter.
Quite right, those are some good ideas as well. I’m very optimistic that we can make it easier for the “good guys” to fix things by giving them the right toolbox than it is for the “bad guys” to seriously sabotage/spam threads. It’d be futile, a temporary annoyance at most, and thus not worth the effort/price.
sure. Just for the record, I agree with the “keep it simple”/“if it ain’t broke, don’t fix it” attitude - many times we (me) create solutions for problems that will never exist. But I confess that I’m paranoic with “bad guys”.
Ah, but in the case of sabotage, perhaps the problem would have existed if we hadn’t prepared a solution just in case. The existence of a solution may be a strong deterrent to not cause the problem in the first place.
But of course that simple method allows a disgruntled forum member to write bogus entries. What methods have you considered to prevent malicious writing of SDs to interfere with normal conversations?
Using linked lists. Or better index SDs that the APP owns and links the SDs that way. The indexes are link list (or sequential for topic). This would actually allow for “cross posting” in special cases if the APP allows it. Also saves on network traffic looking for potentially non-existent SDs
I have BTC or MAID burning a hole in my wallets…where can we donate? Sorry, I feel like an idiot saying this but I cannot find the donation address?