Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder why multitab isnt supported on watermelon, crosstab updates thru localstorage api works great


You can use multiple tabs but to have more than one write to the DB and not be overwritten relies on (online) sync.

The problem is that Watermelon assumes a consistent view of the entire database, so you can't have multiple writers - at least not without synchronous notifications from IndexedDB (not a thing), leader election (cannot be made reliable), or some design sacrifices. To be reconsidered in the future...


> WatermelonDB uses the LokiJS adapter which is an in memory database that regularly persists the data to IndexedDB either on interval, or when the browser tab is closed




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: