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: Alex Russell <slightlyoff@google.com>
Date: Thu, 14 Mar 2013 19:41:21 -0700
Message-ID: <CANr5HFUf4OV50A2LY-9KVkYQqGfeorSX4EutwLkOtuY5PrymkQ@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Tobie Langel <tobie@fb.com>, Jarred Nicholls <jarred@webkit.org>, public-webapps WG <public-webapps@w3.org>
On Thursday, March 14, 2013, Glenn Maynard wrote:

> On Thu, Mar 14, 2013 at 8:58 PM, Tab Atkins Jr. <jackalmage@gmail.com<javascript:_e({}, 'cvml', 'jackalmage@gmail.com');>
> > wrote:
>
>> The entire reason for most async (all?) APIs is thus irrelevant in a
>>
> Worker, and it may be a good idea to provide sync versions, or do
>> something else that negates the annoyance of dealing with async code.
>>
>
> I agree, except that async APIs are also useful and relevant in workers.
>  Sometimes you want synchronous code and sometimes you want asynchronous
> code, depending on what you're doing.
>
>
> On Thu, Mar 14, 2013 at 9:19 PM, Alex Russell <slightlyoff@google.com<javascript:_e({}, 'cvml', 'slightlyoff@google.com');>
> > wrote:
>
>> My *first* approach to this annoyance would be to start adding some async
>> primitives to the platform that don't suck so hard; e.g., Futures/Promises.
>> Saying that you should do something does not imply that doubling up on API
>> surface area for a corner-case is the right solution.
>
>
> "Futures" are nothing but a different async API.  They're in no way
> comparable to synchronous code.
>

I didn't imply they were. But addressing the pain point of asynchronous
code that's hard to use doesn't imply that the only answer is a synchronous
version. This is not a particularly hard or subtle point.


> But, as I said, it's true that a second synchronous interface isn't
> necessarily the best solution for complex APIs like IndexedDB.  At least in
> this particular case, if we have a synchronous messaging API I might call
> the synchronous IDB interface unnecessary.
>
> --
> Glenn Maynard
>
>
Received on Friday, 15 March 2013 02:41:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:58 GMT