more generally if you take the network out of the critical path of user interaction (e.g. the sync engine architecture i'm using here, where the network is abstracted away into a separate layer). when you're writing synchronous code i think SPAs are actually pretty straightforward
Posts by Dev Agrawal
context issue aside, the only way to pass async data through context is by keeping it wrapped in a promise?
unless i'm okay with the pending boundary higher up being triggered?
you are `await`ing something that isn't a promise according to typescript, you'd also have to change the context type to this
interface Ctx {
num: Promise<number>;
}
i dont see context being used in this playground, did you put the wrong link
hmm apparently you can't set context after an await?
this must be a bug right? @rich-harris.dev
How does svelte's async work with context?
What happens when a parent component fetches some data and sets it into some context for its child components to render?
Does it trigger the pending boundary above the parent component or the child component?
PowerSync definitely handles local data through a SQLite database, and while it doesn't directly handle the server side, it gives you an `uploadData` function where you can integrate your backend to process mutations, and it's pretty straightforward to implement.
I just realized that you might be somewhat misunderstood about what PowerSync is exactly watching this youtu.be/1uVR5X7HpI8?...
are there other sync engines that don't have as many moving parts?
would love to hear more about what's confusing! Always looking to improve the docs
๐ Big update for @tanstack.com DB users!
powersync-db-collection now supports Query-Driven Sync.
No need to load 50,000 rows into memory when you only need to show 20. On-demand mode compiles your live TanStack DB queries into SQL for efficient data loading.
๐ฆ $500 BONUS PRIZE for the Best Rust SDK Submission in the PowerSync AI Hackathon!
Our pre-alpha Rust SDK is ready for builders who want to push the boundaries of local-first and AI. Build embedded systems, IoT apps, or edge-native agents โ all powered by real-time sync.
Got an idea for the next big AI app?
Participate in the PowerSync AI Hackathon to compete for over $8k in prizes, including bonus prizes from our partners @supabase.com, @mastra, @tanstack.com, @neondatabase, and @cactuscompute.
Submissions end on March 20th!
Full details in reply
Today we launched the beta of Sync Streams, our new partial sync architecture that is the successor to legacy Sync Rules.
Sync Streams is a flexible format that lets you define exactly which data from your backend can sync to each client using simple SQL-like queries.
The PowerSync CLI just went open-source and received an upgrade!
- Support for self-hosted and Docker workflows
- Browser based login flow
- Validate Sync Stream definitions and migrate from Sync Rules
- Plugin system
- ...and much more!
PowerSync now has Agent Skills!
Claude Code can now build real-time and offline-first apps for you.
Give your favorite coding agents the ability to ship instant UX and reliable data sync without learning a new database language!
$ npx skills add powersync-ja/agent-skills
I wrote another blog post!
Apparently building apps that work offline sounds scary to people
Turns out it's not that scary, just a matter of making the right tradeoffs at the right time
Want to make your app work while offline?
Great news! All you need is your existing backend database and @powersync.com
with some @tanstack.com DB for additional seasoning!
๐๐ป๐ป๐ผ๐๐ป๐ฐ๐ถ๐ป๐ด ๐๐ต๐ฒ ๐ฃ๐ผ๐๐ฒ๐ฟ๐ฆ๐๐ป๐ฐ ๐๐ ๐๐ฎ๐ฐ๐ธ๐ฎ๐๐ต๐ผ๐ป ๐ค๐งโ๐ป
We are hosting a virtual hackathon where the challenge is to build innovative AI-powered software using PowerSync as a sync engine.
dm
the focus should still be on the framework user
we just need to recognize that a lot of the framework users are gonna be ai agents
new saas provider - powersync can be self hosted, but yes that is one additional thing to deploy/monitor. fully worth the benefits imo, as it also means you never have to worry about putting a redis cache in front of your database to speed up reads.
defining a schema - powersync makes this one really easy, it can autogenerate the schema for you by looking at the data coming from your backend db
new backend adapter - yes technically it's a "new thing", but in practice you basically move the mutation and auth logic scattered throughout the codebase into a single backend endpoint that handles syncing, so in the process of adding a backend adapter you also remove a lot of the existing logic
wrapping localStorage in a signal only gets you the ability to read data offline, nothing else
and even then if you want to guarantee consistent reads you almost have to rebuild an entire database on top of localstorage, at which point, just use sqlite or tanstack db
> no error handling
that sounds less like "optimistic UX" and more like "terrible UX"
i describe a few in this blog post. real time is only one of the benefits of sync engines. www.powersync.com/blog/unleash...
what's the difference between Optimistic UX and Optimistic UI for you?
I agree that adding so much infra complexity just for optimistic UI is not worth it. you can imagine a much simpler sync engine that doesn't require additional infra and provides you instant local reads and optimistic ui.
i know.
sync engines eliminate the need to manually manage the cache lifecycle. you can cache stuff without a sync engine but only if you own the invalidation logic.