You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Luciano Resende <lu...@gmail.com> on 2010/06/02 22:43:58 UTC

Recent Changes to Tuscany Samples Structure - Food for Thought

My understanding is that we use the Tuscany Samples to help newcomers
to get familiar with SCA and help them understand the basic concepts
of how to build a SCA Composite Application as well as to demonstrate
how some specific technologies might get
incorporated/configured/consumed in SCA way. Based on this, can
someone help me answer a basic question :

I'm new to Tuscany, and was able to load
"sample-contribution-implementation-java-calculator"  into my
development IDE, but I can't figure out how to run/debug this
application. BTW, I'm also getting a little confused with what is a
contribution versus implementation... as I said... I'm just trying to
get started with Tuscany. Could someone please help.


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: Recent Changes to Tuscany Samples Structure - Food for Thought

Posted by Simon Laws <si...@googlemail.com>.
On Thu, Jun 3, 2010 at 9:14 AM, ant elder <an...@gmail.com> wrote:
> On Thu, Jun 3, 2010 at 9:08 AM, Simon Laws <si...@googlemail.com> wrote:
>> On Wed, Jun 2, 2010 at 9:43 PM, Luciano Resende <lu...@gmail.com> wrote:
>>> My understanding is that we use the Tuscany Samples to help newcomers
>>> to get familiar with SCA and help them understand the basic concepts
>>> of how to build a SCA Composite Application as well as to demonstrate
>>> how some specific technologies might get
>>> incorporated/configured/consumed in SCA way. Based on this, can
>>> someone help me answer a basic question :
>>>
>>> I'm new to Tuscany, and was able to load
>>> "sample-contribution-implementation-java-calculator"  into my
>>> development IDE, but I can't figure out how to run/debug this
>>> application. BTW, I'm also getting a little confused with what is a
>>> contribution versus implementation... as I said... I'm just trying to
>>> get started with Tuscany. Could someone please help.
>>>
>>>
>>> --
>>> Luciano Resende
>>> http://people.apache.org/~lresende
>>> http://twitter.com/lresende1975
>>> http://lresende.blogspot.com/
>>>
>>
>> Sure
>>
>> In SCA:
>>
>> - composite applications are described through XML configuration in a
>> ".composite" file. These composite files describe components.
>> Components can be "implemented" using a variety of technologies.
>> Components can be "wired" together, or assembled, using a variety of
>> technologies.
>> - the ".composite" file, and the resources it requires to run, are
>> packed in what SCA calls a contribution. Basically any hierarchical
>> structure, e.g. zip, jar, war etc.
>> - you run the contribution. The SCA specifications don't define how to
>> do this and in Tuscany we have numerous ways depending on your
>> environment, for example, you can run a contribution from:
>> -- the command line (tuscany.bat),
>> -- from a Java program (using the Tuscany Node interface),
>> -- from Maven using the Tuscany plugin,
>> -- from a Web App container (by packaging the Tuscany runtime in a WAR),
>> -- from a Web App container (with the Tuscany runtime integrated
>> directly into the container)
>> -- etc.
>>
>> What's important here in terms of understanding what SCA is all about
>> is that you follow three steps.
>>
>> 1 construct a composite application
>> 2 package it as a contribution
>> 3 run the contribution
>>
>> There are of course complications, for example, an application can
>> comprise multiple contributions, there are peculiarities of the
>> environments from which you can run Tuscany etc. but basically they
>> are variations on these three steps.
>>
>> Hope that helps
>>
>
> Thats a good description.
>
> There is one part i think we need to do better on which is with the
> "run the contribution", which should be "install the contribution to
> an SCA domain" We need to make that clearer in the readme's, website,
> APIs etc, and to have better samples and doc on the creation of SCA
> domains.
>
>   ...ant
>

Very good point. I think we've been very weak on that and it has lead
to much confusion when comparing what Tuscany provides with what
people, who have read about SCA elsewhere, expect.

I would say we've been

1 - good at demonstrating how to build composite files and the
different SCA features on offer there
2 - poor at demonstrating clearly how to package composites and
resources as contribution(s)
3 - poor at demonstrating clearly what can be done with a contribution
in terms of contributing it to an SCA domain and having it run

None of this discussion precludes any particular sample (I'm
personally not trying to remove samples, or sample configurations,
that people find useful - I did reply to Raymond's thread to that
effect). I started the previous thread on tidying samples to try and
address what appear (to me at least) to be failings in Tuscany for 2
and 3.

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Re: Recent Changes to Tuscany Samples Structure - Food for Thought

Posted by ant elder <an...@gmail.com>.
On Thu, Jun 3, 2010 at 9:08 AM, Simon Laws <si...@googlemail.com> wrote:
> On Wed, Jun 2, 2010 at 9:43 PM, Luciano Resende <lu...@gmail.com> wrote:
>> My understanding is that we use the Tuscany Samples to help newcomers
>> to get familiar with SCA and help them understand the basic concepts
>> of how to build a SCA Composite Application as well as to demonstrate
>> how some specific technologies might get
>> incorporated/configured/consumed in SCA way. Based on this, can
>> someone help me answer a basic question :
>>
>> I'm new to Tuscany, and was able to load
>> "sample-contribution-implementation-java-calculator"  into my
>> development IDE, but I can't figure out how to run/debug this
>> application. BTW, I'm also getting a little confused with what is a
>> contribution versus implementation... as I said... I'm just trying to
>> get started with Tuscany. Could someone please help.
>>
>>
>> --
>> Luciano Resende
>> http://people.apache.org/~lresende
>> http://twitter.com/lresende1975
>> http://lresende.blogspot.com/
>>
>
> Sure
>
> In SCA:
>
> - composite applications are described through XML configuration in a
> ".composite" file. These composite files describe components.
> Components can be "implemented" using a variety of technologies.
> Components can be "wired" together, or assembled, using a variety of
> technologies.
> - the ".composite" file, and the resources it requires to run, are
> packed in what SCA calls a contribution. Basically any hierarchical
> structure, e.g. zip, jar, war etc.
> - you run the contribution. The SCA specifications don't define how to
> do this and in Tuscany we have numerous ways depending on your
> environment, for example, you can run a contribution from:
> -- the command line (tuscany.bat),
> -- from a Java program (using the Tuscany Node interface),
> -- from Maven using the Tuscany plugin,
> -- from a Web App container (by packaging the Tuscany runtime in a WAR),
> -- from a Web App container (with the Tuscany runtime integrated
> directly into the container)
> -- etc.
>
> What's important here in terms of understanding what SCA is all about
> is that you follow three steps.
>
> 1 construct a composite application
> 2 package it as a contribution
> 3 run the contribution
>
> There are of course complications, for example, an application can
> comprise multiple contributions, there are peculiarities of the
> environments from which you can run Tuscany etc. but basically they
> are variations on these three steps.
>
> Hope that helps
>

Thats a good description.

There is one part i think we need to do better on which is with the
"run the contribution", which should be "install the contribution to
an SCA domain" We need to make that clearer in the readme's, website,
APIs etc, and to have better samples and doc on the creation of SCA
domains.

   ...ant

Re: Recent Changes to Tuscany Samples Structure - Food for Thought

Posted by Simon Laws <si...@googlemail.com>.
On Wed, Jun 2, 2010 at 9:43 PM, Luciano Resende <lu...@gmail.com> wrote:
> My understanding is that we use the Tuscany Samples to help newcomers
> to get familiar with SCA and help them understand the basic concepts
> of how to build a SCA Composite Application as well as to demonstrate
> how some specific technologies might get
> incorporated/configured/consumed in SCA way. Based on this, can
> someone help me answer a basic question :
>
> I'm new to Tuscany, and was able to load
> "sample-contribution-implementation-java-calculator"  into my
> development IDE, but I can't figure out how to run/debug this
> application. BTW, I'm also getting a little confused with what is a
> contribution versus implementation... as I said... I'm just trying to
> get started with Tuscany. Could someone please help.
>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>

Sure

In SCA:

- composite applications are described through XML configuration in a
".composite" file. These composite files describe components.
Components can be "implemented" using a variety of technologies.
Components can be "wired" together, or assembled, using a variety of
technologies.
- the ".composite" file, and the resources it requires to run, are
packed in what SCA calls a contribution. Basically any hierarchical
structure, e.g. zip, jar, war etc.
- you run the contribution. The SCA specifications don't define how to
do this and in Tuscany we have numerous ways depending on your
environment, for example, you can run a contribution from:
-- the command line (tuscany.bat),
-- from a Java program (using the Tuscany Node interface),
-- from Maven using the Tuscany plugin,
-- from a Web App container (by packaging the Tuscany runtime in a WAR),
-- from a Web App container (with the Tuscany runtime integrated
directly into the container)
-- etc.

What's important here in terms of understanding what SCA is all about
is that you follow three steps.

1 construct a composite application
2 package it as a contribution
3 run the contribution

There are of course complications, for example, an application can
comprise multiple contributions, there are peculiarities of the
environments from which you can run Tuscany etc. but basically they
are variations on these three steps.

Hope that helps

Simon
-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Re: Recent Changes to Tuscany Samples Structure - Food for Thought

Posted by Florian MOGA <mo...@gmail.com>.
Hi all,

As I saw you are reviewing the samples, trying to make them easier to
understand, I already proposed to Ant last week that I can provide a report
on the samples from the "newbie perspective". It will contain points that I
find vague or hard to understand in the samples. I will go through the
samples anyway to help me get more familiar with Tuscany, so I can include
this task in the ramp-up period for GSoC. Unfortunately, until now I've been
very busy at school (it's the last week before exams - many projects to
finish) but I think I can provide the document by the beginning of the next
week. Please let me know what would be the best way to share it with you:
wiki page, document attached to an email, other.

Cheers,

Florian

On Thu, Jun 3, 2010 at 1:03 AM, Luciano Resende <lu...@gmail.com>wrote:

> On Wed, Jun 2, 2010 at 2:37 PM, Raymond Feng <cy...@gmail.com> wrote:
> > I had a post last week to see if we should bring back a self-contained
> > sample. Basically, here is the simplest one:
> > 1) The sample itself is an SCA contribution with the composite file and
> > supporting artifacts such as java classes
> > 2) The sample also comes with a Launcher class and its main method is to
> > start a Tuscany node for the local contribution and use either Node or
> > SCAClient API to invoke one of the services.
> > Would that be good enough for you?
>
> Well, the question was really to get everybody thinking on how a
> newcomer might feel when trying to learn the basics of Tuscany.
>
> As for me, maybe a easy way to mitigate this for now would be to bring
> the calculator sample back, which would work as you are describing,
> and maybe make it using a launcher based on SCAClient API, as we have
> the Store using the Node API....
>
>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>

Re: Recent Changes to Tuscany Samples Structure - Food for Thought

Posted by Luciano Resende <lu...@gmail.com>.
On Wed, Jun 2, 2010 at 2:37 PM, Raymond Feng <cy...@gmail.com> wrote:
> I had a post last week to see if we should bring back a self-contained
> sample. Basically, here is the simplest one:
> 1) The sample itself is an SCA contribution with the composite file and
> supporting artifacts such as java classes
> 2) The sample also comes with a Launcher class and its main method is to
> start a Tuscany node for the local contribution and use either Node or
> SCAClient API to invoke one of the services.
> Would that be good enough for you?

Well, the question was really to get everybody thinking on how a
newcomer might feel when trying to learn the basics of Tuscany.

As for me, maybe a easy way to mitigate this for now would be to bring
the calculator sample back, which would work as you are describing,
and maybe make it using a launcher based on SCAClient API, as we have
the Store using the Node API....



-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: Recent Changes to Tuscany Samples Structure - Food for Thought

Posted by Raymond Feng <cy...@gmail.com>.
I had a post last week to see if we should bring back a self-contained sample. Basically, here is the simplest one:

1) The sample itself is an SCA contribution with the composite file and supporting artifacts such as java classes
2) The sample also comes with a Launcher class and its main method is to start a Tuscany node for the local contribution and use either Node or SCAClient API to invoke one of the services.

Would that be good enough for you? 

Thanks,
Raymond
________________________________________________________________ 
Raymond Feng
rfeng@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
________________________________________________________________

On Jun 2, 2010, at 1:43 PM, Luciano Resende wrote:

> My understanding is that we use the Tuscany Samples to help newcomers
> to get familiar with SCA and help them understand the basic concepts
> of how to build a SCA Composite Application as well as to demonstrate
> how some specific technologies might get
> incorporated/configured/consumed in SCA way. Based on this, can
> someone help me answer a basic question :
> 
> I'm new to Tuscany, and was able to load
> "sample-contribution-implementation-java-calculator"  into my
> development IDE, but I can't figure out how to run/debug this
> application. BTW, I'm also getting a little confused with what is a
> contribution versus implementation... as I said... I'm just trying to
> get started with Tuscany. Could someone please help.
> 
> 
> -- 
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/