# Solid: File server vs database?

**URL:** <https://forum.solidproject.org/t/solid-file-server-vs-database/2390>\
**Category:** General Discussion\
**Created:** [November 14, 2019, 8:08am UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390 "2019-11-14T08:08:09Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![okilele](https://avatars.discourse-cdn.com/v4/letter/o/b38774/32.png) [@okilele](https://forum.solidproject.org/u/okilele)\
**Post date:** [November 14, 2019, 8:08am UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/1 "2019-11-14T08:08:09Z")

</div>

I begin developing applications with Solid, currently working on a fork of the Otto AA Solid File Manager I found in the Solid App Listing.  
Up to what I read Solid aims being a way to build applications that will be competitors of Facebook, Instagram, WhatsApp, TripAdvisor etc… I fully agree with the importance of this goal but I have a technical concern : Data of those applications are managed by databases as Solid is a file server. And so I see Solid more as GoogleDrive or Dropbox competitor than all those social networks.  
Did I miss something?

Edit: This [post](http://forum.solidproject.org/t/re-invent-the-social-eb/2380/5) of @Adventure. Fully agree on what he says (If you can’t beat 'em, join 'em - Queen) but same problem: How could Facebook applications work with a file server?

---

<div class="post-metadata">

**Author:** ![Vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vincent](https://forum.solidproject.org/u/Vincent)\
**Post date:** [November 14, 2019, 9:48am UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/2 "2019-11-14T09:48:50Z")

</div>

Hi @okilele. Solid is not just a file server - although it can function as such, using helpful projects like Solid File Manager. However, it’s explicitly intended to store structured data. You might be interested in the page [Understanding Solid](https://solidproject.org/for-developers/apps/first-app/2-understanding-solid), for more on that.

---

<div class="post-metadata">

**Author:** ![okilele](https://avatars.discourse-cdn.com/v4/letter/o/b38774/32.png) [@okilele](https://forum.solidproject.org/u/okilele)\
**Post date:** [November 14, 2019, 6:18pm UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/3 "2019-11-14T18:18:51Z")

</div>

OK, thanks for your answer.  
But at last information must be stored somewhere. Everything in computing is stored in files. You can access those files using an engine that will manage them, this is called a database or you can access and parse them directly if a specific format is used, XML or JSON for instance.  
The second way, using flat files and parse them, is good for small chunk of information, we all use it in development environments, but is not possible if you have more than, let say, 1000 “record” to store.  
So again, did I mis something?

---

<div class="post-metadata">

**Author:** ![dprat0821](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/dprat0821/32/203_2.png) [@dprat0821](https://forum.solidproject.org/u/dprat0821)\
**Post date:** [November 14, 2019, 7:46pm UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/4 "2019-11-14T19:46:21Z")

</div>

You are totally right.  
In my understanding, the core target of Solid is to setup **personal data store**. When we interacting with such data stores, the most important part is interface (SPARQL/OWLs). For now the effort is focused on file-based, Since the performance is yet the bottleneck, the file-based is good enough for community to start experiment application ideas while fine-tuning standards.  
It’s appreciated if database developers start to work on the DB version for Solid pods. However it wouldn’t be a big deal if not. One day if some app makes a bang, such DB projects will emerge very quickly. If the interface is finalized, migrating to DB would not cause much impact for existing apps.

---

<div class="post-metadata">

**Author:** ![okilele](https://avatars.discourse-cdn.com/v4/letter/o/b38774/32.png) [@okilele](https://forum.solidproject.org/u/okilele)\
**Post date:** [November 15, 2019, 7:27am UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/5 "2019-11-15T07:27:36Z")

</div>

> [@dprat0821](#):
>
> One day if some app makes a bang …,

Yes, one day … But the best way this day happends is being able to use Solid with a database.  
A “join venture” with Neo4J or MongoDB ?

---

<div class="post-metadata">

**Author:** ![Vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vincent](https://forum.solidproject.org/u/Vincent)\
**Post date:** [November 15, 2019, 1:07pm UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/6 "2019-11-15T13:07:52Z")

</div>

There are two things that are relevant there, I think:

1. Node Solid Server currently uses flat files to store data. However, that is not at all mandated by the Solid standards, and it’s very much possible to create a server implementation that is designed to scale to larger data, and uses a database as the back-end.
2. The scalability requirements with Pods are often different from regular websites, in that they commonly store personal data for a single person. Databases that need to scale to tens of thousands of users will needs to store a couple of orders of magnitudes larger amounts of rows, whereas e.g. a Document that stores my personal notes is far smaller. That’s not to say that there aren’t/won’t be challenges, but the bottlenecks might not always be what you’d expect.

---

<div class="post-metadata">

**Author:** ![dprat0821](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/dprat0821/32/203_2.png) [@dprat0821](https://forum.solidproject.org/u/dprat0821)\
**Post date:** [November 15, 2019, 3:44pm UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/7 "2019-11-15T15:44:49Z")

</div>

Neo4j is a good choice. It’s designed to optimize the complex graph-based structures. The mapping to RDF is also intuitive. Once distinct is that Neo4j supports properties for both entities and relations. So assigning the RDF literal values to Neo4j entity properties may enhance query performance.

---

<div class="post-metadata">

**Author:** ![okilele](https://avatars.discourse-cdn.com/v4/letter/o/b38774/32.png) [@okilele](https://forum.solidproject.org/u/okilele)\
**Post date:** [November 15, 2019, 3:56pm UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/8 "2019-11-15T15:56:21Z")

</div>

I was not sure Solid can use a database back-end, I am happy to learn this  
But point 2 of your post needs clarification : You are talking about “a document that stores my personal notes” as I see Solid server as the storage of everything I want to share: Of course my personal notes but also records of my health watch (an example, I should never wear this kind of thing) or my posts on Facebook, TripAdvisor etc…  
Do you agree with this way of Solid utilization ?

---

<div class="post-metadata">

**Author:** ![dprat0821](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/dprat0821/32/203_2.png) [@dprat0821](https://forum.solidproject.org/u/dprat0821)\
**Post date:** [November 15, 2019, 4:05pm UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/9 "2019-11-15T16:05:43Z")

</div>

> [@Vincent](#):
>
> The scalability requirements with Pods are often different from regular websites, in that they commonly store personal data for a single person. Databases that need to scale to tens of thousands of users will needs to store a couple of orders of magnitudes larger amounts of rows, whereas e.g. a Document that stores my personal notes is far smaller.

I still believe the DB would eventually be the solution. If POD is only local, it might not be a big matter. But many (if not majority) people may tend to delegate it to POD provider, which may handle millions. Moreover, the file-based potentially introduce more local heterogeneity and logic collision. Say with authorization, app Facebooklet and Twotter write (Alice, age:owl1, 24), and (Alice, age:owl2, 26) to different path in your POD respectively, it’s not easy to identify or fix. DB with the unique access point can apply guard logic easier.

---

<div class="post-metadata">

**Author:** ![Vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vincent](https://forum.solidproject.org/u/Vincent)\
**Post date:** [November 15, 2019, 4:19pm UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/10 "2019-11-15T16:19:48Z")

</div>

@okilele Absolutely, but that’s still data with different properties than e.g. Facebook’s data.

@dprat0821 I was certainly not trying to imply that a database would never be necessary, just that the challenges are non-traditional and thus might, but might also not, have non-traditional solutions. And certainly, large-scale Pod providers will have their own additional challenges.

---

<div class="post-metadata">

**Author:** ![Frederik](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/frederik/32/2997_2.png) [@Frederik](https://forum.solidproject.org/u/Frederik)\
**Post date:** [December 17, 2021, 9:24pm UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/11 "2021-12-17T21:24:46Z")

</div>

Is there any evolution on injecting anything other then file or memory to store the pod data? I am particularly interested in Neo4j!!  
If not → it’s on my todo list to have a look! However, although everything is build with injection and configurable, it’s not clear to me how and what needs to be implemented to inject other behavior, in this case for storing the pod data. Any documentation on this somewhere? Thanks!

---

<div class="post-metadata">

**Author:** ![josephguillaume](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/josephguillaume/32/1072_2.png) [@josephguillaume](https://forum.solidproject.org/u/josephguillaume)\
**Post date:** [December 17, 2021, 11:18pm UTC](https://forum.solidproject.org/t/solid-file-server-vs-database/2390/12 "2021-12-17T23:18:51Z")

</div>

It looks like community solid server does support a SPARQL endpoint, which seems like it suits your use case

There’s a command line argument:

> **[GitHub - solid/community-server: Community Solid Server: an open and modular...](https://github.com/solid/community-server#%EF%B8%8F-parameters)**
>
> Community Solid Server: an open and modular implementation of the Solid specifications - GitHub - solid/community-server: Community Solid Server: an open and modular implementation of the Solid spe...

And it looks like you’d need to override the default config in the command line arguments too, e.g. with:

> <https://github.com/solid/community-server/blob/main/config/sparql-file-storage.json>

I haven’t tried this, so I’d be keen to hear your experience!
