Return-Path: Delivered-To: apmail-incubator-shindig-issues-archive@minotaur.apache.org Received: (qmail 96328 invoked from network); 17 Dec 2009 01:17:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 01:17:41 -0000 Received: (qmail 3770 invoked by uid 500); 17 Dec 2009 01:17:41 -0000 Delivered-To: apmail-incubator-shindig-issues-archive@incubator.apache.org Received: (qmail 3443 invoked by uid 500); 17 Dec 2009 01:17:40 -0000 Mailing-List: contact shindig-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: shindig-dev@incubator.apache.org Delivered-To: mailing list shindig-issues@incubator.apache.org Received: (qmail 3433 invoked by uid 99); 17 Dec 2009 01:17:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 01:17:40 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 01:17:38 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2169F29A001A for ; Wed, 16 Dec 2009 17:17:18 -0800 (PST) Message-ID: <453757210.1261012638135.JavaMail.jira@brutus> Date: Thu, 17 Dec 2009 01:17:18 +0000 (UTC) From: "Tim Thelin (JIRA)" To: shindig-issues@incubator.apache.org Subject: [jira] Created: (SHINDIG-1249) Allow a container to publish messages to gadgets using pubsub MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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 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.