cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <>
Subject Binary data across exec bridge
Date Tue, 08 Jan 2013 20:52:55 GMT
Background: I've been working on implementing chrome.socket [1] for mobile
chrome apps [2] and porting circ (an irc chrome app) [3].  Teaser video:  (this is
still in its infancy, and I certainly do plan to submit a version of the
socket api that will work in cordova without any mobile chrome app magic).

As part of doing that, I had to implement sending binary data across the
exec bridge (on ios for now), and I think it may be a good idea to just add
that functionality to cordova core.  My current implementation is certainly
not the best, so I will extend the exec bridge echo benchmarks to test
binary transfer speeds and we can improve over time.

My first step would be to implement helpers in js/ios/android which plugin
devs can call manually to serialize/deserialize binary data into/from
whatever magical form is most efficient.

Next, I would try to automate these helpers from within the exec call (e.g.
iterate arguments looking for ArrayBuffer/Blob/etc types before json
serialization).  As part of doing this, I would need to add "hints" about
the underlying argument types/some clever way to encode semantic
information about the arguments list, which we currently do not do.

If anyone has any suggestions or objections please let me know!



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message