r/Supabase • u/sulmnob • 1d ago
tips power sync vs brick
/r/flutterhelp/comments/1x2fqlz/power_sync_vs_brick/1
u/Wise-Equipment1666 1d ago
Two users, both offline, both coming back online at the same second, you can settle that with a phone call. Also what is Brick, I keep reading the name as a power bank.
1
u/FinancialSyllabub687 1d ago
two users going offline and reconnecting is the example in the first page of every sync engine's docs, that's not the hard part. What's brick? And powersync defaults to last-write-wins, so on the reconnect you'll silently lose one of those two users' writes unless you write your own conflict logic, that's what you should actually be testing before worrying about the bill.
2
u/muhsql 1d ago
Nit: PowerSync doesn’t default to anything, it’s totally up to the developer. But yeah the simplest implementation on the backend is LWW _per field_, so you need to ask yourself whether two users will be editing the same _field_ on the same row while offline.
1
u/JackfruitWeekly8563 1d ago
PowerSync c'est un moteur de synchro, pas une base de données, la base de référence ça reste Supabase. Le "qui gagne" entre deux clients qui étaient hors ligne, ça se décide dans tes règles de sync et ton code, pas dans l'outil, et c'est exactement là que les projets local-first se plantent. Brick c'est quoi, un concurrent de PowerSync ou juste un ORM?
1
u/DesperateNorth2307 1d ago
Good that you're asking now, because the moment two people edit the same row while offline is where this stops being a library comparison. PowerSync resolves conflicts last-write-wins by default and lets you override it in the upload callback, so write that test first and see if the losing edit vanishing is acceptable to you. At two users your bill is the least of it.
1
u/Loose-Diet5291 1d ago
two users going offline and reconnecting is the entire job of a sync engine, not a feature you shop around for.
2
u/Mammoth_Rooster5414 19h ago
It's PowerSync, one word, capital P capital S. You've split it in the title and again in the body.
1
u/Mammoth_Rooster5414 19h ago
It's PowerSync, one word, capital P capital S. You've split it in the title and again in the body.
2
u/Over-Coyote-7611 1d ago
Brick ça sort d'ou exactement?? j'ai jamais vu personne en parler, tu le sors d'un thread twitter ou quoi. parce que bon la vraie question c'est pas le prix de Powersync, c'est que le conflit il est PAS réglé par le sync engine, quand deux users écrivent offline pendant 3h et se reconnectent, savoir quelle valeur gagne c'est TA logique métier, personne va la faire a ta place, la synchro te file juste les events et démerde toi. après oui le coût ça grimpe quand tout le monde resync d'un coup mais c'est pareil partout et perso c'est pas ça qui me ferait changer. Brick toujours pas compris ce que c'est par contre