3 ms·
This seems very interesting, powerful and yet simple, congratulations! I've noticed in one of the samples how the data is stored in a single json file on the se
by felipeccastro 10y ago
This seems very interesting, powerful and yet simple, congratulations!
I've noticed in one of the samples how the data is stored in a single json file on the server, so I'm curious about how would this scale for very large databases: if I don't want to send the entire dataset to all clients, and send just parts of it for each user, while keeping everything else stored in a traditional SQL db, would that be possible? A real world application of this would be something like Trello, for example.
- marknadal 10y agoThanks for the compliments, that is very encouraging! And for the constructive questions. You point out something very important - the json dump definitely is not scalable! That is why we warn people it should only be used for local development and testing, and never to run it in production (these warnings are littered through out the documentation). Your instinct is correct! By default only a subset of the data is sent to clients - specifically, only the pieces of data that they are subscribed to. This is already built in so you don't have to worry about managing it yourself. Using the Level storage adapter, you could plug into a SQL database. I don't recommend doing this (because you'll get consistency issues if you query SQL separately from gun) but it is possible - the one exception is using SQLite as a storage layer. There is actually somebody building a P2P Trello app, I referenced his security/authorization gun framework in one of the other comments, if you are interested. Hit me up with anything whenever. Thanks for being so constructive!