electric-sql / electric

Sync little subsets of your Postgres data into local apps and services.
https://electric-sql.com
Apache License 2.0
6.48k stars 156 forks source link

How would electric handle cases with large amounts of data and lazy loading? #1993

Open nodkrot opened 6 days ago

nodkrot commented 6 days ago

For example if im building a large kanban board? At which point will client suffer? What strategies are there for these scenarios?

thruflo commented 6 days ago

See https://github.com/electric-sql/pglite/pull/393 for an example of a project management app with a lot of data. Electric will handle syncing GBs of data no problem. You need to look at what you sync into and then there are a lot of different optimisation techniques in the client, depending on how you need to query the data. The example I link to uses a windowed query optimisation to make the reactivity fast.

nodkrot commented 4 days ago

Thank you for getting back, will check it out. Simple question I have is how can electric sync engine store gigabytes of data on the client to keep things in sync (I would imagine browsers have limits)? If you can point me to resources that explain this I would greatly appreciate it!