I’m a backend developer who has spent the past 4 to 5 years developing backend platforms for social apps (the latest being keakr.com) so I believe I’ve gathered quite a lot of experience in building real-world social systems. I’m working on a new project now - yet another social app - and we’re considering to build it on top of Solid. I think I’ve grasped the basic principles of how Solid works, but then I’m having a hard time trying to map them to actual use-cases.
I guess the best way to proceed is to describe some typical user flows and try to figure out how they would be implemented with Solid. Please feel free to comment, invalidate - or even confirm - what I’ll describe below. I’ll highlight open questions with [?]. It may become a long, but hopefully interesting thread that can benefit any developer considering Solid!
This is usually done by creating an account with email/password or using another social platform as identity provider. In the case of Solid:
- we eventually expect a WebID, so either the user already has one and we let her log in, or she creates one on our servers
- the user also needs a POD, so same story: either she gives us access to an existing POD or creates one with us
Standard flow, but instead of storing the posts and its assets in our DB, we store them in the user’s POD.
[?] Should we first create a directory where we would store all the data coming from our app?
That’s where it becomes less obvious to me. If a user wants to list all the posts she has created, we just have to list them from her POD, but in many applications we need to issue complex queries to filter and sort data (we may want to do full-text searches on the posts’ content or sort the posts by a number of different criteria). So [?] how we do achieve that? I understand that we may use SPARQL as a query language, but what if the user’s POD does not support some SPARQL constructs that we need?
In our model, posts are not automatically shared with friends/followers but are explicitly shared by the author with other users. I guess those shares would take the form of triples written in the target PODs and pointing to the content in the author’s POD.
Listing shared posts (or displaying a “feed”)
If we want to display all the posts that have been shared with a particular user, we would start by listing the “share” triples I mentioned just before, but then [?] would we need to peek at all the destination PODs to build the results (with the same considerations about filtering and sorting)?
I can’t see any descent way to make that work, considering how we need to fine-tune our queries and indexes when all the data resides on just one database. If some users’ PODs are down or even slow to respond, it would considerably affect the overall performance of the app.
I’ve got many other questions but I think that my initial assumptions may be totally wrong so let’s just start with that. I thank you all in advance for your answers and look forward to the discussion!