On Thu, Apr 9, 2009 at 3:02 PM, Jordan Zimmerman <[email protected]> wrote:
> Is there documentation on the different RPC relay methods used in
> rpc.js? I'm using the default method ("wpm") and it works 75% of the
> time. I've read here that 'ifpc' is deprecated so I'd like to understand
> the other methods: "dpm" and "nix". Questions:
There's also "fe".
>
>
> * Why is ifpc deprecated?
It's not deprecated quite yet, but we'd like to move that way. There are two
reasons:
1. It's slow.
2. It's painful for containers to support, since it involves active hosting
of a particular relay file, and delicate wiring to get both container and
gadget to point to it properly.
It's still used because Safari < 4 and Chrome < 2 don't support any of the
methods implemented yet. I'm working on a final method that obviates the
need for IFPC on these browsers while enabling much faster cross-frame
communication, and without a relay. If successful (working out the kinks),
this provides a rationale for removing IFPC, improving performance and
making containers' lives easier.
>
> * What's the difference between dpm and wpm? Why would I use one over
> the other?
Well technically, you never choose the communication channel. The library
does this for you.
That said, 'dpm' is document.postMessage. It was implemented by Opera 8, I
believe, before window.postMessage was standardized in HTML5.
window.postMessage is preferred over it. @see rpc.js source for details.
>
> * What is nix and how I do I use it?
You render a gadget using IE < 8. rpc.js uses the existence of ActiveXObject
as a proxy for determining whether the browser is IE. 'wpm' is preferred
over this, so IE8 gets that method.
Fairly extensive documentation on all this is available in the comments of
rpc.js itself:
http://svn.apache.org/repos/asf/incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
See especially the JsDoc for function getRelayChannel().
>
>
> Jordan Zimmerman
> Principal Software Architect
> 831.647.4712
> 831.214.2990 (cell)
> [email protected]
>
> SHOP*COMTM
> Shop Smart, Save Big(tm)
> www.shop.com
>
> This message (including any attachments) is intended only for
> the use of the individual or entity to which it is addressed and
> may contain information that is non-public, proprietary,
> privileged, confidential, and exempt from disclosure under
> applicable law or may constitute as attorney work product.
> If you are not the intended recipient, you are hereby notified
> that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, notify us immediately by telephone and
> (i) destroy this message if a facsimile or (ii) delete this
> message
> immediately if this is an electronic communication.
>
> Thank you.
>