Re:W3C Working Group Just Killed Web SQL Database
by pornel on Friday November 19, 2010 @07:48AM
(#1921264)
Worker<->UI communication is asynchronous, and has additional limitations (only copying, only JSON-able data), so synchronous worker API in many cases would just shift complexity elsewhere.
[ Parent
| on HN ]
Re:W3C Working Group Just Killed Web SQL Database
by Groxx on Friday November 19, 2010 @12:05PM
(#1921916)
In part. It makes conditional, nested queries much simpler, however, when you don't need to nest async callbacks 20 layers deep.
I understand that having a synchronous API would mean more people would use it. But honestly, I see that as their problem. A fair number of queries, such as "select * from your_table where id = ?", are useful to have synchronous as an option, and should perform quickly enough to be invisible. And synchronous can easily be made asynchronous, but the other way around is essentially impossible without any Thread.join.