Comments on Sept Meeting Notes
bruant.d at gmail.com
Fri Sep 27 09:07:41 PDT 2013
Le 27/09/2013 17:57, Anne van Kesteren a écrit :
> On Fri, Sep 27, 2013 at 11:53 AM, Mark S. Miller <erights at google.com> wrote:
>> The structured cloning algorithm is the last thing I want to use to
>> communicate between workers. I advise avoiding it like the plague, instead
>> serializing to JSON, sending the string, and unserializing on the other
>> side. This also keeps the semantics of inter-worker communication aligned
>> with the semantics of distributed inter-machine messaging.
> "Just use JSON" doesn't work for a large number of use cases — e.g.
> when dealing with ArrayBuffer, File objects, or rendering contexts —
> structured cloning does.
I can't speak for Mark, but I feel his advice is missing details. For
instance, transferables are missing (covers ArrayBuffer and rendering
contexts, though, I'd prefer parallel iframes to passing rendering
Not sure about File objects. Wouldn't they be better as transferables?
I agree with the intent of keeping semantics of inter-worker and
inter-machine very close, but the difference in terms makes very clear
that not being able to differenciate the 2 cases incurs an information
loss that can be detrimental to some use cases, especially
Do transferables make sense in an inter-machine context?
More information about the es-discuss