4 ms·
What happens when the user opens two tabs, both of which try to access the same local database?
by amelius 11y ago
What happens when the user opens two tabs, both of which try to access the same local database?
- jackmaney 11y agoI would hope that there are some kind of locking mechanisms in place, at least at the table level, if not the row level.
- marknadal 11y agoDisclosure: I'm the author of a competing JavaScript database (http://gunDB.io/ http://gunDB.io/). Unfortunately concurrency is typically the last thing that people think about. Concurrency is the first thing we deal with in our database, because you are right, without it data gets corrupted.
- amelius 11y agoSo would it be possible to communicate between the two tabs, via the database? In an event-driven way?
- marknadal 11y agoYes, although right now I am doing that with websockets which is silly for local stuff. We are wanting to add WebRTC as well, but we could also add what you are talking about - make an issue for it on the github (although it will probably be low priority)
- lessnonymous 11y agoCheck out intercom on github for inter-tab communication. I use it in we apps for many different things. Including log-back-in. One tab gets a session timeout and tells them all to go black asking for a password. Enter it in one tab and they all unlock. It uses local storage
- streptomycin 11y agohttps://groups.google.com/forum/#!topic/lovefield-users/Xs97HL4tDfk https://groups.google.com/forum/#!topic/lovefield-users/Xs97...