#An Object Sync Engine for Local-first Apps

25 messages · Page 1 of 1 (latest)

jolly kayak
scarlet heart
#

OMG. Great to see this coming to Convex! 🔥🔥🔥 One question: Will this engine also support syncing of images or only database objects?

jolly kayak
#

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.

scarlet heart
#

Wouldn't make sense to store the image in the DB object if the DB is limited to 100mb right?

meager herald
# scarlet heart Wouldn't make sense to store the image in the DB object if the DB is limited to ...

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.
🤯

MDN Web Docs

The File System API — with extensions provided via the File System Access API to access files on the device file system — allows read, write and file management capabilities.

jolly kayak
#

yeah! the OPFS stuff is really exciting. i think it’s a critical ingredient for making web apps feel more like native apps.

meager elk
#

Has work stopped on this project?

cobalt flume
#

temporarily, yes. all hands have been on deck for chef

jaunty osprey
#

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.

meager elk
# jaunty osprey what is the timeline for this feature? I currently plan a bigger bussiness web/m...

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.

cobalt flume
#

nope, that's exactly the design we want

#

we just needed to prioritize features for AI codegen first

#

no direction change

meager elk
cobalt flume
#

there isn't yet--we will definitely update everyone when we schedule this work again

vernal token
#

Aura

rocky linden
upper bramble
#

maybe hooking up with tanstack db would be a simpler approach? what do you think?
https://tanstack.com/db/latest

TanStack DB extends TanStack Query with collections, live queries and optimistic mutations that keep your UI reactive, consistent and blazing fast 🔥

hasty stag
#

I am very interested in this

autumn dune
#

I am also really interested in using this promising Sync Engine feature. @cobalt flume Do you have any news about this feature please?

stoic olive
hard quartz
#

@jolly kayak in the blog post you said we can ask for early access, so can we get it here please?

weak charm
#

I am senior agent from a company that offers great facilities for their client to solve their required problems. (like website desingning/editing/posting)