On 31 Aug 2012, at 09:04, Christian Fischer wrote:
Am 31.08.2012 09:08, schrieb Scott Wilson:
On 31 Aug 2012, at 06:59, Christian Fischer wrote:
Hi,
for me it doesn't work:
For Wookie Widgets i use the feature
<feature name="http://www.openajax.org/hub" required="true"/>
thereby i can use hub.subscribe and hub.publish -- all fine for communication
between wookie widgets. For Opensocial i use the feature
<Require feature="pubsub-2">
thereby i can access the hub by gadgets.Hub.subscribe and gadgets.Hub.publish
-- all fine for communication between Opensocial Widgets.
There are 2 instances of the OpenAjax hub (window.hub and window.gadgets.Hub) -
that should be the reason why communication between OpenSocial and Wookie
Widgets doesn't work at the moment. I'm wrong?
I think it should be possible to communicate between W3C and OpenSocial Widgets - this
would simplyfy some things and would RAVE more "attractive" for some people.
Hi Christian,
I tested it using the demo OpenAjax gadgets, and a W3C widget including the
following HTML:
<button
onclick="hub.publish('org.apache.shindig.random-number','42');">Publish!</button>
Clicking the publish button in the W3C Widget results in a message displaying
in the OpenAjax Hub Subscriber gadget, e.g.:
message : 42
received at: Fri Aug 31 2012 07:54:04 GMT+0100 (BST)
So it seems to work OK for me.
Thanks, i tryed a few configurations - now it seems to work.
however, if i'm subscribing to the channel '*' (all channels) it doesn't work.
Are there any security restictions? For my use case, i need a widget that
listens to ALL Messages which should work by subscribe to the channel '*'.
Some testings:
Shindig <-> Wookie
publish random number -> subcribe to 'org.apache.shindig.random-number': OK
subcribe to 'org.apache.shindig.random-number' <- publish random number: OK
publish random number -> subscribe to '*' : not OK
only wookie:
publish random number at 'org.apache.shindig.random-number' & subscribe to '*'
: not OK
publish 'any_message' at 'any channel" & subscribe to '*' : OK
I don't really know enough about how OpenAjax Hub is set up to answer that one
- as far as I'm aware Wookie and Shindig use the same version of the OpenAjax
JS library, and set up OOA iframes in the same manner.
Ok, i found the fault: the wildcard '*' only takes care of one token:
|for example the topic name org.openajax.example.token.one has 5 tokens|.
So i must subscribe to the channel "*.*.*.*.*" for receiving all
messages at channels with 5 tokens.
Thanks.
Christian
On 30 Aug 2012, at 16:50, Christian Fischer wrote:
Hi all,
i try a bit with the OpenAjax pubsub Feature. For my Testsystem it is not
possible to publish soemthing from a wookie-widget to a shindig-widget or vice
versa.
I think for a portal like the Rave portal it should be possible to receive
messages from other widgets too.
How can I easily get a communcation between shindig and wookie via pubsub?
It should work already; however widgets need to declare the openajax feature as
required. E.g. in the W3C widgets' config.xml it needs to have:
<feature name="http://www.openajax.org/hub" required="true"/>
It should then be capable of pubsub when deployed in Rave.
Greets & thanks,
Christian