[ 
https://issues.apache.org/jira/browse/SHINDIG-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Lindner resolved SHINDIG-1249.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1-BETA6

thanks for the patch!


> Allow a container to publish messages to gadgets using pubsub
> -------------------------------------------------------------
>
>                 Key: SHINDIG-1249
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1249
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Javascript 
>    Affects Versions: 1.0
>         Environment: Environment neutral - it's a javascript change to 
> pusub-router.js to expose a publish method
>            Reporter: Tim Thelin
>            Priority: Minor
>             Fix For: 1.1-BETA6
>
>         Attachments: example.patch, pubsub.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> pubsub is a great way to broadcast messages to gadgets, but the current 
> implementation only allows gadgets to publish messages.  The provided patch 
> allows the container to publish messages too (using the same publish 
> signature the gadgets use).  The ability to subscribe and unsubsribe isn't 
> needed because the container can already pass in a callback that is called 
> whenever a message is received, which allows it to listen in on all channels.
> This improvement is useful because it allows a container to have global 
> state, and communicate that global state to any interested gadgets.  The best 
> example is a common date control (in the container), and all gadgets can 
> listen for date changes (through a channel that the container publishes 
> changes to).
> There are two patches.  The first implements the change and is minimal.  The 
> second changes the sample container example to show the change in action.  
> The sample container is modified to add a button that does a container 
> publish, and a new minimal gadget is introduced that responds to the publish. 
>  This second patch isn't intended to be applied to shindig, it''s just meant 
> to provide an example of this improvement to whoever picks up this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to