W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: IndexedDB, what were the issues? How do we stop it from happening again?

From: Glenn Maynard <glenn@zewt.org>
Date: Thu, 14 Mar 2013 20:36:31 -0500
Message-ID: <CABirCh-y2EC=dRzwy_3Kb6ZZ==8YxjHWqPCRncS7dFCyYDOAYA@mail.gmail.com>
To: Alex Russell <slightlyoff@google.com>
Cc: Tobie Langel <tobie@fb.com>, Jarred Nicholls <jarred@webkit.org>, public-webapps WG <public-webapps@w3.org>
On Thu, Mar 14, 2013 at 1:54 PM, Alex Russell <slightlyoff@google.com>wrote:

> On Wednesday, March 6, 2013, Tobie Langel wrote:
>> On Wednesday, March 6, 2013 at 5:51 PM, Jarred Nicholls wrote:
>> > This is an entirely different conversation though. I don't know the
>> answer to why sync interfaces are there and expected, except that some
>> would argue that it makes the code easier to read/write for some devs.
>> Since this is mirrored throughout other platform APIs, I wouldn't count
>> this as a fault in IDB specifically.
>> Sync APIs are useful to do I/O inside of a Worker.
> I don't understand why that's true. Workers have a message-oriented API
> that's inherently async. They can get back to their caller "whenevs".
> What's the motivator for needing this?

Being able to write synchronous code is one of the basic uses for Workers
in the first place.  Synchronously creating streams is useful in the same
way that other synchronous APIs are useful, such as FileReaderSync.

That doesn't necessarily mean having a synchronous API for a complex
interface like this is the ideal approach (there are other ways to do it),
but that's the end goal.

(FYI, the messaging in Workers isn't inherently async; it just happens to
only have an async interface.  There's been discussion about adding a
synchronous interface to messaging.)

Glenn Maynard
Received on Friday, 15 March 2013 01:36:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:59 UTC