Hi

Sorry for any confusion, here are an abstract example of what I am trying to do.

I would like to treat each component as a function as the followings:

ComponentA(x) :=>  x + 2
ComponentB(y) :=>  y * 3

and I would like a composite file to dynamically compose them, for example:

ComponentB(ComponentA(100)) you get (100+2)*3
where
ComponentA(ComponentB(100)) you get (100*3)+2

In my actually design, each component is a data processing module for computing raw sensor data, so I want the SCA to dynamically compose these component for me according to a description similar to the composite. I won't need to autowire option.

many thanks


Raymond Feng wrote:
Hi,

Please see my comments inline.

Thanks,
Raymond

----- Original Message ----- From: "Peizhao Hu" <[EMAIL PROTECTED]>
To: <tuscany-user@ws.apache.org>
Sent: Thursday, July 12, 2007 7:44 PM
Subject: Can anyone show me example of a simple scenario?


Hi,

I want to achieve the following tasks in Tuscany. However, not quite sure which sample I really should look into. Can anyone point me to the right direction?

I want to write implementation for two components where each component take one input and generate one output. Imagine that these components are generic function, therefore, composition of these components is done by writing the composite file, which wires component's service(as output) and reference(as input) together.

It seems that you want implement some mediation logic, am I right? You could define a generic interface or take advantage of the "any" interface (org.apache.tuscany.sca.interfacedef.Interface, if isDynamic() returns true).


is there any simple example for this scenario?

In the Tuscany samples, such as bigbank, it seems to me that composite service needs to have knowledge about the component service they are going to reference. but in my case, I want all component to be generic, and be able to dynamically compose by defining the composite file of what components to use.


What are the criteria for your composition? SCA spec defines the wiring between a component reference and component service by the interface compatibility. Components can also be autowired by the runtime. Do you just want to programatically wire the components together or do you expect the Tuscany runtime to wire things based on the metadata (such as business semantics, service-level agreement)?

not sure whether the SCA is a better way to do this? any idea or comment?

--
regards;

Peizhao


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
regards;

Peizhao


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to