https://stack.convex.dev/object-sync-engine
we're building a local-first sync engine, and it's finally time to start sharing some details!
25 messages · Page 1 of 1 (latest)
https://stack.convex.dev/object-sync-engine
we're building a local-first sync engine, and it's finally time to start sharing some details!
OMG. Great to see this coming to Convex! 🔥🔥🔥 One question: Will this engine also support syncing of images or only database objects?
we'd recommend just database objects (but you could always stuff the image data in one of the objects as a quick hack to get started). we're assuming that image data is much larger than a database object, so images will slow down sync for the rest of the UI.
instead, we'd recommend storing an image URL in the database object and then use that to fetch the image contents as needed. you could also use the browser's CacheStorage APIs (https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage) to preload the content and save it locally. we'll have an example that shows all of this wired up.
Alright. Yeah. The whole reason why I want to have this feature is for offline support, so I will take a look at the CacheStorage APIs
Wouldn't make sense to store the image in the DB object if the DB is limited to 100mb right?
I only heard about this two weeks ago so I'm not sure what's involved, but look at OPFS: https://developer.mozilla.org/en-US/docs/Web/API/File_System_API#origin_private_file_system
For example, if the device has a 1 TiB hard drive, the browser will allow an origin to use up to 600 GiB.
🤯
yeah! the OPFS stuff is really exciting. i think it’s a critical ingredient for making web apps feel more like native apps.
Has work stopped on this project?
temporarily, yes. all hands have been on deck for chef
what is the timeline for this feature? I currently plan a bigger bussiness web/mobile app for chimney sweepers starting Q3/Q4 which needs offline first support on mobile (ideally with React Native) because it needs to works in rural areas or cellars with bad or no internet connections but also should be realtime when a connection is available.
My current options are supabase with electric sql or convex with some kind of offline layer like automerge, replicache or something else I don´t know about yet - ideally I`d prefer if the offline layer is already built in 😉.
I would love to use convex because the dx seems really nice and I like the "database is code" paradigma. I also need functions to be triggered by database changes and other stuff convex provides out of the box.
Same here; it’s exactly the same key feature in the app we’re about to build. I believe the Convex team saw a rethink of their design was necessary, which explains the long pause. I also want Convex, but I’m also looking at Turso and its public beta of its offline offering. The beta still lacks a conflict resolution feature, but I gather that they’re working on it as the public beta is being done. Hopefully, Convex resumes work on its object sync engine soon enough.
nope, that's exactly the design we want
we just needed to prioritize features for AI codegen first
no direction change
May I ask if there’s now an ETA for object sync?
there isn't yet--we will definitely update everyone when we schedule this work again
That line was cold
Aura
Take a look at powersync if you have not already
maybe hooking up with tanstack db would be a simpler approach? what do you think?
https://tanstack.com/db/latest
I am very interested in this
I am also really interested in using this promising Sync Engine feature. @cobalt flume Do you have any news about this feature please?
@autumn dune thanks for the question. Let's take it to the new channel #local-sync
@jolly kayak in the blog post you said we can ask for early access, so can we get it here please?
I am senior agent from a company that offers great facilities for their client to solve their required problems. (like website desingning/editing/posting)