<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Browser storage: Do we need SQL? Or would a JSON approach be better?</title>
	<atom:link href="http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/feed" rel="self" type="application/rss+xml" />
	<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better</link>
	<description>blogging about life, the universe, and everything tech</description>
	<lastBuildDate>Sat, 08 Sep 2012 07:06:53 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: eckops</title>
		<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/comment-page-1#comment-46563</link>
		<dc:creator>eckops</dc:creator>
		<pubDate>Tue, 04 May 2010 03:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2372#comment-46563</guid>
		<description>What the different MySQL and SQLite?</description>
		<content:encoded><![CDATA[<p>What the different MySQL and SQLite?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hollister</title>
		<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/comment-page-1#comment-46199</link>
		<dc:creator>hollister</dc:creator>
		<pubDate>Wed, 10 Feb 2010 07:33:12 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2372#comment-46199</guid>
		<description>This would be really nice. Combined with the Gears Desktop API, you could open a shortcut to an online word processor with login happening behind the scenes and perceive very little difference with opening a shortcut to a Word document on your desktop....</description>
		<content:encoded><![CDATA[<p>This would be really nice. Combined with the Gears Desktop API, you could open a shortcut to an online word processor with login happening behind the scenes and perceive very little difference with opening a shortcut to a Word document on your desktop&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sharon Yang</title>
		<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/comment-page-1#comment-40895</link>
		<dc:creator>Sharon Yang</dc:creator>
		<pubDate>Tue, 02 Jun 2009 17:40:32 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2372#comment-40895</guid>
		<description>Hi, Dion,
Would you share this talk infor by Vlad with your folks:
http://silicon-valley.siggraph.org/next.html

&quot;Graphics on the Web: Going Beyond Images and Rectangles&quot;

It&#039;s on June 11(next Thursday) at Apple.

Thanks
-Sharon</description>
		<content:encoded><![CDATA[<p>Hi, Dion,<br />
Would you share this talk infor by Vlad with your folks:<br />
<a href="http://silicon-valley.siggraph.org/next.html" rel="nofollow">http://silicon-valley.siggraph.org/next.html</a></p>
<p>&#8220;Graphics on the Web: Going Beyond Images and Rectangles&#8221;</p>
<p>It&#8217;s on June 11(next Thursday) at Apple.</p>
<p>Thanks<br />
-Sharon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kombai</title>
		<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/comment-page-1#comment-40717</link>
		<dc:creator>kombai</dc:creator>
		<pubDate>Thu, 16 Apr 2009 03:31:42 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2372#comment-40717</guid>
		<description>I used JSON and implement query syntax like SQL:

    create data: http://vnjs.net/?id=1000000069
    insert: http://vnjs.net/?id=1000000077
    update: http://vnjs.net/?id=1000000079
    delete: http://vnjs.net/?id=1000000075
    select: http://vnjs.net/?id=1000000078
    ……
    and select HTML element from DOM:
    http://vnjs.net/?id=1000000082

    end link to download my framework: http://vnjs.net/www/src/kombai.rar</description>
		<content:encoded><![CDATA[<p>I used JSON and implement query syntax like SQL:</p>
<p>    create data: <a href="http://vnjs.net/?id=1000000069" rel="nofollow">http://vnjs.net/?id=1000000069</a><br />
    insert: <a href="http://vnjs.net/?id=1000000077" rel="nofollow">http://vnjs.net/?id=1000000077</a><br />
    update: <a href="http://vnjs.net/?id=1000000079" rel="nofollow">http://vnjs.net/?id=1000000079</a><br />
    delete: <a href="http://vnjs.net/?id=1000000075" rel="nofollow">http://vnjs.net/?id=1000000075</a><br />
    select: <a href="http://vnjs.net/?id=1000000078" rel="nofollow">http://vnjs.net/?id=1000000078</a><br />
    ……<br />
    and select HTML element from DOM:<br />
    <a href="http://vnjs.net/?id=1000000082" rel="nofollow">http://vnjs.net/?id=1000000082</a></p>
<p>    end link to download my framework: <a href="http://vnjs.net/www/src/kombai.rar" rel="nofollow">http://vnjs.net/www/src/kombai.rar</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terry Blater</title>
		<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/comment-page-1#comment-40706</link>
		<dc:creator>Terry Blater</dc:creator>
		<pubDate>Tue, 14 Apr 2009 17:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2372#comment-40706</guid>
		<description>You can write a good generic JSON/XML ORM layer on top of SQL. I&#039;ve helped develop quite a nice one and there are a hundred good reasons to do this in preference to using a heirachical db on the server side.

...but can someone tell me why you wouldn&#039;t use strictly hierachical storage on a *client side* database?  After all the client is going to be dealing with the data purely in terms of its own object hierachies. There aren&#039;t going to be any of the sort of curve balls thrown at it that you get in a &quot;bigger&quot; SOA type environment.</description>
		<content:encoded><![CDATA[<p>You can write a good generic JSON/XML ORM layer on top of SQL. I&#8217;ve helped develop quite a nice one and there are a hundred good reasons to do this in preference to using a heirachical db on the server side.</p>
<p>&#8230;but can someone tell me why you wouldn&#8217;t use strictly hierachical storage on a *client side* database?  After all the client is going to be dealing with the data purely in terms of its own object hierachies. There aren&#8217;t going to be any of the sort of curve balls thrown at it that you get in a &#8220;bigger&#8221; SOA type environment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay Godse</title>
		<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/comment-page-1#comment-40699</link>
		<dc:creator>Jay Godse</dc:creator>
		<pubDate>Tue, 14 Apr 2009 14:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2372#comment-40699</guid>
		<description>I think that SQLite is the way to go. 

SQLite has a rock-solid storage engine under the covers. They have integrity checks and rollback journals. It is very hard to corrupt the SQLite data file. Any other solution would have to do a lot of work to get the same ACID characteristics that SQLite has. 

Back in the dark ages before the internet, but after flushing toilets, simple databases with the same philosophy as CouchDB, SimpleDB, BigTable, Berkeley etc.were the norm. Over time, people discovered that they were writing reams of code because  the databases did not have the building blocks to avoid various kinds of data duplication, and the duplicated data had to be kept in sync, and kept searchable. Eventually people like Codd and Chen characterized the styles of data duplication and figured out how to avoid it through the various normal forms for program data. They also developed SQL as the building blocks for describing and manipulating that data. SQL allowed applications to become much more powerful and feature-rich without having to write proportionally more code. I have seen various data query languages come and go. Most came to reduce the &quot;impedance mismatch&quot; between the object world and the relational world. They go because eventually the owners realize that it would be too much work to give the customers the SQL that they really want. 

As a side note on query languages, I have been watching the Ruby On Rails/ActiveRecord language. ActiveRecord was originally designed as a object-relational-mapper so that the designer could avoid the complexity of SQL. However, with each subsequent release of Rails, they have put in more and more features into the ActiveRecord query language that are rip-offs from SQL. I can&#039;t wait until Rails 6 when they admit reality and support inline SQL.  :) I have to give them credit though; they do provide an escape hatch to SQL if their query language is not powerful enough. 

On performance, most PCs have enough horse-power to cough up a few cycles to the SQLite VM. I know that when our old company (Adscape Media) built the in-game advertising engine we put SQLite into the client-side code (linked into the game software), and there were no performance issues that caused our acquirer (Google) to yank SQLite in favour of JSON, XML, or whatever. If SQLite can be the client-side backing store for a video game, I would say it is fine for a &quot;thick&quot; web app. 

On the &quot;public domain&quot; issue, if you want a license for SQLite, Hwaci software (co-owned by Dr Hipp) will be happy to provide you a license for a small fee.</description>
		<content:encoded><![CDATA[<p>I think that SQLite is the way to go. </p>
<p>SQLite has a rock-solid storage engine under the covers. They have integrity checks and rollback journals. It is very hard to corrupt the SQLite data file. Any other solution would have to do a lot of work to get the same ACID characteristics that SQLite has. </p>
<p>Back in the dark ages before the internet, but after flushing toilets, simple databases with the same philosophy as CouchDB, SimpleDB, BigTable, Berkeley etc.were the norm. Over time, people discovered that they were writing reams of code because  the databases did not have the building blocks to avoid various kinds of data duplication, and the duplicated data had to be kept in sync, and kept searchable. Eventually people like Codd and Chen characterized the styles of data duplication and figured out how to avoid it through the various normal forms for program data. They also developed SQL as the building blocks for describing and manipulating that data. SQL allowed applications to become much more powerful and feature-rich without having to write proportionally more code. I have seen various data query languages come and go. Most came to reduce the &#8220;impedance mismatch&#8221; between the object world and the relational world. They go because eventually the owners realize that it would be too much work to give the customers the SQL that they really want. </p>
<p>As a side note on query languages, I have been watching the Ruby On Rails/ActiveRecord language. ActiveRecord was originally designed as a object-relational-mapper so that the designer could avoid the complexity of SQL. However, with each subsequent release of Rails, they have put in more and more features into the ActiveRecord query language that are rip-offs from SQL. I can&#8217;t wait until Rails 6 when they admit reality and support inline SQL.  :) I have to give them credit though; they do provide an escape hatch to SQL if their query language is not powerful enough. </p>
<p>On performance, most PCs have enough horse-power to cough up a few cycles to the SQLite VM. I know that when our old company (Adscape Media) built the in-game advertising engine we put SQLite into the client-side code (linked into the game software), and there were no performance issues that caused our acquirer (Google) to yank SQLite in favour of JSON, XML, or whatever. If SQLite can be the client-side backing store for a video game, I would say it is fine for a &#8220;thick&#8221; web app. </p>
<p>On the &#8220;public domain&#8221; issue, if you want a license for SQLite, Hwaci software (co-owned by Dr Hipp) will be happy to provide you a license for a small fee.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dom Derrien</title>
		<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/comment-page-1#comment-40698</link>
		<dc:creator>Dom Derrien</dc:creator>
		<pubDate>Tue, 14 Apr 2009 13:59:27 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2372#comment-40698</guid>
		<description>With JSON in the browser and JSON on the wire, JSON in the database is an obvious requirement! Up to now, my REST APIs mostly converting DTOs from Java/Python/etc. to JSON and vice-versa, after the translation between SQL/GQL/etc. and programming languages. So much time and CPU wasted :(

Will JSON be the final format? I hope not because I would like to start carrying enhanced messages, &lt;i&gt;a-la&lt;/i&gt; RDF (http://en.wikipedia.org/wiki/Resource_Description_Framework) with &lt;i&gt;triples&lt;/i&gt; for example...</description>
		<content:encoded><![CDATA[<p>With JSON in the browser and JSON on the wire, JSON in the database is an obvious requirement! Up to now, my REST APIs mostly converting DTOs from Java/Python/etc. to JSON and vice-versa, after the translation between SQL/GQL/etc. and programming languages. So much time and CPU wasted :(</p>
<p>Will JSON be the final format? I hope not because I would like to start carrying enhanced messages, <i>a-la</i> RDF (<a href="http://en.wikipedia.org/wiki/Resource_Description_Framework" rel="nofollow">http://en.wikipedia.org/wiki/Resource_Description_Framework</a>) with <i>triples</i> for example&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikunj Mehta</title>
		<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/comment-page-1#comment-40696</link>
		<dc:creator>Nikunj Mehta</dc:creator>
		<pubDate>Mon, 13 Apr 2009 23:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2372#comment-40696</guid>
		<description>SQL has done nothing to make it easier to sync unless you are willing to pay $$ to license complex sync software. Why can&#039;t we make simpler sync software for Web? Well the answer to that question lies in our ability to simplify data access abstractions in Web applications. Sync/offline can be made easy, cheap, and automatic if the following are acceptable:

   1. Identify data through URL
   2. Operate on data with HTTP methods
   3. Provide JavaScript interception on XHR (just like Apple provides Objective-C interception on NSURLRequest and URLMON provides Asynchronous Pluggable Protocol).

Read more about this and related work at Oracle on my Web site http://o-micron.blogspot.com</description>
		<content:encoded><![CDATA[<p>SQL has done nothing to make it easier to sync unless you are willing to pay $$ to license complex sync software. Why can&#8217;t we make simpler sync software for Web? Well the answer to that question lies in our ability to simplify data access abstractions in Web applications. Sync/offline can be made easy, cheap, and automatic if the following are acceptable:</p>
<p>   1. Identify data through URL<br />
   2. Operate on data with HTTP methods<br />
   3. Provide JavaScript interception on XHR (just like Apple provides Objective-C interception on NSURLRequest and URLMON provides Asynchronous Pluggable Protocol).</p>
<p>Read more about this and related work at Oracle on my Web site <a href="http://o-micron.blogspot.com" rel="nofollow">http://o-micron.blogspot.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J Chris A</title>
		<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/comment-page-1#comment-40690</link>
		<dc:creator>J Chris A</dc:creator>
		<pubDate>Sun, 12 Apr 2009 23:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2372#comment-40690</guid>
		<description>The thing that matters about CouchDB in this deployment is the offline replication. With Sql tools you have to manage sync in your application, with CouchDB you get it for free.</description>
		<content:encoded><![CDATA[<p>The thing that matters about CouchDB in this deployment is the offline replication. With Sql tools you have to manage sync in your application, with CouchDB you get it for free.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Malte</title>
		<link>http://almaer.com/blog/browser-storage-do-we-need-sql-or-would-a-json-approach-be-better/comment-page-1#comment-40685</link>
		<dc:creator>Malte</dc:creator>
		<pubDate>Sun, 12 Apr 2009 09:16:45 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2372#comment-40685</guid>
		<description>I would really like to have js-only (as in http-only) cookies with well defined storage availabilities and a sane not-O(n) getter/settter-API.

I don&#039;t think that the argument holds that RDBMs are good because people already know how to work with them. The HTML5 database API really is a new programming paradigm for many programmers because all operations are fully asyncronous. This makes buildings things like ORMs even harder because now you also have a method call impedance mismatch.

What has worked really well for me too within the Joose world was to simply serialize objects to JSON and and simply deserialize them to JS objects on the next page view (with a jsonpickle-like protocol)
http://joose-js.blogspot.com/2008/08/automatic-serialization-and.html
This works quite well for non-so-large datasets that do not need concurrent access from different browser windows (OK, thats a small subset of applications)

With respect to bespin: I have a near 100% compatible HTML5 on Gears API ready. If we need it we could finally add a Joose dependency to bespin and use it or I could spend the 5 minutes on porting it to native JS :) Together with our WorkerFacade it would probably really easy to make this actually async under Gears. This would enable us to do DB operations on the main page without having to worry about UI block under Gears.</description>
		<content:encoded><![CDATA[<p>I would really like to have js-only (as in http-only) cookies with well defined storage availabilities and a sane not-O(n) getter/settter-API.</p>
<p>I don&#8217;t think that the argument holds that RDBMs are good because people already know how to work with them. The HTML5 database API really is a new programming paradigm for many programmers because all operations are fully asyncronous. This makes buildings things like ORMs even harder because now you also have a method call impedance mismatch.</p>
<p>What has worked really well for me too within the Joose world was to simply serialize objects to JSON and and simply deserialize them to JS objects on the next page view (with a jsonpickle-like protocol)<br />
<a href="http://joose-js.blogspot.com/2008/08/automatic-serialization-and.html" rel="nofollow">http://joose-js.blogspot.com/2008/08/automatic-serialization-and.html</a><br />
This works quite well for non-so-large datasets that do not need concurrent access from different browser windows (OK, thats a small subset of applications)</p>
<p>With respect to bespin: I have a near 100% compatible HTML5 on Gears API ready. If we need it we could finally add a Joose dependency to bespin and use it or I could spend the 5 minutes on porting it to native JS :) Together with our WorkerFacade it would probably really easy to make this actually async under Gears. This would enable us to do DB operations on the main page without having to worry about UI block under Gears.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
