Kinto / kinto.js

An Offline-First JavaScript Client for Kinto.
http://kintojs.readthedocs.io/
Other
318 stars 72 forks source link

Perform the whole sync (pull + push) within a single transaction #16

Open n1k0 opened 9 years ago

n1k0 commented 9 years ago

So we can abort the whole import process on error, avoiding leaving the db in an inconsistent state.

michielbdejong commented 9 years ago

Not sure if this is relevant here, but just wanted to mention how important batching together writes to IndexedDB is, for performance. This is also a topic in localForage, we are trying to do automatic batching of writes there. The basic principle of that is:

n1k0 commented 9 years ago

After a quick discussion with @ametaireau, here's the current state of our thinking on this:

Thoughts?

n1k0 commented 8 years ago

303 has now landed and is a huge step towards this goal.

leplatrem commented 7 years ago

When https://bugzilla.mozilla.org/show_bug.cgi?id=1193394 will land in Firefox, it will be possible to have IndexedDB transactions across promises in Chrome+Firefox.

leplatrem commented 6 years ago

That's it! It landed!

Firefox 60 supports promises within IndexedDB transactions \o/

There is a lot of things that could be simplified, quite a huge amount of work.

michielbdejong commented 6 years ago

Wow! :)