← Prev in month ← Prev in thread

Re: Comments on items from minutes of 2010-05-11

From
Eric Johnson <>
Date
2010-05-14T19:35:09+00:00
ID
Thread
Re: Comments on items from minutes of 2010-05-11
Some comments related to ASSEMBLY-227:

 <Mike Edwards>I take the view that
composability requires that producers and consumers are treated as all
independent

My response: I'm not clear that they are all always independent. 
Scenario: three consumers on three different components, all brought
together in the same composite, and the messages that they listen to
come from "outside" of the composite - so they need to be "promoted" in
some sense, across the composite boundary.  What if it is my design
intent as the creator of the composite that these consumers are all
listening to the same "channel".  How do I make that happen under the
current proposal?

I think I have two ways

  
I label them with @sources coming from a global channel, but then
I've undermined composability

  
Promote all the consumers with a unifying composite consumer.

  

In either case, though it is worth noting that in both of the above
scenarios, I'm not treating these consumer as independent.  By design
they are supposed to be listening to the same channel.

It strikes me as odd that not all consumers are independent of each
other, and likewise producers are not necessarily independent of each
other,  but that we want to make the distinction that producers and
consumers are always independent.  That's a distinction that feels like
a carry over from a point-to-point world.

It seems like a perfectly reasonable use-case to me that I would define
multiple consumers within a composite that all want to be promoted, and
at the same time define a producer that will be sending messages to
those consumers, and I want that producer promoted.  How do I indicate
that intent, and do so in a composable way?

At the moment, if I attempt to solve this by using @source and @target,
I've forced that particular channel to be local, and the consumers in
this case would have to be promoted.  And I also have to promote the
producer.  But now this has a different meaning than I've intended,
because the messages being produced on the channel are not going beyond
the edge of the composite, and the promotions of the consumers and
producers are independent.

MikeE: What does a promoted channel look like and how
would you do it in Java?

This question confused me at first.  I'm not quite sure I understand
this question - it seems to be two questions.  What does a promoted
channel look like - I've put that in my proposal.  To summarize, my
proposal simply moves the existing notions of producer and consumer
under a single umbrella channel element.  I'm not suggesting that
consumers and producers automatically appear under the same channel,
only that they can.

As to how you do it in Java, the answer is - it hasn't changed,
really.  There is, perhaps, an additive piece.  All I'm suggesting is a
different expression of the producer(s) and consumer(s) as part of the
component type.  If the producers and consumers within a Java component
are not all completely independent, then we probably need to add an
annotation that ties producers and consumers together with a shared
label.  That shared label would then signal that the consumer and
producer should appear under the same channel definition in the
component type.  If combining producers and consumers on a channel is
not interesting to the Java developer, then they wouldn't have to
specify anything different than they would otherwise have to do with
the current proposal, and the net effect would be a "channel" declared
in the component type for each of the producers and consumers.

-Eric.
← Prev in month ← Prev in thread