Hi Jean-Sebastien, Apologies for the tardiness, I was away and without connectivity for a couple of days. Responses in line.
On 6/22/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
Ignacio Silva-Lepe wrote: > I have been playing with the idea of a notification component > implementation > type that would serve as a vehicle to incorporate pub/sub interactions > into > SCA/Tuscany. Within a single composite or domain, producers and consumers > would be explicitly wired to and from a notification component (ie, a > component with an implementation.notification). In addition, to enable > produ- > cers and consumers to exchange messages across domains or even across > composites, a binding.notification could be used by composite references > and services. > I would like to create a couple of new modules in trunk to host code to > support > implementation.notification and binding.notification. If people are ok > with > it, I would > like to do this in the next few days. > Thoughts? > That sounds useful to me. I have a few questions: Could you describe here how an application developer would program a notification component? Will the component implement a fixed notification interface or will this support user defined business interfaces? Are notification methods just one-way methods?
A notification component would be specified for a given 'space' of messages, denoted by the interface in a corresponding notification component type, which in turn is referred to by the notification component's implementation. This interface is app-specific and defines the makeup of the messages being exchanged. At least initially, notification methods are intended to be one-way. What are you proposing for <implementation> and <binding> element? what
would they look like? How do you declare what you're going to publish and how does a component declare a subscription? Do you have a sample composite that you could paste here?
The proposed elements would be <implementation.notification> and <binding.notification>. A component becomes a publisher or producer by using a reference to a notification component, and a component declares a subscription by defining a service that is wired from a notification component. Here's a sample composite for a 'local' notification use case, ie, where producers and consumers are contained in the same composite (or domain) and explicitly wired to/from the notification component: <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="TrafficAdvisoryNotificationLocalComposite"> <component name="TrafficAdvisoryProducer"> <implementation.java class=" org.apache.tuscany.sca.implementation.notification.TrafficAdvisoryProducer "/> <reference name="destination" target="TrafficAdvisoryNotificationComponent"/> </component> <component name="TrafficAdvisoryNotificationComponent"> <implementation.notification name="TrafficAdvisoryNotification"/> <!-- Never use > 1 reference elements here !! --> <reference name="TrafficAdvisoryNotificationReference" multiplicity="0..n" target="TrafficAdvisoryConsumer1 TrafficAdvisoryConsumer2"/> </component> <component name="TrafficAdvisoryConsumer1"> <implementation.java class=" org.apache.tuscany.sca.implementation.notification.TrafficAdvisoryConsumer "/> <property name="name">Consumer1</property> </component> <component name="TrafficAdvisoryConsumer2"> <implementation.java class=" org.apache.tuscany.sca.implementation.notification.TrafficAdvisoryConsumer "/> <property name="name">Consumer2</property> </component> </composite> and here's the corresponding component type: <componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd=" http://www.w3.org/2001/XMLSchema"> <service name="TrafficAdvisoryNotificationService"> <interface.java interface=" org.apache.tuscany.sca.implementation.notification.TrafficAdvisory"/> </service> <reference name="TrafficAdvisoryNotificationReference" multiplicity="0..n"> <interface.java interface=" org.apache.tuscany.sca.implementation.notification.TrafficAdvisory"/> </reference> </componentType> Are you thinking of flowing notifications over various protocols already
supported by Tuscany? or adding a new protocol through this new binding?
I think the simplest case is to flow notifications as literal xml over http, so that's what I am working on prototyping. Thanks
-- Jean-Sebastien --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
