Re: [w3c/IndexedDB] Allow more explicit control over transaction lifetimes (#34)

TPAC 2019 Web Apps breakout:

Looked at two proposals:

* On `IDBTransaction` add `waitUntil(promise)`. Can be called multiple times. Try redefine autocommit behavior in terms of these promises resolving (i.e. unify requests and promises). 
* On `IDBDatabase.transaction()` add an option `manualCommit: true`; `commit()` must be called explicitly. 

Notes:

* Expect most usage to be by wrappers/libraries.
* Attendees were pretty split - explicit commit is more like traditional database APIs, promises build on SW/WebLocks patterns and reduce risk of coding deadlocks 
* Using either option puts the transaction into a new mode where new requests can be made at any time.
* At first glance, seems like either option can be polyfilled on the other

Next steps: make concrete proposals; reach out to library authors to get feedback on preferences


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/34#issuecomment-533354259

Received on Friday, 20 September 2019 00:14:18 UTC