What ontology for social networking : status and comments

Hey everyone !

I am working on a demonstration app for a social network built on SOLID.

I understant that the FOAF ontology is to be used. However I don’t understand how to represent the notion of post and comments :

What ontology can I use to model the status updates of a Person, and all the comments made by other Persons, and all the likes and shares ?

Thank you in advance for help !!

Walter

Hi @walter.almeida activitystreams + ActivityPub?

2 Likes

Thank you, makes sense yes. What would definitively help would be fully fledge example on how to apply it, let’s say to do a facebook like platform. Is there any good reference for this ?

No consensus I know yet, I made some exploration on it , some discussion http://forum.solidproject.org/search?context=topic&context_id=3444&q=Activitypub&skip_context=true

2 Likes

Ok, Thank you for the link, interesting to see that no concensus yet … confirming the difficulty to standardize data structures.

Since no concensus, I will keep what I wanted to do simple. I am finalizing a full demo on how to create a full SOLID application with no code on Generative Objects. I thought of doing it on top of a real scenario with use of the proper ontologies. I will make it simple by just making out a simple ontology.

If you want to ‘publish on a wall’ , you can post to
https://agora.solid.community/public/agora/inbox/
Or last one https://agora.solid.community/public/popock/inbox/

The question is always where storing data ?
When a user send a post, does the data be on his Pod or not? I think yes. Then a notification on a ‘wall’ linking this post. (Usefull for websocket notification)
But when someone else comment that post, the data should be one this second user Pod, because he is the author. With a link to the post ( or the wall notification) … AND some data ( link to the comment) should be inserted to the original post on the first user Pod… But this second user does not have sufficient acl to modify first user post. :thinking::confused:.
How resolve this ? Perhaps a notification to his inbox or a specific open folder where first user can accept the comment ???

Same questions apply with ‘followers’ ‘following’

3 Likes

With our current Darcy prototypes (https://github.com/Darcy-Social, try it out at https://ibex.darcy.is/) , we simply store posts and comments as timestamped files in cdn-structured folders.

The posts are stored in folders in the pod of the original poster, the comments stay in the pods of the commenters, but with a link/notification object created in a certain folder of the pod of the original poster so that they can be found. (where everyone who is allowed to comment can create objects but not edit or delete them)

If the original poster does not want that comment under their post, they can simply delete the link.

So, no real ontology yet, that will come in an iteration after Shepherd.

2 Likes

I agree with all @Smag0

Let’s say user A is the user writing the post. User B is the one commenting.
Yes, User B comments should be User B pod. Yes it makes sense to add a link to this comment on User A POD so that we could easily show user A post + all comments from all other users. User B does not necessarilly has acl to access the user A POD and store a link to his comment. Or should he ?

In all cases : the links to comments for a given post could be in a separated file / ressource so that ACL can be on this index file rather than on the post file.

Two scenarios :

  • You need to be friend to comment on a user post, in which case we can imagine give proper acl access to user B to the comments index file on User A post so that he can add link to his comment. However : we would need granular ACL so that user B does not have access to mess up with all other users comments ! Is it possible ?
  • Anyone can comment a user post, in which case wouldn’t it make sense to give public access to the index file ? but still … some kind of granular access would be required. Some kind of special ACL that can isolate the date of each webuserid initiating it. Is it possible ?

And even then, is the question of data ownership : yes actual data (the comment) stays on the pod of the user having done the comment. However there is some kind of “personnal data” that is stored on another user pod : the actual fact that user B commented on user A pod. We don’t have the content, but the action. To me it is ok, and storage is limited at one level only, on User A pod, not on a central location.

3rd scenario:
This is a specific case where it could make sense to have a third party, responsible for tracking these indexes (tracking links in both direction, for efficiency purposes) , a server side level for handling this and making all of this efficient, but yes this bring the question of trusting a central “authority”

Humm notification to the inbox of user A could be a nice idea. And then he has to accept the comments. Or : whenever he connects to the application, all inbox messages are automatically processed. Which means that all other users will see an up to date list of comments on User A post only after User A will connect … Notifications to be added also for deletion of comments, but less important. What could make for this scenario : having some kind of “batch processing” capacity on solid servers, where a user can register a batch that could run on his behalf, even if he is not connected, and run on a regular basis or on a trigger (ex : message received in inbox). Is this possible ?

This is a common scenario, it is worth having a design pattern for this. I am hoping to get some answers / ideas in the decentralization workshop about decentralization patterns : https://decentpatterns.xyz/virtual-workshop-cyan/

And then the idea is to automate the implementation of these patterns so that it does not have to be manually coded every time ! I will post a demo soon on how we can do this with Generative Objects low code platforme GO-Lowcode

About the wall : I am not sure I see the point of the wall. In my demo, I am directly showing the post form user A post storage on user A pod. Why using and extra concept of a wall ?

Thank you @JollyOrc

And thank you for the notification mechanism for comments, makes sense !!

Still, one of the promises of SOLID is to functionnaly “standarize” data structures so that data can be understood by various applications; the question of having a common ontology for social network data is still on the table. The question remains : is it really realistic and how to get to a concensus ?

@JollyOrc what do you call “cdn-structured folders” ?

it’s the folder structure used by most Content Delivery Systems, where posts and comments are grouped in nested folders by year, month, day, and so on.

1 Like

Ok thank you, got it. I was wondering if you were implementing somehow some kind of CDN feature on your network, on top of Solid and I did not see how you would do it.

What I understand then is that you copy the classical structure of CDN folders to apply a best practice of structuring data for efficiency of search and access. Am I understanding right ?

I remember you saying that you still had some issues of performance using Solid for your network. Where is the performance botlleneck located ?

exactly!

The steps to load the feed are:

  1. fetch the friends list
  2. go to each friend and fetch their posts
  3. go to each post and look at the comment list there
  4. for each comment, go to the commenters pod and download the comment
  5. render all that to the screen

This creates a lot of network activity and back and forth that does take a bit. Of course, there are some ways where one can parallelise the operations and to render an overview that gets more detailed as things get loaded, but in our IBEX prototype, this is a significant bottleneck.

We’ll see how well the more streamlined handling the “Shepherd” version improves this :slight_smile:

For large scale implementations, the user client should indeed talk to a CDN that caches most of these things.

1 Like

Yes this is overkill … knowing that platforms like facebook or linked have algorithms to compute the user feed, it is most probably not computed on the fly but by specific servers which job is to prepare the feeds for fast access (+ whatever algo they apply so that you see what is more relevant to you or … for you to see whatever they want you to see!)

This kind of CDN would not really be a CDN as such (which I believe is mainly for storing public content for fast access, content being replicated on several locations), but a local “CDN” on the user Solid POD which would not so much be a CDN but a pre-prepared file for displaying the user feed.

On an decentralized application like done with SOLID, I would foresee that we still need this user feed precompute, but instead of being done an centralized server (or datacenter) for all users, it can be done on a per user basis. But still I believe it would need to be done as a batch processing, so that the calculation time and full data fetch is not done real time, but prepared for the user. So it would required Solid Pod servers to have the capacity to run batch processing on the behalf of the user, so that this can happen. Is it a plan to have something like this on Solid servers ?

Keep in mind that the Solid server is just the data repository, not the computing platform. Adding processing capabilities would be an extension.

So usually, the web app you use is hosted on an entirely different server than where your Solid pod is on. Often enough, the actual computing is done within the browser engine, instead of server side. (Which is what our IBEX prototype is doing).

true, but if you eventually want to have something of Facebook/Instagram scale, where people can share things that is seen by millions, you will need a proper CDN structure. :slight_smile:

1 Like

Yes. Such an extension seems necessary to me … or maybe I need to learn more about decentralization patterns to understand how we could build performant solutions this way.

Yes, problem is that then the processing is done real time, when batch processing is needed, then it becomes complicated…

Maybe one approach could be interesting. What about this :

  • When a user connects to his profile, the feed list is calculated (the way you expressed, by going to all friends etc.)
  • Once the feed is calculated it is displayed. But also : stored as the computed feed of the user at a given time.
  • This precomputed feed is stored on the POD as a basis for the next time the user wants to display its feeds and can be completed by anything new happening since last display.
  • This could be enriched with some kind of notifications broadcasted by all friends. Something arround : whenever I post or comment something, an event is broadcasted to all my friends (through inbox or a event driven system) so that my friends can have a way to rebuilt their feed list in a fast and efficient way

Just brainstorming here !!

@JollyOrc
you can check here what I did to model and generate a mini social network on Solid using Low code technology : Demonstration of creating a full SOLID application using low-code technology

Tell me if you can relate to this, if you are interested to join efforts to create a new social network this way !

1 Like

Does not look boring, I’ll have a look and get back to you!