You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by Lahiru Gunathilake <gl...@gmail.com> on 2011/07/27 16:49:03 UTC

Keeping samples in distribution rather keeping them in each module

Hi Devs,

I have seen that samples in ws-messenger is scattered and they are in each
module, when you import the code in to an IDE its not under src/main/java
directory so they do not looks like java class files. Normally they are not
compiled during the build time, users have to compile them and run them with
the distribution then it works out of the box. So I keeping them in
distribution directory (all the samples for all the modules), so if someone
wants to look in to samples and do a modification, they can simply open the
samples and do that.

I have seen this in other projects and they are always keep the samples with
the distribution.

WDYT ?

Regards
Lahiru

Re: Keeping samples in distribution rather keeping them in each module

Posted by Suresh Marru <sm...@cs.indiana.edu>.
>> $airavata/trunk/
>> - modules - this directory will have all modules (currently all of them are
>> at top level itself)
>> - commons - as the name implies
>> 
> What kind of thing we are going to have here ? I doubt why this commons
> directory doesn't go inside modules directory ?
Actually you are right, may be better suited for inside the modules directory. I can see utilities like the workflow soap header schema, gfac schemas kind of common utilities to go in there.

Suresh

>> - samples - these are top level samples with system wide use cases Alek
>> suggested (demonstrating the use of multiple modules together)
>> - distribution - as the name implies
>> 
>> within each module we will have samples pertaining to that components. But
>> we should not push samples too deep. I mean we will need to have:
>> modules/ws-messenger
>> - messagebroker
>> - messagebox
>> - clients - client jars will ne needed for integration. The services will
>> be built as aar files, so ideally clients should not be needing any server
>> jars and only client jars
>> - samples - will show how to utilize the client jars and address component
>> level use cases.
>> - distribution
>> 
> I am +1 for this structure !
> 
> Regards
> Lahiru
> 
>> 
>> but there should not be any samples within sub-components like
>> messagebroker and message box, but only unit tests.  Samples to show usage
>> of messagebroker and messagebox will be at one level up in ws-messenger.
>> 
>> Did I get it close to what you all were discussing?
>> 
>> --Suresh
>> 
>> 
>> On Jul 29, 2011, at 8:18 AM, Lahiru Gunathilake wrote:
>> 
>>> Hi Alek,
>>> 
>>> I am +1 for having a complete end to end sample which utilize messagebox
>> and
>>> broker together (right now I didn't see any samples like that).
>>> 
>>> Lahiru
>>> 
>>> On Fri, Jul 29, 2011 at 7:54 AM, Aleksander Slominski <aslom@apache.org
>>> wrote:
>>> 
>>>> Lot of samll smamples are just demonstrating module and use of its API.
>>>> 
>>>> I definitely see the need for samples (or use cases) module that has
>> code
>>>> demonstrating use of multiple modules.
>>>> 
>>>> Thanks,
>>>> 
>>>> Alek
>>>> 
>>>> On Wed, Jul 27, 2011 at 4:38 PM, Lahiru Gunathilake <glahiru@gmail.com
>>>>> wrote:
>>>> 
>>>>> On Wed, Jul 27, 2011 at 4:36 PM, Lahiru Gunathilake <glahiru@gmail.com
>>>>>> wrote:
>>>>> 
>>>>>> How about having like this,
>>>>>> 
>>>>>> <parent directory or distribution>
>>>>>> samples
>>>>>>  - msgBox
>>>>>>        - sample name
>>>>>> 
>>>>>>  - msgBroker
>>>>>>        - sample name
>>>>>> 
>>>>> 
>>>>> Or we can simply keep the sample name which make sense for users, I do
>>>> not
>>>>> think there is a hard requirement of having these under module names.
>>>>> 
>>>>> Regards
>>>>> Lahiru
>>>>> 
>>>>>> 
>>>>>> this way I do not think users will get confuse, I think this is
>> cleaner
>>>>>> compare to keep code, tests and samples in a module. Even though we
>> can
>>>>>> define sample based on the module (ex:samples for msgBroker and
>> msgBox)
>>>>>> there can be samples which we cannot put in to particular module
>> (there
>>>>> can
>>>>>> be samples which consume number of modules) in that case putting
>>>> samples
>>>>> in
>>>>>> to a module is not correct as per my understanding.
>>>>>> 
>>>>>> so my argument is samples are not directly belong to a module and we
>>>> need
>>>>>> to separate it out from msgBroker and msgBox code.
>>>>>> 
>>>>>> Regards
>>>>>> Lahiru
>>>>>> 
>>>>>> 
>>>>>> On Wed, Jul 27, 2011 at 3:59 PM, Aleksander Slominski <
>>>> aslom@apache.org
>>>>>> wrote:
>>>>>> 
>>>>>>> Will it not be a bit confusing to have samples for different
>>>> components
>>>>>>> int
>>>>>>> one place?
>>>>>>> 
>>>>>>> Alek
>>>>>>> 
>>>>>>> On Wed, Jul 27, 2011 at 2:10 PM, Lahiru Gunathilake <
>>>> glahiru@gmail.com
>>>>>>>> wrote:
>>>>>>> 
>>>>>>>> Hi Thilina,
>>>>>>>> 
>>>>>>>> Yes if we put it in to a separate module or to distribution we can
>>>>> build
>>>>>>>> the
>>>>>>>> samples and but it in to bin directory of each sample and ship the
>>>>> jars
>>>>>>>> too.
>>>>>>>> This will be useful if some user wants the jars and want to run it
>>>>>>> without
>>>>>>>> using ant.
>>>>>>>> 
>>>>>>>> Regards
>>>>>>>> Lahiru
>>>>>>>> 
>>>>>>>> On Wed, Jul 27, 2011 at 12:45 PM, Thilina Gunarathne <
>>>>> csethil@gmail.com
>>>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> How about a separate samples module?  Also we need to make sure
>>>>>>> samples
>>>>>>>> are
>>>>>>>>> part of the build, so that they won't be broken (at least no
>>>> compile
>>>>>>>>> errors)..
>>>>>>>>> 
>>>>>>>>> thanks,
>>>>>>>>> Thilina
>>>>>>>>> 
>>>>>>>>> On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <
>>>>>>> glahiru@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>> Hi Alek,
>>>>>>>>>> 
>>>>>>>>>> I am +1 to compile the samples and put the jar in to a lib
>>>>> directory
>>>>>>>> for
>>>>>>>>>> each sample, at that point we can get to know during the build
>>>>> time
>>>>>>>>> weather
>>>>>>>>>> there are issue in samples (But in practical case people will
>>>> not
>>>>>>> use
>>>>>>>>> those
>>>>>>>>>> jar files, they will simply run the ant script in sample
>>>>> directory).
>>>>>>>>>> 
>>>>>>>>>> My suggestion is to put these samples in to distributions
>>>>> directory
>>>>>>>>> rather
>>>>>>>>>> keeping them in each modules directories. With current model
>>>> it's
>>>>>>> not
>>>>>>>>> nice
>>>>>>>>>> to keep another set of java files outside src directory in each
>>>>>>>>> component.
>>>>>>>>>> 
>>>>>>>>>> Regards
>>>>>>>>>> Lahiru
>>>>>>>>>> 
>>>>>>>>>> On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <
>>>>>>>> aslom@apache.org
>>>>>>>>>> wrote:
>>>>>>>>>> 
>>>>>>>>>>> I think  they should be setup so they are compiled. I do not
>>>> knwo
>>>>>>>> maven
>>>>>>>>> but
>>>>>>>>>>> in eclipse youc an specify multiple source directories and that
>>>>>>> shoudl
>>>>>>>>>>> allow
>>>>>>>>>>> to compile and run samples.
>>>>>>>>>>> 
>>>>>>>>>>> Is there the same problem for unit tests?
>>>>>>>>>>> 
>>>>>>>>>>> Alek
>>>>>>>>>>> 
>>>>>>>>>>> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <
>>>>>>>> glahiru@gmail.com
>>>>>>>>>>>> wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> Hi Devs,
>>>>>>>>>>>> 
>>>>>>>>>>>> I have seen that samples in ws-messenger is scattered and
>>>> they
>>>>>>> are
>>>>>>>> in
>>>>>>>>>>> each
>>>>>>>>>>>> module, when you import the code in to an IDE its not under
>>>>>>>>> src/main/java
>>>>>>>>>>>> directory so they do not looks like java class files.
>>>> Normally
>>>>>>> they
>>>>>>>>> are
>>>>>>>>>>> not
>>>>>>>>>>>> compiled during the build time, users have to compile them
>>>> and
>>>>>>> run
>>>>>>>>> them
>>>>>>>>>>>> with
>>>>>>>>>>>> the distribution then it works out of the box. So I keeping
>>>>> them
>>>>>>> in
>>>>>>>>>>>> distribution directory (all the samples for all the modules),
>>>>> so
>>>>>>> if
>>>>>>>>>>> someone
>>>>>>>>>>>> wants to look in to samples and do a modification, they can
>>>>>>> simply
>>>>>>>>> open
>>>>>>>>>>> the
>>>>>>>>>>>> samples and do that.
>>>>>>>>>>>> 
>>>>>>>>>>>> I have seen this in other projects and they are always keep
>>>> the
>>>>>>>>> samples
>>>>>>>>>>>> with
>>>>>>>>>>>> the distribution.
>>>>>>>>>>>> 
>>>>>>>>>>>> WDYT ?
>>>>>>>>>>>> 
>>>>>>>>>>>> Regards
>>>>>>>>>>>> Lahiru
>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> https://www.cs.indiana.edu/~tgunarat/
>>>>>>>>> http://www.linkedin.com/in/thilina
>>>>>>>>> http://thilina.gunarathne.org
>>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>> 
>> 


Re: Keeping samples in distribution rather keeping them in each module

Posted by Suresh Marru <sm...@cs.indiana.edu>.
On Aug 1, 2011, at 4:48 PM, Raminderjeet Singh wrote:

>>> - clients - client jars will ne needed for integration. The services will
>>> be built as aar files, so ideally clients should not be needing any server
>>> jars and only client jars
>>> - samples - will show how to utilize the client jars and address component
> Samples at component level are more like client and client unit test. The idea is to show how the client code works. We should not duplicate that code. For sure we should create useful API document and client documentation for users.

Good point, I agree, samples should strengthen the documentation.  Only when using a client code is not self-explanatory, we will need to add sample use cases which demonstrate different ways of integrating the client code. The subtle difference is: the client jar will be needed by the third party component but the sample is more for a reference. I do agree that there will be more over lap of samples with unit tests, but unit tests are to ensure a functional piece within the source code, it may not test the changes well enough with all the context, which is supposed to be tested by the bundled samples. 

Suresh

Re: Keeping samples in distribution rather keeping them in each module

Posted by Raminderjeet Singh <ra...@gmail.com>.
 I have +1 for overall structure but confusion between samples and clients at component level. 
See my comments inline.

On Aug 1, 2011, at 11:58 AM, Lahiru Gunathilake wrote:

> Hi Suresh,
> 
> On Mon, Aug 1, 2011 at 11:50 AM, Suresh Marru <sm...@apache.org> wrote:
> 
>> Hi Guys,
>> 
>> I am getting lost in this thread, for my own clarity I will try to
>> summarize please correct if I am misinterpreting the discussion.
>> 
>> * We will need test cases which will be bundled with the source and build
>> will ensure they are build correctly.
>> * We will also need samples showcasing how to use a component. We need to
>> make sure these samples are also build correctly. But there were multiple
>> arguments on where this samples should reside.
>> 
>> I will mashup all the suggestions and propose the following svn structure,
>> feel free to yell:
>> 
>> $airavata/trunk/
>> - modules - this directory will have all modules (currently all of them are
>> at top level itself)
>> - commons - as the name implies
>> 
> What kind of thing we are going to have here ? I doubt why this commons
> directory doesn't go inside modules directory ?
> 
>> - samples - these are top level samples with system wide use cases Alek
+1 for having sample at this level which will have system integration testing scope. We can address bringing different modules up at this level to test component integration. We need to make sure samples are added/updated based on different use cases. 

>> suggested (demonstrating the use of multiple modules together)
>> - distribution - as the name implies
>> 
>> within each module we will have samples pertaining to that components. But
>> we should not push samples too deep. I mean we will need to have:
>> modules/ws-messenger
>> - messagebroker
>> - messagebox
>> - clients - client jars will ne needed for integration. The services will
>> be built as aar files, so ideally clients should not be needing any server
>> jars and only client jars
>> - samples - will show how to utilize the client jars and address component
Samples at component level are more like client and client unit test. The idea is to show how the client code works. We should not duplicate that code. For sure we should create useful API document and client documentation for users.
>> level use cases.
>> - distribution
>> 
> I am +1 for this structure !
> 
> Regards
> Lahiru
> 
>> 
>> but there should not be any samples within sub-components like
>> messagebroker and message box, but only unit tests.  Samples to show usage
>> of messagebroker and messagebox will be at one level up in ws-messenger.
>> 
>> Did I get it close to what you all were discussing?
>> 
>> --Suresh
>> 
>> 
>> On Jul 29, 2011, at 8:18 AM, Lahiru Gunathilake wrote:
>> 
>>> Hi Alek,
>>> 
>>> I am +1 for having a complete end to end sample which utilize messagebox
>> and
>>> broker together (right now I didn't see any samples like that).
>>> 
>>> Lahiru
>>> 
>>> On Fri, Jul 29, 2011 at 7:54 AM, Aleksander Slominski <aslom@apache.org
>>> wrote:
>>> 
>>>> Lot of samll smamples are just demonstrating module and use of its API.
>>>> 
>>>> I definitely see the need for samples (or use cases) module that has
>> code
>>>> demonstrating use of multiple modules.
>>>> 
>>>> Thanks,
>>>> 
>>>> Alek
>>>> 
>>>> On Wed, Jul 27, 2011 at 4:38 PM, Lahiru Gunathilake <glahiru@gmail.com
>>>>> wrote:
>>>> 
>>>>> On Wed, Jul 27, 2011 at 4:36 PM, Lahiru Gunathilake <glahiru@gmail.com
>>>>>> wrote:
>>>>> 
>>>>>> How about having like this,
>>>>>> 
>>>>>> <parent directory or distribution>
>>>>>> samples
>>>>>>  - msgBox
>>>>>>        - sample name
>>>>>> 
>>>>>>  - msgBroker
>>>>>>        - sample name
>>>>>> 
>>>>> 
>>>>> Or we can simply keep the sample name which make sense for users, I do
>>>> not
>>>>> think there is a hard requirement of having these under module names.
>>>>> 
>>>>> Regards
>>>>> Lahiru
>>>>> 
>>>>>> 
>>>>>> this way I do not think users will get confuse, I think this is
>> cleaner
>>>>>> compare to keep code, tests and samples in a module. Even though we
>> can
>>>>>> define sample based on the module (ex:samples for msgBroker and
>> msgBox)
>>>>>> there can be samples which we cannot put in to particular module
>> (there
>>>>> can
>>>>>> be samples which consume number of modules) in that case putting
>>>> samples
>>>>> in
>>>>>> to a module is not correct as per my understanding.
>>>>>> 
>>>>>> so my argument is samples are not directly belong to a module and we
>>>> need
>>>>>> to separate it out from msgBroker and msgBox code.
>>>>>> 
>>>>>> Regards
>>>>>> Lahiru
>>>>>> 
>>>>>> 
>>>>>> On Wed, Jul 27, 2011 at 3:59 PM, Aleksander Slominski <
>>>> aslom@apache.org
>>>>>> wrote:
>>>>>> 
>>>>>>> Will it not be a bit confusing to have samples for different
>>>> components
>>>>>>> int
>>>>>>> one place?
>>>>>>> 
>>>>>>> Alek
>>>>>>> 
>>>>>>> On Wed, Jul 27, 2011 at 2:10 PM, Lahiru Gunathilake <
>>>> glahiru@gmail.com
>>>>>>>> wrote:
>>>>>>> 
>>>>>>>> Hi Thilina,
>>>>>>>> 
>>>>>>>> Yes if we put it in to a separate module or to distribution we can
>>>>> build
>>>>>>>> the
>>>>>>>> samples and but it in to bin directory of each sample and ship the
>>>>> jars
>>>>>>>> too.
>>>>>>>> This will be useful if some user wants the jars and want to run it
>>>>>>> without
>>>>>>>> using ant.
>>>>>>>> 
>>>>>>>> Regards
>>>>>>>> Lahiru
>>>>>>>> 
>>>>>>>> On Wed, Jul 27, 2011 at 12:45 PM, Thilina Gunarathne <
>>>>> csethil@gmail.com
>>>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> How about a separate samples module?  Also we need to make sure
>>>>>>> samples
>>>>>>>> are
>>>>>>>>> part of the build, so that they won't be broken (at least no
>>>> compile
>>>>>>>>> errors)..
>>>>>>>>> 
>>>>>>>>> thanks,
>>>>>>>>> Thilina
>>>>>>>>> 
>>>>>>>>> On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <
>>>>>>> glahiru@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>> Hi Alek,
>>>>>>>>>> 
>>>>>>>>>> I am +1 to compile the samples and put the jar in to a lib
>>>>> directory
>>>>>>>> for
>>>>>>>>>> each sample, at that point we can get to know during the build
>>>>> time
>>>>>>>>> weather
>>>>>>>>>> there are issue in samples (But in practical case people will
>>>> not
>>>>>>> use
>>>>>>>>> those
>>>>>>>>>> jar files, they will simply run the ant script in sample
>>>>> directory).
>>>>>>>>>> 
>>>>>>>>>> My suggestion is to put these samples in to distributions
>>>>> directory
>>>>>>>>> rather
>>>>>>>>>> keeping them in each modules directories. With current model
>>>> it's
>>>>>>> not
>>>>>>>>> nice
>>>>>>>>>> to keep another set of java files outside src directory in each
>>>>>>>>> component.
>>>>>>>>>> 
>>>>>>>>>> Regards
>>>>>>>>>> Lahiru
>>>>>>>>>> 
>>>>>>>>>> On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <
>>>>>>>> aslom@apache.org
>>>>>>>>>> wrote:
>>>>>>>>>> 
>>>>>>>>>>> I think  they should be setup so they are compiled. I do not
>>>> knwo
>>>>>>>> maven
>>>>>>>>> but
>>>>>>>>>>> in eclipse youc an specify multiple source directories and that
>>>>>>> shoudl
>>>>>>>>>>> allow
>>>>>>>>>>> to compile and run samples.
>>>>>>>>>>> 
>>>>>>>>>>> Is there the same problem for unit tests?
>>>>>>>>>>> 
>>>>>>>>>>> Alek
>>>>>>>>>>> 
>>>>>>>>>>> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <
>>>>>>>> glahiru@gmail.com
>>>>>>>>>>>> wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> Hi Devs,
>>>>>>>>>>>> 
>>>>>>>>>>>> I have seen that samples in ws-messenger is scattered and
>>>> they
>>>>>>> are
>>>>>>>> in
>>>>>>>>>>> each
>>>>>>>>>>>> module, when you import the code in to an IDE its not under
>>>>>>>>> src/main/java
>>>>>>>>>>>> directory so they do not looks like java class files.
>>>> Normally
>>>>>>> they
>>>>>>>>> are
>>>>>>>>>>> not
>>>>>>>>>>>> compiled during the build time, users have to compile them
>>>> and
>>>>>>> run
>>>>>>>>> them
>>>>>>>>>>>> with
>>>>>>>>>>>> the distribution then it works out of the box. So I keeping
>>>>> them
>>>>>>> in
>>>>>>>>>>>> distribution directory (all the samples for all the modules),
>>>>> so
>>>>>>> if
>>>>>>>>>>> someone
>>>>>>>>>>>> wants to look in to samples and do a modification, they can
>>>>>>> simply
>>>>>>>>> open
>>>>>>>>>>> the
>>>>>>>>>>>> samples and do that.
>>>>>>>>>>>> 
>>>>>>>>>>>> I have seen this in other projects and they are always keep
>>>> the
>>>>>>>>> samples
>>>>>>>>>>>> with
>>>>>>>>>>>> the distribution.
>>>>>>>>>>>> 
>>>>>>>>>>>> WDYT ?
>>>>>>>>>>>> 
>>>>>>>>>>>> Regards
>>>>>>>>>>>> Lahiru
>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> https://www.cs.indiana.edu/~tgunarat/
>>>>>>>>> http://www.linkedin.com/in/thilina
>>>>>>>>> http://thilina.gunarathne.org
>>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>> 
>> 


Re: Keeping samples in distribution rather keeping them in each module

Posted by Lahiru Gunathilake <gl...@gmail.com>.
Hi Suresh,

On Mon, Aug 1, 2011 at 11:50 AM, Suresh Marru <sm...@apache.org> wrote:

> Hi Guys,
>
> I am getting lost in this thread, for my own clarity I will try to
> summarize please correct if I am misinterpreting the discussion.
>
> * We will need test cases which will be bundled with the source and build
> will ensure they are build correctly.
> * We will also need samples showcasing how to use a component. We need to
> make sure these samples are also build correctly. But there were multiple
> arguments on where this samples should reside.
>
> I will mashup all the suggestions and propose the following svn structure,
> feel free to yell:
>
> $airavata/trunk/
> - modules - this directory will have all modules (currently all of them are
> at top level itself)
> - commons - as the name implies
>
What kind of thing we are going to have here ? I doubt why this commons
directory doesn't go inside modules directory ?

> - samples - these are top level samples with system wide use cases Alek
> suggested (demonstrating the use of multiple modules together)
> - distribution - as the name implies
>
> within each module we will have samples pertaining to that components. But
> we should not push samples too deep. I mean we will need to have:
> modules/ws-messenger
> - messagebroker
> - messagebox
> - clients - client jars will ne needed for integration. The services will
> be built as aar files, so ideally clients should not be needing any server
> jars and only client jars
> - samples - will show how to utilize the client jars and address component
> level use cases.
> - distribution
>
I am +1 for this structure !

Regards
Lahiru

>
> but there should not be any samples within sub-components like
> messagebroker and message box, but only unit tests.  Samples to show usage
> of messagebroker and messagebox will be at one level up in ws-messenger.
>
> Did I get it close to what you all were discussing?
>
> --Suresh
>
>
> On Jul 29, 2011, at 8:18 AM, Lahiru Gunathilake wrote:
>
> > Hi Alek,
> >
> > I am +1 for having a complete end to end sample which utilize messagebox
> and
> > broker together (right now I didn't see any samples like that).
> >
> > Lahiru
> >
> > On Fri, Jul 29, 2011 at 7:54 AM, Aleksander Slominski <aslom@apache.org
> >wrote:
> >
> >> Lot of samll smamples are just demonstrating module and use of its API.
> >>
> >> I definitely see the need for samples (or use cases) module that has
> code
> >> demonstrating use of multiple modules.
> >>
> >> Thanks,
> >>
> >> Alek
> >>
> >> On Wed, Jul 27, 2011 at 4:38 PM, Lahiru Gunathilake <glahiru@gmail.com
> >>> wrote:
> >>
> >>> On Wed, Jul 27, 2011 at 4:36 PM, Lahiru Gunathilake <glahiru@gmail.com
> >>>> wrote:
> >>>
> >>>> How about having like this,
> >>>>
> >>>> <parent directory or distribution>
> >>>> samples
> >>>>   - msgBox
> >>>>         - sample name
> >>>>
> >>>>   - msgBroker
> >>>>         - sample name
> >>>>
> >>>
> >>> Or we can simply keep the sample name which make sense for users, I do
> >> not
> >>> think there is a hard requirement of having these under module names.
> >>>
> >>> Regards
> >>> Lahiru
> >>>
> >>>>
> >>>> this way I do not think users will get confuse, I think this is
> cleaner
> >>>> compare to keep code, tests and samples in a module. Even though we
> can
> >>>> define sample based on the module (ex:samples for msgBroker and
> msgBox)
> >>>> there can be samples which we cannot put in to particular module
> (there
> >>> can
> >>>> be samples which consume number of modules) in that case putting
> >> samples
> >>> in
> >>>> to a module is not correct as per my understanding.
> >>>>
> >>>> so my argument is samples are not directly belong to a module and we
> >> need
> >>>> to separate it out from msgBroker and msgBox code.
> >>>>
> >>>> Regards
> >>>> Lahiru
> >>>>
> >>>>
> >>>> On Wed, Jul 27, 2011 at 3:59 PM, Aleksander Slominski <
> >> aslom@apache.org
> >>>> wrote:
> >>>>
> >>>>> Will it not be a bit confusing to have samples for different
> >> components
> >>>>> int
> >>>>> one place?
> >>>>>
> >>>>> Alek
> >>>>>
> >>>>> On Wed, Jul 27, 2011 at 2:10 PM, Lahiru Gunathilake <
> >> glahiru@gmail.com
> >>>>>> wrote:
> >>>>>
> >>>>>> Hi Thilina,
> >>>>>>
> >>>>>> Yes if we put it in to a separate module or to distribution we can
> >>> build
> >>>>>> the
> >>>>>> samples and but it in to bin directory of each sample and ship the
> >>> jars
> >>>>>> too.
> >>>>>> This will be useful if some user wants the jars and want to run it
> >>>>> without
> >>>>>> using ant.
> >>>>>>
> >>>>>> Regards
> >>>>>> Lahiru
> >>>>>>
> >>>>>> On Wed, Jul 27, 2011 at 12:45 PM, Thilina Gunarathne <
> >>> csethil@gmail.com
> >>>>>>> wrote:
> >>>>>>
> >>>>>>> How about a separate samples module?  Also we need to make sure
> >>>>> samples
> >>>>>> are
> >>>>>>> part of the build, so that they won't be broken (at least no
> >> compile
> >>>>>>> errors)..
> >>>>>>>
> >>>>>>> thanks,
> >>>>>>> Thilina
> >>>>>>>
> >>>>>>> On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <
> >>>>> glahiru@gmail.com>
> >>>>>>> wrote:
> >>>>>>>> Hi Alek,
> >>>>>>>>
> >>>>>>>> I am +1 to compile the samples and put the jar in to a lib
> >>> directory
> >>>>>> for
> >>>>>>>> each sample, at that point we can get to know during the build
> >>> time
> >>>>>>> weather
> >>>>>>>> there are issue in samples (But in practical case people will
> >> not
> >>>>> use
> >>>>>>> those
> >>>>>>>> jar files, they will simply run the ant script in sample
> >>> directory).
> >>>>>>>>
> >>>>>>>> My suggestion is to put these samples in to distributions
> >>> directory
> >>>>>>> rather
> >>>>>>>> keeping them in each modules directories. With current model
> >> it's
> >>>>> not
> >>>>>>> nice
> >>>>>>>> to keep another set of java files outside src directory in each
> >>>>>>> component.
> >>>>>>>>
> >>>>>>>> Regards
> >>>>>>>> Lahiru
> >>>>>>>>
> >>>>>>>> On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <
> >>>>>> aslom@apache.org
> >>>>>>>> wrote:
> >>>>>>>>
> >>>>>>>>> I think  they should be setup so they are compiled. I do not
> >> knwo
> >>>>>> maven
> >>>>>>> but
> >>>>>>>>> in eclipse youc an specify multiple source directories and that
> >>>>> shoudl
> >>>>>>>>> allow
> >>>>>>>>> to compile and run samples.
> >>>>>>>>>
> >>>>>>>>> Is there the same problem for unit tests?
> >>>>>>>>>
> >>>>>>>>> Alek
> >>>>>>>>>
> >>>>>>>>> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <
> >>>>>> glahiru@gmail.com
> >>>>>>>>>> wrote:
> >>>>>>>>>
> >>>>>>>>>> Hi Devs,
> >>>>>>>>>>
> >>>>>>>>>> I have seen that samples in ws-messenger is scattered and
> >> they
> >>>>> are
> >>>>>> in
> >>>>>>>>> each
> >>>>>>>>>> module, when you import the code in to an IDE its not under
> >>>>>>> src/main/java
> >>>>>>>>>> directory so they do not looks like java class files.
> >> Normally
> >>>>> they
> >>>>>>> are
> >>>>>>>>> not
> >>>>>>>>>> compiled during the build time, users have to compile them
> >> and
> >>>>> run
> >>>>>>> them
> >>>>>>>>>> with
> >>>>>>>>>> the distribution then it works out of the box. So I keeping
> >>> them
> >>>>> in
> >>>>>>>>>> distribution directory (all the samples for all the modules),
> >>> so
> >>>>> if
> >>>>>>>>> someone
> >>>>>>>>>> wants to look in to samples and do a modification, they can
> >>>>> simply
> >>>>>>> open
> >>>>>>>>> the
> >>>>>>>>>> samples and do that.
> >>>>>>>>>>
> >>>>>>>>>> I have seen this in other projects and they are always keep
> >> the
> >>>>>>> samples
> >>>>>>>>>> with
> >>>>>>>>>> the distribution.
> >>>>>>>>>>
> >>>>>>>>>> WDYT ?
> >>>>>>>>>>
> >>>>>>>>>> Regards
> >>>>>>>>>> Lahiru
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> https://www.cs.indiana.edu/~tgunarat/
> >>>>>>> http://www.linkedin.com/in/thilina
> >>>>>>> http://thilina.gunarathne.org
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>
>
>

Re: Keeping samples in distribution rather keeping them in each module

Posted by Suresh Marru <sm...@apache.org>.
Hi Guys,

I am getting lost in this thread, for my own clarity I will try to summarize please correct if I am misinterpreting the discussion. 

* We will need test cases which will be bundled with the source and build will ensure they are build correctly.
* We will also need samples showcasing how to use a component. We need to make sure these samples are also build correctly. But there were multiple arguments on where this samples should reside. 

I will mashup all the suggestions and propose the following svn structure, feel free to yell:

$airavata/trunk/
- modules - this directory will have all modules (currently all of them are at top level itself)
- commons - as the name implies 
- samples - these are top level samples with system wide use cases Alek suggested (demonstrating the use of multiple modules together)
- distribution - as the name implies 

within each module we will have samples pertaining to that components. But we should not push samples too deep. I mean we will need to have:
modules/ws-messenger
- messagebroker
- messagebox
- clients - client jars will ne needed for integration. The services will be built as aar files, so ideally clients should not be needing any server jars and only client jars
- samples - will show how to utilize the client jars and address component level use cases. 
- distribution 

but there should not be any samples within sub-components like messagebroker and message box, but only unit tests.  Samples to show usage of messagebroker and messagebox will be at one level up in ws-messenger. 

Did I get it close to what you all were discussing? 

--Suresh


On Jul 29, 2011, at 8:18 AM, Lahiru Gunathilake wrote:

> Hi Alek,
> 
> I am +1 for having a complete end to end sample which utilize messagebox and
> broker together (right now I didn't see any samples like that).
> 
> Lahiru
> 
> On Fri, Jul 29, 2011 at 7:54 AM, Aleksander Slominski <as...@apache.org>wrote:
> 
>> Lot of samll smamples are just demonstrating module and use of its API.
>> 
>> I definitely see the need for samples (or use cases) module that has code
>> demonstrating use of multiple modules.
>> 
>> Thanks,
>> 
>> Alek
>> 
>> On Wed, Jul 27, 2011 at 4:38 PM, Lahiru Gunathilake <glahiru@gmail.com
>>> wrote:
>> 
>>> On Wed, Jul 27, 2011 at 4:36 PM, Lahiru Gunathilake <glahiru@gmail.com
>>>> wrote:
>>> 
>>>> How about having like this,
>>>> 
>>>> <parent directory or distribution>
>>>> samples
>>>>   - msgBox
>>>>         - sample name
>>>> 
>>>>   - msgBroker
>>>>         - sample name
>>>> 
>>> 
>>> Or we can simply keep the sample name which make sense for users, I do
>> not
>>> think there is a hard requirement of having these under module names.
>>> 
>>> Regards
>>> Lahiru
>>> 
>>>> 
>>>> this way I do not think users will get confuse, I think this is cleaner
>>>> compare to keep code, tests and samples in a module. Even though we can
>>>> define sample based on the module (ex:samples for msgBroker and msgBox)
>>>> there can be samples which we cannot put in to particular module (there
>>> can
>>>> be samples which consume number of modules) in that case putting
>> samples
>>> in
>>>> to a module is not correct as per my understanding.
>>>> 
>>>> so my argument is samples are not directly belong to a module and we
>> need
>>>> to separate it out from msgBroker and msgBox code.
>>>> 
>>>> Regards
>>>> Lahiru
>>>> 
>>>> 
>>>> On Wed, Jul 27, 2011 at 3:59 PM, Aleksander Slominski <
>> aslom@apache.org
>>>> wrote:
>>>> 
>>>>> Will it not be a bit confusing to have samples for different
>> components
>>>>> int
>>>>> one place?
>>>>> 
>>>>> Alek
>>>>> 
>>>>> On Wed, Jul 27, 2011 at 2:10 PM, Lahiru Gunathilake <
>> glahiru@gmail.com
>>>>>> wrote:
>>>>> 
>>>>>> Hi Thilina,
>>>>>> 
>>>>>> Yes if we put it in to a separate module or to distribution we can
>>> build
>>>>>> the
>>>>>> samples and but it in to bin directory of each sample and ship the
>>> jars
>>>>>> too.
>>>>>> This will be useful if some user wants the jars and want to run it
>>>>> without
>>>>>> using ant.
>>>>>> 
>>>>>> Regards
>>>>>> Lahiru
>>>>>> 
>>>>>> On Wed, Jul 27, 2011 at 12:45 PM, Thilina Gunarathne <
>>> csethil@gmail.com
>>>>>>> wrote:
>>>>>> 
>>>>>>> How about a separate samples module?  Also we need to make sure
>>>>> samples
>>>>>> are
>>>>>>> part of the build, so that they won't be broken (at least no
>> compile
>>>>>>> errors)..
>>>>>>> 
>>>>>>> thanks,
>>>>>>> Thilina
>>>>>>> 
>>>>>>> On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <
>>>>> glahiru@gmail.com>
>>>>>>> wrote:
>>>>>>>> Hi Alek,
>>>>>>>> 
>>>>>>>> I am +1 to compile the samples and put the jar in to a lib
>>> directory
>>>>>> for
>>>>>>>> each sample, at that point we can get to know during the build
>>> time
>>>>>>> weather
>>>>>>>> there are issue in samples (But in practical case people will
>> not
>>>>> use
>>>>>>> those
>>>>>>>> jar files, they will simply run the ant script in sample
>>> directory).
>>>>>>>> 
>>>>>>>> My suggestion is to put these samples in to distributions
>>> directory
>>>>>>> rather
>>>>>>>> keeping them in each modules directories. With current model
>> it's
>>>>> not
>>>>>>> nice
>>>>>>>> to keep another set of java files outside src directory in each
>>>>>>> component.
>>>>>>>> 
>>>>>>>> Regards
>>>>>>>> Lahiru
>>>>>>>> 
>>>>>>>> On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <
>>>>>> aslom@apache.org
>>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> I think  they should be setup so they are compiled. I do not
>> knwo
>>>>>> maven
>>>>>>> but
>>>>>>>>> in eclipse youc an specify multiple source directories and that
>>>>> shoudl
>>>>>>>>> allow
>>>>>>>>> to compile and run samples.
>>>>>>>>> 
>>>>>>>>> Is there the same problem for unit tests?
>>>>>>>>> 
>>>>>>>>> Alek
>>>>>>>>> 
>>>>>>>>> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <
>>>>>> glahiru@gmail.com
>>>>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> Hi Devs,
>>>>>>>>>> 
>>>>>>>>>> I have seen that samples in ws-messenger is scattered and
>> they
>>>>> are
>>>>>> in
>>>>>>>>> each
>>>>>>>>>> module, when you import the code in to an IDE its not under
>>>>>>> src/main/java
>>>>>>>>>> directory so they do not looks like java class files.
>> Normally
>>>>> they
>>>>>>> are
>>>>>>>>> not
>>>>>>>>>> compiled during the build time, users have to compile them
>> and
>>>>> run
>>>>>>> them
>>>>>>>>>> with
>>>>>>>>>> the distribution then it works out of the box. So I keeping
>>> them
>>>>> in
>>>>>>>>>> distribution directory (all the samples for all the modules),
>>> so
>>>>> if
>>>>>>>>> someone
>>>>>>>>>> wants to look in to samples and do a modification, they can
>>>>> simply
>>>>>>> open
>>>>>>>>> the
>>>>>>>>>> samples and do that.
>>>>>>>>>> 
>>>>>>>>>> I have seen this in other projects and they are always keep
>> the
>>>>>>> samples
>>>>>>>>>> with
>>>>>>>>>> the distribution.
>>>>>>>>>> 
>>>>>>>>>> WDYT ?
>>>>>>>>>> 
>>>>>>>>>> Regards
>>>>>>>>>> Lahiru
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> https://www.cs.indiana.edu/~tgunarat/
>>>>>>> http://www.linkedin.com/in/thilina
>>>>>>> http://thilina.gunarathne.org
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>> 


Re: Keeping samples in distribution rather keeping them in each module

Posted by Lahiru Gunathilake <gl...@gmail.com>.
Hi Alek,

I am +1 for having a complete end to end sample which utilize messagebox and
broker together (right now I didn't see any samples like that).

Lahiru

On Fri, Jul 29, 2011 at 7:54 AM, Aleksander Slominski <as...@apache.org>wrote:

> Lot of samll smamples are just demonstrating module and use of its API.
>
> I definitely see the need for samples (or use cases) module that has code
> demonstrating use of multiple modules.
>
> Thanks,
>
> Alek
>
> On Wed, Jul 27, 2011 at 4:38 PM, Lahiru Gunathilake <glahiru@gmail.com
> >wrote:
>
> > On Wed, Jul 27, 2011 at 4:36 PM, Lahiru Gunathilake <glahiru@gmail.com
> > >wrote:
> >
> > > How about having like this,
> > >
> > > <parent directory or distribution>
> > > samples
> > >    - msgBox
> > >          - sample name
> > >
> > >    - msgBroker
> > >          - sample name
> > >
> >
> > Or we can simply keep the sample name which make sense for users, I do
> not
> > think there is a hard requirement of having these under module names.
> >
> > Regards
> > Lahiru
> >
> > >
> > > this way I do not think users will get confuse, I think this is cleaner
> > > compare to keep code, tests and samples in a module. Even though we can
> > > define sample based on the module (ex:samples for msgBroker and msgBox)
> > > there can be samples which we cannot put in to particular module (there
> > can
> > > be samples which consume number of modules) in that case putting
> samples
> > in
> > > to a module is not correct as per my understanding.
> > >
> > > so my argument is samples are not directly belong to a module and we
> need
> > > to separate it out from msgBroker and msgBox code.
> > >
> > > Regards
> > > Lahiru
> > >
> > >
> > > On Wed, Jul 27, 2011 at 3:59 PM, Aleksander Slominski <
> aslom@apache.org
> > >wrote:
> > >
> > >> Will it not be a bit confusing to have samples for different
> components
> > >> int
> > >> one place?
> > >>
> > >> Alek
> > >>
> > >> On Wed, Jul 27, 2011 at 2:10 PM, Lahiru Gunathilake <
> glahiru@gmail.com
> > >> >wrote:
> > >>
> > >> > Hi Thilina,
> > >> >
> > >> > Yes if we put it in to a separate module or to distribution we can
> > build
> > >> > the
> > >> > samples and but it in to bin directory of each sample and ship the
> > jars
> > >> > too.
> > >> > This will be useful if some user wants the jars and want to run it
> > >> without
> > >> > using ant.
> > >> >
> > >> > Regards
> > >> > Lahiru
> > >> >
> > >> > On Wed, Jul 27, 2011 at 12:45 PM, Thilina Gunarathne <
> > csethil@gmail.com
> > >> > >wrote:
> > >> >
> > >> > > How about a separate samples module?  Also we need to make sure
> > >> samples
> > >> > are
> > >> > > part of the build, so that they won't be broken (at least no
> compile
> > >> > > errors)..
> > >> > >
> > >> > > thanks,
> > >> > > Thilina
> > >> > >
> > >> > > On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <
> > >> glahiru@gmail.com>
> > >> > > wrote:
> > >> > > > Hi Alek,
> > >> > > >
> > >> > > > I am +1 to compile the samples and put the jar in to a lib
> > directory
> > >> > for
> > >> > > > each sample, at that point we can get to know during the build
> > time
> > >> > > weather
> > >> > > > there are issue in samples (But in practical case people will
> not
> > >> use
> > >> > > those
> > >> > > > jar files, they will simply run the ant script in sample
> > directory).
> > >> > > >
> > >> > > > My suggestion is to put these samples in to distributions
> > directory
> > >> > > rather
> > >> > > > keeping them in each modules directories. With current model
> it's
> > >> not
> > >> > > nice
> > >> > > > to keep another set of java files outside src directory in each
> > >> > > component.
> > >> > > >
> > >> > > > Regards
> > >> > > > Lahiru
> > >> > > >
> > >> > > > On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <
> > >> > aslom@apache.org
> > >> > > >wrote:
> > >> > > >
> > >> > > >> I think  they should be setup so they are compiled. I do not
> knwo
> > >> > maven
> > >> > > but
> > >> > > >> in eclipse youc an specify multiple source directories and that
> > >> shoudl
> > >> > > >> allow
> > >> > > >> to compile and run samples.
> > >> > > >>
> > >> > > >> Is there the same problem for unit tests?
> > >> > > >>
> > >> > > >> Alek
> > >> > > >>
> > >> > > >> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <
> > >> > glahiru@gmail.com
> > >> > > >> >wrote:
> > >> > > >>
> > >> > > >> > Hi Devs,
> > >> > > >> >
> > >> > > >> > I have seen that samples in ws-messenger is scattered and
> they
> > >> are
> > >> > in
> > >> > > >> each
> > >> > > >> > module, when you import the code in to an IDE its not under
> > >> > > src/main/java
> > >> > > >> > directory so they do not looks like java class files.
> Normally
> > >> they
> > >> > > are
> > >> > > >> not
> > >> > > >> > compiled during the build time, users have to compile them
> and
> > >> run
> > >> > > them
> > >> > > >> > with
> > >> > > >> > the distribution then it works out of the box. So I keeping
> > them
> > >> in
> > >> > > >> > distribution directory (all the samples for all the modules),
> > so
> > >> if
> > >> > > >> someone
> > >> > > >> > wants to look in to samples and do a modification, they can
> > >> simply
> > >> > > open
> > >> > > >> the
> > >> > > >> > samples and do that.
> > >> > > >> >
> > >> > > >> > I have seen this in other projects and they are always keep
> the
> > >> > > samples
> > >> > > >> > with
> > >> > > >> > the distribution.
> > >> > > >> >
> > >> > > >> > WDYT ?
> > >> > > >> >
> > >> > > >> > Regards
> > >> > > >> > Lahiru
> > >> > > >> >
> > >> > > >>
> > >> > > >
> > >> > >
> > >> > >
> > >> > >
> > >> > > --
> > >> > > https://www.cs.indiana.edu/~tgunarat/
> > >> > > http://www.linkedin.com/in/thilina
> > >> > > http://thilina.gunarathne.org
> > >> > >
> > >> >
> > >>
> > >
> > >
> >
>

Re: Keeping samples in distribution rather keeping them in each module

Posted by Aleksander Slominski <as...@apache.org>.
Lot of samll smamples are just demonstrating module and use of its API.

I definitely see the need for samples (or use cases) module that has code
demonstrating use of multiple modules.

Thanks,

Alek

On Wed, Jul 27, 2011 at 4:38 PM, Lahiru Gunathilake <gl...@gmail.com>wrote:

> On Wed, Jul 27, 2011 at 4:36 PM, Lahiru Gunathilake <glahiru@gmail.com
> >wrote:
>
> > How about having like this,
> >
> > <parent directory or distribution>
> > samples
> >    - msgBox
> >          - sample name
> >
> >    - msgBroker
> >          - sample name
> >
>
> Or we can simply keep the sample name which make sense for users, I do not
> think there is a hard requirement of having these under module names.
>
> Regards
> Lahiru
>
> >
> > this way I do not think users will get confuse, I think this is cleaner
> > compare to keep code, tests and samples in a module. Even though we can
> > define sample based on the module (ex:samples for msgBroker and msgBox)
> > there can be samples which we cannot put in to particular module (there
> can
> > be samples which consume number of modules) in that case putting samples
> in
> > to a module is not correct as per my understanding.
> >
> > so my argument is samples are not directly belong to a module and we need
> > to separate it out from msgBroker and msgBox code.
> >
> > Regards
> > Lahiru
> >
> >
> > On Wed, Jul 27, 2011 at 3:59 PM, Aleksander Slominski <aslom@apache.org
> >wrote:
> >
> >> Will it not be a bit confusing to have samples for different components
> >> int
> >> one place?
> >>
> >> Alek
> >>
> >> On Wed, Jul 27, 2011 at 2:10 PM, Lahiru Gunathilake <glahiru@gmail.com
> >> >wrote:
> >>
> >> > Hi Thilina,
> >> >
> >> > Yes if we put it in to a separate module or to distribution we can
> build
> >> > the
> >> > samples and but it in to bin directory of each sample and ship the
> jars
> >> > too.
> >> > This will be useful if some user wants the jars and want to run it
> >> without
> >> > using ant.
> >> >
> >> > Regards
> >> > Lahiru
> >> >
> >> > On Wed, Jul 27, 2011 at 12:45 PM, Thilina Gunarathne <
> csethil@gmail.com
> >> > >wrote:
> >> >
> >> > > How about a separate samples module?  Also we need to make sure
> >> samples
> >> > are
> >> > > part of the build, so that they won't be broken (at least no compile
> >> > > errors)..
> >> > >
> >> > > thanks,
> >> > > Thilina
> >> > >
> >> > > On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <
> >> glahiru@gmail.com>
> >> > > wrote:
> >> > > > Hi Alek,
> >> > > >
> >> > > > I am +1 to compile the samples and put the jar in to a lib
> directory
> >> > for
> >> > > > each sample, at that point we can get to know during the build
> time
> >> > > weather
> >> > > > there are issue in samples (But in practical case people will not
> >> use
> >> > > those
> >> > > > jar files, they will simply run the ant script in sample
> directory).
> >> > > >
> >> > > > My suggestion is to put these samples in to distributions
> directory
> >> > > rather
> >> > > > keeping them in each modules directories. With current model it's
> >> not
> >> > > nice
> >> > > > to keep another set of java files outside src directory in each
> >> > > component.
> >> > > >
> >> > > > Regards
> >> > > > Lahiru
> >> > > >
> >> > > > On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <
> >> > aslom@apache.org
> >> > > >wrote:
> >> > > >
> >> > > >> I think  they should be setup so they are compiled. I do not knwo
> >> > maven
> >> > > but
> >> > > >> in eclipse youc an specify multiple source directories and that
> >> shoudl
> >> > > >> allow
> >> > > >> to compile and run samples.
> >> > > >>
> >> > > >> Is there the same problem for unit tests?
> >> > > >>
> >> > > >> Alek
> >> > > >>
> >> > > >> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <
> >> > glahiru@gmail.com
> >> > > >> >wrote:
> >> > > >>
> >> > > >> > Hi Devs,
> >> > > >> >
> >> > > >> > I have seen that samples in ws-messenger is scattered and they
> >> are
> >> > in
> >> > > >> each
> >> > > >> > module, when you import the code in to an IDE its not under
> >> > > src/main/java
> >> > > >> > directory so they do not looks like java class files. Normally
> >> they
> >> > > are
> >> > > >> not
> >> > > >> > compiled during the build time, users have to compile them and
> >> run
> >> > > them
> >> > > >> > with
> >> > > >> > the distribution then it works out of the box. So I keeping
> them
> >> in
> >> > > >> > distribution directory (all the samples for all the modules),
> so
> >> if
> >> > > >> someone
> >> > > >> > wants to look in to samples and do a modification, they can
> >> simply
> >> > > open
> >> > > >> the
> >> > > >> > samples and do that.
> >> > > >> >
> >> > > >> > I have seen this in other projects and they are always keep the
> >> > > samples
> >> > > >> > with
> >> > > >> > the distribution.
> >> > > >> >
> >> > > >> > WDYT ?
> >> > > >> >
> >> > > >> > Regards
> >> > > >> > Lahiru
> >> > > >> >
> >> > > >>
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > https://www.cs.indiana.edu/~tgunarat/
> >> > > http://www.linkedin.com/in/thilina
> >> > > http://thilina.gunarathne.org
> >> > >
> >> >
> >>
> >
> >
>

Re: Keeping samples in distribution rather keeping them in each module

Posted by Lahiru Gunathilake <gl...@gmail.com>.
On Wed, Jul 27, 2011 at 4:36 PM, Lahiru Gunathilake <gl...@gmail.com>wrote:

> How about having like this,
>
> <parent directory or distribution>
> samples
>    - msgBox
>          - sample name
>
>    - msgBroker
>          - sample name
>

Or we can simply keep the sample name which make sense for users, I do not
think there is a hard requirement of having these under module names.

Regards
Lahiru

>
> this way I do not think users will get confuse, I think this is cleaner
> compare to keep code, tests and samples in a module. Even though we can
> define sample based on the module (ex:samples for msgBroker and msgBox)
> there can be samples which we cannot put in to particular module (there can
> be samples which consume number of modules) in that case putting samples in
> to a module is not correct as per my understanding.
>
> so my argument is samples are not directly belong to a module and we need
> to separate it out from msgBroker and msgBox code.
>
> Regards
> Lahiru
>
>
> On Wed, Jul 27, 2011 at 3:59 PM, Aleksander Slominski <as...@apache.org>wrote:
>
>> Will it not be a bit confusing to have samples for different components
>> int
>> one place?
>>
>> Alek
>>
>> On Wed, Jul 27, 2011 at 2:10 PM, Lahiru Gunathilake <glahiru@gmail.com
>> >wrote:
>>
>> > Hi Thilina,
>> >
>> > Yes if we put it in to a separate module or to distribution we can build
>> > the
>> > samples and but it in to bin directory of each sample and ship the jars
>> > too.
>> > This will be useful if some user wants the jars and want to run it
>> without
>> > using ant.
>> >
>> > Regards
>> > Lahiru
>> >
>> > On Wed, Jul 27, 2011 at 12:45 PM, Thilina Gunarathne <csethil@gmail.com
>> > >wrote:
>> >
>> > > How about a separate samples module?  Also we need to make sure
>> samples
>> > are
>> > > part of the build, so that they won't be broken (at least no compile
>> > > errors)..
>> > >
>> > > thanks,
>> > > Thilina
>> > >
>> > > On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <
>> glahiru@gmail.com>
>> > > wrote:
>> > > > Hi Alek,
>> > > >
>> > > > I am +1 to compile the samples and put the jar in to a lib directory
>> > for
>> > > > each sample, at that point we can get to know during the build time
>> > > weather
>> > > > there are issue in samples (But in practical case people will not
>> use
>> > > those
>> > > > jar files, they will simply run the ant script in sample directory).
>> > > >
>> > > > My suggestion is to put these samples in to distributions directory
>> > > rather
>> > > > keeping them in each modules directories. With current model it's
>> not
>> > > nice
>> > > > to keep another set of java files outside src directory in each
>> > > component.
>> > > >
>> > > > Regards
>> > > > Lahiru
>> > > >
>> > > > On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <
>> > aslom@apache.org
>> > > >wrote:
>> > > >
>> > > >> I think  they should be setup so they are compiled. I do not knwo
>> > maven
>> > > but
>> > > >> in eclipse youc an specify multiple source directories and that
>> shoudl
>> > > >> allow
>> > > >> to compile and run samples.
>> > > >>
>> > > >> Is there the same problem for unit tests?
>> > > >>
>> > > >> Alek
>> > > >>
>> > > >> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <
>> > glahiru@gmail.com
>> > > >> >wrote:
>> > > >>
>> > > >> > Hi Devs,
>> > > >> >
>> > > >> > I have seen that samples in ws-messenger is scattered and they
>> are
>> > in
>> > > >> each
>> > > >> > module, when you import the code in to an IDE its not under
>> > > src/main/java
>> > > >> > directory so they do not looks like java class files. Normally
>> they
>> > > are
>> > > >> not
>> > > >> > compiled during the build time, users have to compile them and
>> run
>> > > them
>> > > >> > with
>> > > >> > the distribution then it works out of the box. So I keeping them
>> in
>> > > >> > distribution directory (all the samples for all the modules), so
>> if
>> > > >> someone
>> > > >> > wants to look in to samples and do a modification, they can
>> simply
>> > > open
>> > > >> the
>> > > >> > samples and do that.
>> > > >> >
>> > > >> > I have seen this in other projects and they are always keep the
>> > > samples
>> > > >> > with
>> > > >> > the distribution.
>> > > >> >
>> > > >> > WDYT ?
>> > > >> >
>> > > >> > Regards
>> > > >> > Lahiru
>> > > >> >
>> > > >>
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > https://www.cs.indiana.edu/~tgunarat/
>> > > http://www.linkedin.com/in/thilina
>> > > http://thilina.gunarathne.org
>> > >
>> >
>>
>
>

Re: Keeping samples in distribution rather keeping them in each module

Posted by Lahiru Gunathilake <gl...@gmail.com>.
How about having like this,

<parent directory or distribution>
samples
   - msgBox
         - sample name

   - msgBroker
         - sample name

this way I do not think users will get confuse, I think this is cleaner
compare to keep code, tests and samples in a module. Even though we can
define sample based on the module (ex:samples for msgBroker and msgBox)
there can be samples which we cannot put in to particular module (there can
be samples which consume number of modules) in that case putting samples in
to a module is not correct as per my understanding.

so my argument is samples are not directly belong to a module and we need to
separate it out from msgBroker and msgBox code.

Regards
Lahiru

On Wed, Jul 27, 2011 at 3:59 PM, Aleksander Slominski <as...@apache.org>wrote:

> Will it not be a bit confusing to have samples for different components int
> one place?
>
> Alek
>
> On Wed, Jul 27, 2011 at 2:10 PM, Lahiru Gunathilake <glahiru@gmail.com
> >wrote:
>
> > Hi Thilina,
> >
> > Yes if we put it in to a separate module or to distribution we can build
> > the
> > samples and but it in to bin directory of each sample and ship the jars
> > too.
> > This will be useful if some user wants the jars and want to run it
> without
> > using ant.
> >
> > Regards
> > Lahiru
> >
> > On Wed, Jul 27, 2011 at 12:45 PM, Thilina Gunarathne <csethil@gmail.com
> > >wrote:
> >
> > > How about a separate samples module?  Also we need to make sure samples
> > are
> > > part of the build, so that they won't be broken (at least no compile
> > > errors)..
> > >
> > > thanks,
> > > Thilina
> > >
> > > On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <
> glahiru@gmail.com>
> > > wrote:
> > > > Hi Alek,
> > > >
> > > > I am +1 to compile the samples and put the jar in to a lib directory
> > for
> > > > each sample, at that point we can get to know during the build time
> > > weather
> > > > there are issue in samples (But in practical case people will not use
> > > those
> > > > jar files, they will simply run the ant script in sample directory).
> > > >
> > > > My suggestion is to put these samples in to distributions directory
> > > rather
> > > > keeping them in each modules directories. With current model it's not
> > > nice
> > > > to keep another set of java files outside src directory in each
> > > component.
> > > >
> > > > Regards
> > > > Lahiru
> > > >
> > > > On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <
> > aslom@apache.org
> > > >wrote:
> > > >
> > > >> I think  they should be setup so they are compiled. I do not knwo
> > maven
> > > but
> > > >> in eclipse youc an specify multiple source directories and that
> shoudl
> > > >> allow
> > > >> to compile and run samples.
> > > >>
> > > >> Is there the same problem for unit tests?
> > > >>
> > > >> Alek
> > > >>
> > > >> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <
> > glahiru@gmail.com
> > > >> >wrote:
> > > >>
> > > >> > Hi Devs,
> > > >> >
> > > >> > I have seen that samples in ws-messenger is scattered and they are
> > in
> > > >> each
> > > >> > module, when you import the code in to an IDE its not under
> > > src/main/java
> > > >> > directory so they do not looks like java class files. Normally
> they
> > > are
> > > >> not
> > > >> > compiled during the build time, users have to compile them and run
> > > them
> > > >> > with
> > > >> > the distribution then it works out of the box. So I keeping them
> in
> > > >> > distribution directory (all the samples for all the modules), so
> if
> > > >> someone
> > > >> > wants to look in to samples and do a modification, they can simply
> > > open
> > > >> the
> > > >> > samples and do that.
> > > >> >
> > > >> > I have seen this in other projects and they are always keep the
> > > samples
> > > >> > with
> > > >> > the distribution.
> > > >> >
> > > >> > WDYT ?
> > > >> >
> > > >> > Regards
> > > >> > Lahiru
> > > >> >
> > > >>
> > > >
> > >
> > >
> > >
> > > --
> > > https://www.cs.indiana.edu/~tgunarat/
> > > http://www.linkedin.com/in/thilina
> > > http://thilina.gunarathne.org
> > >
> >
>

Re: Keeping samples in distribution rather keeping them in each module

Posted by Aleksander Slominski <as...@apache.org>.
Will it not be a bit confusing to have samples for different components int
one place?

Alek

On Wed, Jul 27, 2011 at 2:10 PM, Lahiru Gunathilake <gl...@gmail.com>wrote:

> Hi Thilina,
>
> Yes if we put it in to a separate module or to distribution we can build
> the
> samples and but it in to bin directory of each sample and ship the jars
> too.
> This will be useful if some user wants the jars and want to run it without
> using ant.
>
> Regards
> Lahiru
>
> On Wed, Jul 27, 2011 at 12:45 PM, Thilina Gunarathne <csethil@gmail.com
> >wrote:
>
> > How about a separate samples module?  Also we need to make sure samples
> are
> > part of the build, so that they won't be broken (at least no compile
> > errors)..
> >
> > thanks,
> > Thilina
> >
> > On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <gl...@gmail.com>
> > wrote:
> > > Hi Alek,
> > >
> > > I am +1 to compile the samples and put the jar in to a lib directory
> for
> > > each sample, at that point we can get to know during the build time
> > weather
> > > there are issue in samples (But in practical case people will not use
> > those
> > > jar files, they will simply run the ant script in sample directory).
> > >
> > > My suggestion is to put these samples in to distributions directory
> > rather
> > > keeping them in each modules directories. With current model it's not
> > nice
> > > to keep another set of java files outside src directory in each
> > component.
> > >
> > > Regards
> > > Lahiru
> > >
> > > On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <
> aslom@apache.org
> > >wrote:
> > >
> > >> I think  they should be setup so they are compiled. I do not knwo
> maven
> > but
> > >> in eclipse youc an specify multiple source directories and that shoudl
> > >> allow
> > >> to compile and run samples.
> > >>
> > >> Is there the same problem for unit tests?
> > >>
> > >> Alek
> > >>
> > >> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <
> glahiru@gmail.com
> > >> >wrote:
> > >>
> > >> > Hi Devs,
> > >> >
> > >> > I have seen that samples in ws-messenger is scattered and they are
> in
> > >> each
> > >> > module, when you import the code in to an IDE its not under
> > src/main/java
> > >> > directory so they do not looks like java class files. Normally they
> > are
> > >> not
> > >> > compiled during the build time, users have to compile them and run
> > them
> > >> > with
> > >> > the distribution then it works out of the box. So I keeping them in
> > >> > distribution directory (all the samples for all the modules), so if
> > >> someone
> > >> > wants to look in to samples and do a modification, they can simply
> > open
> > >> the
> > >> > samples and do that.
> > >> >
> > >> > I have seen this in other projects and they are always keep the
> > samples
> > >> > with
> > >> > the distribution.
> > >> >
> > >> > WDYT ?
> > >> >
> > >> > Regards
> > >> > Lahiru
> > >> >
> > >>
> > >
> >
> >
> >
> > --
> > https://www.cs.indiana.edu/~tgunarat/
> > http://www.linkedin.com/in/thilina
> > http://thilina.gunarathne.org
> >
>

Re: Keeping samples in distribution rather keeping them in each module

Posted by Lahiru Gunathilake <gl...@gmail.com>.
Hi Thilina,

Yes if we put it in to a separate module or to distribution we can build the
samples and but it in to bin directory of each sample and ship the jars too.
This will be useful if some user wants the jars and want to run it without
using ant.

Regards
Lahiru

On Wed, Jul 27, 2011 at 12:45 PM, Thilina Gunarathne <cs...@gmail.com>wrote:

> How about a separate samples module?  Also we need to make sure samples are
> part of the build, so that they won't be broken (at least no compile
> errors)..
>
> thanks,
> Thilina
>
> On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <gl...@gmail.com>
> wrote:
> > Hi Alek,
> >
> > I am +1 to compile the samples and put the jar in to a lib directory for
> > each sample, at that point we can get to know during the build time
> weather
> > there are issue in samples (But in practical case people will not use
> those
> > jar files, they will simply run the ant script in sample directory).
> >
> > My suggestion is to put these samples in to distributions directory
> rather
> > keeping them in each modules directories. With current model it's not
> nice
> > to keep another set of java files outside src directory in each
> component.
> >
> > Regards
> > Lahiru
> >
> > On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <aslom@apache.org
> >wrote:
> >
> >> I think  they should be setup so they are compiled. I do not knwo maven
> but
> >> in eclipse youc an specify multiple source directories and that shoudl
> >> allow
> >> to compile and run samples.
> >>
> >> Is there the same problem for unit tests?
> >>
> >> Alek
> >>
> >> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <glahiru@gmail.com
> >> >wrote:
> >>
> >> > Hi Devs,
> >> >
> >> > I have seen that samples in ws-messenger is scattered and they are in
> >> each
> >> > module, when you import the code in to an IDE its not under
> src/main/java
> >> > directory so they do not looks like java class files. Normally they
> are
> >> not
> >> > compiled during the build time, users have to compile them and run
> them
> >> > with
> >> > the distribution then it works out of the box. So I keeping them in
> >> > distribution directory (all the samples for all the modules), so if
> >> someone
> >> > wants to look in to samples and do a modification, they can simply
> open
> >> the
> >> > samples and do that.
> >> >
> >> > I have seen this in other projects and they are always keep the
> samples
> >> > with
> >> > the distribution.
> >> >
> >> > WDYT ?
> >> >
> >> > Regards
> >> > Lahiru
> >> >
> >>
> >
>
>
>
> --
> https://www.cs.indiana.edu/~tgunarat/
> http://www.linkedin.com/in/thilina
> http://thilina.gunarathne.org
>

Re: Keeping samples in distribution rather keeping them in each module

Posted by Thilina Gunarathne <cs...@gmail.com>.
How about a separate samples module?  Also we need to make sure samples are
part of the build, so that they won't be broken (at least no compile
errors)..

thanks,
Thilina

On Wed, Jul 27, 2011 at 12:02 PM, Lahiru Gunathilake <gl...@gmail.com> wrote:
> Hi Alek,
>
> I am +1 to compile the samples and put the jar in to a lib directory for
> each sample, at that point we can get to know during the build time weather
> there are issue in samples (But in practical case people will not use those
> jar files, they will simply run the ant script in sample directory).
>
> My suggestion is to put these samples in to distributions directory rather
> keeping them in each modules directories. With current model it's not nice
> to keep another set of java files outside src directory in each component.
>
> Regards
> Lahiru
>
> On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <as...@apache.org>wrote:
>
>> I think  they should be setup so they are compiled. I do not knwo maven but
>> in eclipse youc an specify multiple source directories and that shoudl
>> allow
>> to compile and run samples.
>>
>> Is there the same problem for unit tests?
>>
>> Alek
>>
>> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <glahiru@gmail.com
>> >wrote:
>>
>> > Hi Devs,
>> >
>> > I have seen that samples in ws-messenger is scattered and they are in
>> each
>> > module, when you import the code in to an IDE its not under src/main/java
>> > directory so they do not looks like java class files. Normally they are
>> not
>> > compiled during the build time, users have to compile them and run them
>> > with
>> > the distribution then it works out of the box. So I keeping them in
>> > distribution directory (all the samples for all the modules), so if
>> someone
>> > wants to look in to samples and do a modification, they can simply open
>> the
>> > samples and do that.
>> >
>> > I have seen this in other projects and they are always keep the samples
>> > with
>> > the distribution.
>> >
>> > WDYT ?
>> >
>> > Regards
>> > Lahiru
>> >
>>
>



-- 
https://www.cs.indiana.edu/~tgunarat/
http://www.linkedin.com/in/thilina
http://thilina.gunarathne.org

Re: Keeping samples in distribution rather keeping them in each module

Posted by Lahiru Gunathilake <gl...@gmail.com>.
Hi Alek,

I am +1 to compile the samples and put the jar in to a lib directory for
each sample, at that point we can get to know during the build time weather
there are issue in samples (But in practical case people will not use those
jar files, they will simply run the ant script in sample directory).

My suggestion is to put these samples in to distributions directory rather
keeping them in each modules directories. With current model it's not nice
to keep another set of java files outside src directory in each component.

Regards
Lahiru

On Wed, Jul 27, 2011 at 11:42 AM, Aleksander Slominski <as...@apache.org>wrote:

> I think  they should be setup so they are compiled. I do not knwo maven but
> in eclipse youc an specify multiple source directories and that shoudl
> allow
> to compile and run samples.
>
> Is there the same problem for unit tests?
>
> Alek
>
> On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <glahiru@gmail.com
> >wrote:
>
> > Hi Devs,
> >
> > I have seen that samples in ws-messenger is scattered and they are in
> each
> > module, when you import the code in to an IDE its not under src/main/java
> > directory so they do not looks like java class files. Normally they are
> not
> > compiled during the build time, users have to compile them and run them
> > with
> > the distribution then it works out of the box. So I keeping them in
> > distribution directory (all the samples for all the modules), so if
> someone
> > wants to look in to samples and do a modification, they can simply open
> the
> > samples and do that.
> >
> > I have seen this in other projects and they are always keep the samples
> > with
> > the distribution.
> >
> > WDYT ?
> >
> > Regards
> > Lahiru
> >
>

Re: Keeping samples in distribution rather keeping them in each module

Posted by Aleksander Slominski <as...@apache.org>.
I think  they should be setup so they are compiled. I do not knwo maven but
in eclipse youc an specify multiple source directories and that shoudl allow
to compile and run samples.

Is there the same problem for unit tests?

Alek

On Wed, Jul 27, 2011 at 10:49 AM, Lahiru Gunathilake <gl...@gmail.com>wrote:

> Hi Devs,
>
> I have seen that samples in ws-messenger is scattered and they are in each
> module, when you import the code in to an IDE its not under src/main/java
> directory so they do not looks like java class files. Normally they are not
> compiled during the build time, users have to compile them and run them
> with
> the distribution then it works out of the box. So I keeping them in
> distribution directory (all the samples for all the modules), so if someone
> wants to look in to samples and do a modification, they can simply open the
> samples and do that.
>
> I have seen this in other projects and they are always keep the samples
> with
> the distribution.
>
> WDYT ?
>
> Regards
> Lahiru
>