Warning: clicking "execute" on the demo page made my machine unresponsive and caused the hard drive to thrash for about five minutes before I could finally kill chrome.exe (I'm running a recent version on the Chrome beta channel).
It does open up some really interesting scenarios, though. For instance, I know a company that displays a large amount of data to it's users, so sticking that in WebSQL is useful to them as it makes that data easily queryable. However, since data is their thing they don't want it to persist!
I understand when this is done in a server, where you have control of how big your instance can be, but wouldn't that put too much memory pressure on the browser? What if the browser client is 32-bit? Even in Chrome where each page has a separate process one can make it go out of memory.
I think he was referring to the data manipulation capabilities of SQL, things like GROUP BY and WHERE and ORDER BY that can be offloaded to the client, not as a data caching benefit.
I doubt the V8 Engine could be easily done so, you'd have to remove the JIT and all of that in order to do so otherwise it will be dependent on having some kind of emulated processor to do it. Though such a thing does exist...
Well for one, this SQLite.js is completely useless without persistence. All you need is some way to get the contents of the database and save it to a file.
That way if you have some new type of architecture that's not supported by SQLite, but you do have a JavaScript VM available you could really easily whip up an SQLite based app without going to the trouble of porting SQLite itself.
not sure how useful this is, is the database stored in memory? how is it persistent?
also non-blocking access is key otherwise you can easily freeze the UI.
in memory data bases can be very useful! they allow you to slice and dice and aggregate data without you having to write the logic to do that yourself.
I'm guessing this is in memory, the main purpose would be for you to use sqlite in the browser since node already has a sqlite driver, as such, IO blocking is not an issue because there is no IO, it can block the same way that cpu intensive code can block however
I think it's memory for now, but I'm hoping for an IndexedDB backend as a polyfill for WebSQL. As for non-blocking... that's what Web Workers are for :)
Actually, I'd love to be able to write SELECT queries in Javascript that were identical to the queries that I write on the server. Yeah, the data comes from an AJAX-JSON call, but then I deal with it exactly the same. I'd love that.