-
1. Re: Inter component communication
heiko.braun Aug 4, 2009 3:46 AM (in response to heiko.braun)Mike says:
We had worked out a prototype that uses XML and JSON to communicate with a subscription based messaging model. We were intending on going forward with that in JBoss Workspace. -
2. Re: Inter component communication
heiko.braun Aug 4, 2009 3:50 AM (in response to heiko.braun)Why build something on your own? Tibco pagebus is open source, and has been in production for quiet some time. It get's quiet complex pretty soon. You do not only need a clients side javascript implementation, but also something like DWR on the server side.
-
3. Re: Inter component communication
cbrock Aug 4, 2009 10:34 AM (in response to heiko.braun)I am looking at Tibco Pagebus, and I think this looks like something worth considering actually.
To be honest, I wasn't aware of it until you pointed it out. -
4. Re: Inter component communication
cbrock Aug 4, 2009 1:43 PM (in response to heiko.braun)Heiko,
PageBus works pretty darned good. I implemented some simple wrappers for it, and was able to get it working in a snap:ckage org.jboss.workspace.client.framework; import com.google.gwt.user.client.Element; public class Federation { public native static void subscribe(String subject, Element scope, AcceptsCallback callback, Object subscriberData) /*-{ $wnd.PageBus.subscribe(subject, scope, function(subject, message, subscriberData) { callback.@org.jboss.workspace.client.framework.AcceptsCallback::callback(Ljava/lang/String;)(message) }, null); }-*/; public native static void store(String subject, Object value) /*-{ $wnd.PageBus.store(subject, value); }-*/; }
-
5. Re: Inter component communication
michaelneale Aug 4, 2009 7:52 PM (in response to heiko.braun)The only downside is this is a JS library to depend on - for something as simple as this - would a pure GWT thing be more desirable? (I am sure page bus does much more then we need). But I guess it could be optional anyway...
So in summary page bus is a pub/subscribe type things for "mashup" apps to both communicate to each other. It *looks* like it does the comet style push messaging (which isn't really hard to do anyway) as part of that? -
6. Re: Inter component communication
michaelneale Aug 4, 2009 7:52 PM (in response to heiko.braun)The only downside is this is a JS library to depend on - for something as simple as this - would a pure GWT thing be more desirable? (I am sure page bus does much more then we need). But I guess it could be optional anyway...
So in summary page bus is a pub/subscribe type things for "mashup" apps to both communicate to each other. It *looks* like it does the comet style push messaging (which isn't really hard to do anyway) as part of that? -
7. Re: Inter component communication
michaelneale Aug 4, 2009 9:24 PM (in response to heiko.braun)Spoke to mike - yeah this looks good. Orthogonal to push messaging (hanging GET) but could certainly hook in with it.
Has my vote ! -
8. Re: Inter component communication
heiko.braun Aug 5, 2009 4:33 AM (in response to heiko.braun)
So in summary page bus is a pub/subscribe type things for "mashup" apps to both communicate to each other. It *looks* like it does the comet style push messaging (which isn't really hard to do anyway) as part of that?
yes, it even does iframe pub/sub across domains i think. the server side is not part of it, although DWR is known to be working with it well. If you chose something like DWR for the server side, you can go for comet, piggyback and pull models. -
9. Re: Inter component communication
heiko.braun Aug 5, 2009 4:38 AM (in response to heiko.braun)@Mike
It's already part of mosaic:
http://code.google.com/p/gwt-mosaic/source/detail?r=997
If you want I can build a standalone lib and add it to the jboss repo.
This relieves you from having to implement it. -
10. Re: Inter component communication
heiko.braun Aug 5, 2009 4:42 AM (in response to heiko.braun)
Great, if we all agree then we just need an implementation for GWT.
Then we'd need to look into the server side and can start defining "interfaces" to the features console components want to share across implementations.
There is pretty good example of what I mean here:
http://developer.tibco.com/pagebus/samples/storequery_discovery/regdemo.htm -
11. Re: Inter component communication
cbrock Aug 5, 2009 12:22 PM (in response to heiko.braun)"heiko.braun@jboss.com" wrote:
@Mike
It's already part of mosaic:
http://code.google.com/p/gwt-mosaic/source/detail?r=997
If you want I can build a standalone lib and add it to the jboss repo.
This relieves you from having to implement it.
Before you do that, I think we need to compare notes. We already have a fairly sophisticated messaging API built-in to workspace for handling this type of stuff. Please check this out in Clearspace: https://docspace.corp.redhat.com/clearspace/docs/DOC-23844
Consequently, I didn't have any trouble using PageBus as the actual underlying implementation. But we already have a standard model for intra-module communication. So we definitely need to get on the same page.