fwd: New Pepper API for sync JS->NaCl messaging

fyi/fwiw...

Subject: New Pepper API for sync JS->NaCl messaging Re: [chromium-dev] When
  NPAPI is removed, there is no way for a plugin to support HbbTv on Chrome
From: David Michael <dmichael@chromium.org>
Date: Thu, 31 Jul 2014 09:36:42 -0600 (08:36 PDT)
To: adam.sturtridge@oceanbluesoftware.co.uk
Cc: native-client-discuss@googlegroups.com

Hi Adam,
We have an experimental Pepper API that might do the trick for you. It
allows synchronous 1-way calls from JavaScript to NaCl or PNaCl. It has
some important differences over NPAPI:
- Sync calls can only go JS->NaCl
- Parameters are passed by-value (i.e., copied instead of passing
essentially an object ID).
It also does not directly let you expose properties. However, the hope with
this API is that you can make a JavaScript shim for much of what you need
(such as properties), and when you really, really need to block on the
PNaCl or NaCl instance, you can do so.

It eliminates a lot of the problems with NPAPI scripting:
- No re-entrancy.
- No round-trips for getting at object or array elements.
- No complex cross-process reference counting stuff.

Here are docs on the API:
https://developer.chrome.com/native-client/pepper_dev/c/struct_p_p_b___messaging__1__1#a637ed999159f608338cd61c128415508
https://developer.chrome.com/native-client/pepper_dev/c/struct_p_p_p___message_handler__0__1
...note that it's still experimental and only works in Dev channel and
Canary. The C++ wrapper is also not yet available in the NaCl SDK.

Here's the design/proposal doc:
https://docs.google.com/a/chromium.org/document/d/15XR5glTu15Pp7AbB5a8Kvvr0U6ycF3n-CvBkk9zU-t0/edit#heading=h.w8inspeo32bj

If you want to live on the bleeding edge, please give it a shot and let me
know how it works out for you. The primary goal here is to help NPAPI
plugins that provide a synchronous API to have a migration path to NaCl and
PNaCl.

BCC chromium-dev; CC native-client-discuss and change subject (been meaning
to send a little notice there anyway).

Thanks,
Dave




On Thu, Jul 31, 2014 at 8:13 AM, <adam.sturtridge@oceanbluesoftware.co.uk>
wrote:

> The HbbTv specifcation
> <http://www.hbbtv.org/pages/about_hbbtv/specification.php> mandates a set
> of JS classes that have a number of custom properties and methods defined.
> These properties and methods must be accessed synchronously, and interface
> with a DVB <https://www.dvb.org/>stack.
> Obviously, this requirement is not for the desktop, but for browsers
> embedded on a TV.
> The big issue is that it is not possible to change HbbTv web content to
> fit with the asynchronous model!
>
> The HbbTv specifcation also requires that actions be taken when some
> properties (including DOM) are changed.
> As I understand it, with Pepper, a plugin is not notified of changes to
> properties. I suppose that even if it were, that would also be asynchronous.
>
> I am a developer for DTVKit <http://dtvkit.org/>. I am looking at how to
> integrate our HbbTv solution in the post-NPAPI world for Chromium.
> I am new to Chromium development, and would appreciate any advice and help.
>
>
>  --
> --
> Chromium Developers mailing list: chromium-dev@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
>

-- 
-- Chromium Developers mailing list: chromium-dev@chromium.org
View archives, change email options, or unsubscribe:
     http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an 
email to chromium-dev+unsubscribe@chromium.org.

Received on Friday, 1 August 2014 14:29:31 UTC