Earlier quoted context omitted.
The situation I’m considering is data that matches the referential integrity and check constraints of the database, but is malicious. For example syncing a “salary update to $1M” for yourself into the source database.
Yup, this is what's addressed by write permissions. You can express who can set salaries and column level rules to validate input values. When it comes to concurrency problems like not spending money twice, the plan is https://electric-sql.com/blog/2022/05/03/introducing-rich-cr...
Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
41–50 of 173 posts
Re: Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
#42Re: Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
#43I want to be able to have a Postgres database as the central source of truth for all data and user accounts, but then have each users private content to be siloed and synced to their own SQLite database which they alone have access to (maybe even they’re have one SQLite file on server and one SQLite file on phone or etc.). Is this possible with electricSQL? I remember looking at it a year ago or so and was excited bu…
Re: Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
#44Re: Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
#45I notice this is still a 0.X version. How comfortable are you with people using this in production? Are there any success stories so far? And if it's not production ready, is there a roadmap I can check out?
The company I work for is in the process of planning a complete rework of our app and right now is the time for us to choose technologies. I so very much want to use this or something like this.
Re: Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
#46Will be keeping an eye on this. Are there plans for Swift/Kotlin clients for native iOS/Android apps?
The team at SkillDevs are maintaining a Daft/Flutter client at https://github.com/SkillDevs/electric_dart
Plus we have a thread to extract the core client-side replication component to Rust to be able to compile for multiple targets.
Re: Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
#47Can you delve a bit deeper into how WASM works? Specifically, how heavy is the WASM module? Also, is there a specific use-case you've seen where this shines particularly brightly?
Hey, I work for Electric. The WASM module is just a standard build of SQLite, about 1.1mb - there are many landing pages 10x that size - and something that we think is easily justifiable for the types of apps that people can build with Electric. In terms of use cases, there are numerous, broad-ranging possibilities - anything from a replacement for GraphQL or a REST API in your existing stack, all the way up to build…
Re: Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
#48Re: Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
#49Wow, this is exactly what I've been searching for! I knew this was possible but am too busy trying to build web apps to spend time learning how to do stuff like this. I notice this is still a 0.X version. How comfortable are you with people using this in production? Are there any success stories so far? And if it's not production ready, is there a roadmap I can check out? The company I work for is in the process of p…
We don't recommend production use right now. There's a roadmap page here https://electric-sql.com/docs/reference/roadmap -- we particularly need to flesh out shapes, permissions and validation.
Happy to chat (e.g. on our Discord) if you'd like a bit more detail / looking at whether Electric could fit into your tech pans.
Re: Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
#50Is there any validation or authorization for changes being merged back into the root database? In a traditional client / server model, the server has an opportunity to validate each request and optionally reject it. The lower level you go with the sync protocol (data changes vs high level requests) the more difficult that becomes. Have you addressed that and, if so, how? What prevents a malicious client from send arb…
The PowerSync client SDK still handles the queueing and retrying of writes so that they can be automatically retried if network connectivity is not available — whenever there is a retry, your callback function is called. (As a result of this approach, your write function should be idempotent; we commend using GUIDs or UUIDs generate client-side for primary keys)
Similar to Electric, PowerSync also uses JWT for auth against your backend.
There are some architecture diagrams explaining this on our docs root here: https://docs.powersync.co/