[whatwg] Cross-domain databases; was: "File package protocol and manifest support?"

On Thu, 28 May 2009 23:22:08 +0200, Michael Nordman <michaeln at google.com>  
wrote:
>> Would there be a lot of overhead in just doing this through  
>> XMLHttpRequest,
>> some processing, and the database API?
>
> Good question. I think you're suggesting...
> * statementsToCreateAndPopulateSQLDatabase  = httpGet();
> * foreach(statement in above) { execute(statement); }
> * now you get to run queries of interest

Yeah, or maybe a custom format that you parse in ECMAScript if you want to  
save bandwidth. (And in a Worker, if you don't want to bother the user :-))


> Certainly going to use more client-side CPU than downloading a fully
> formed db file. I think the download size would greater (all of the
> 'INSERT into' text overhead), but thats just a guess. A database
> containing FTS tables would change things a bit too (even less
> client-side cpu, but more download size).

There are certainly drawbacks, but given that we still haven't nailed all  
the details of the database API proposal discussed by the WebApps WG (e.g.  
the SQL syntax) and given that it has not been deployed widely, it seems  
somewhat premature to start introducing convenient APIs around it that  
introduce a significant amount of complexity themselves. Defining the  
rules for parsing and creating a raw database file in a secure way is a  
whole new layer of issues and the gain seems small.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Friday, 29 May 2009 02:39:17 UTC