[whatwg] Workers feedback

On Fri, 14 Nov 2008, Shannon wrote:
>
> I don't see any value in the "user-agent specified amount of time" delay 
> in stopping scripts. How can you write cleanup code when you have no 
> consistency in how long it gets to run (or if it runs at all)?

The "user-agent specified amount of time" delay is implemented by every 
major browser for every script they run today.

How can people write clean code when they have no consistency in how long 
their scripts will run (or if they will run at all)?

Why is this any different?


> If you can't rely on a cleanup then it becomes necessary to have some 
> kind of repair/validation sequence run on the data next time it is 
> accessed to check if it's valid.

You need to do that anyway to handle powerouts and crashes.


> The spec really needs to make a decision here. Either consistently 
> provide no cleanup window or make it a requirement to provide a fixed 
> number of seconds, which is still unreliable but at least within a 
> smaller margin. Failure to do so will impact heavily on users of less 
> popular browsers.

I don't see how this is any different than the current script abort 
timeout feature in browsers.


> The specification for message ports is still limited to strings. If no 
> effort is going to be made to allow numbers, arrays, structs and binary 
> data then I'd suggest Workers be given functions to 
> serialise/deserialise these objects.

We're going to add "JSON-serialisable data" support in due course. I'd 
rather get the rest of the API nailed down first though.


> WorkerUtils does not implement document.cookie. I imagine this would be 
> very useful in conjunction with cleanup code to flag if a cleanup 
> operation failed to complete. Storage and Database interfaces are too 
> heavy for the purpose of simple data like this.

It's not clear which document the cookie would be for. localStorage is 
as light-weight than cookies (lighter-weight, arguably), though, so that 
should be enough, no?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 13 November 2008 17:42:09 UTC