[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tuscany-dev
Subject:    Re: Command-line launcher, was: Re: svn commit: r737681 - /tuscany/java/sca/samples/build-common.xml
From:       "Raymond Feng" <enjoyjava () gmail ! com>
Date:       2009-01-30 18:02:10
Message-ID: AEE943C1077440819F89AFE380DC8449 () rfengt60p
[Download RAW message or body]

For c), you can look at the META-INF/MANIFEST.MF inside generated \
"features/equinox-manifest.jar". The classpath contains only the entries for the \
equinox launcher. To pass in the configuration (where are the bundles) to Equinox, \
use "-Dosgi.configuration.area=features/configuration".


From: ant elder 
Sent: Friday, January 30, 2009 9:50 AM
To: dev@tuscany.apache.org 
Subject: Re: Command-line launcher, was: Re: svn commit: r737681 - \
/tuscany/java/sca/samples/build-common.xml





On Fri, Jan 30, 2009 at 5:38 PM, Raymond Feng <enjoyjava@gmail.com> wrote:

  More comments inline.

  Thanks,
  Raymond


  From: ant elder 
  Sent: Friday, January 30, 2009 9:23 AM
  To: dev@tuscany.apache.org 
  Subject: Re: Command-line launcher, was: Re: svn commit: r737681 - \
/tuscany/java/sca/samples/build-common.xml





  On Fri, Jan 30, 2009 at 4:56 PM, Raymond Feng <enjoyjava@gmail.com> wrote:

    A few comments:

    1) Our distribution already contains the manifest.jar and equinox-manifest.jar:
        * manifest.jar has the Main-Class set to the node launcher and Class-Path set \
                to the required Tuscany modules and 3rd party jars
        * equinox-manifest.jar has the Mani-Class set to the equinox node launcher \
and Class-Path set to the dependent jars for the launcher itself without pulling \
other Tuscany modules and 3rd party jars which are bundles under OSGi. We also have \
the configuration generated to list the bundles. It can be pointed using \
-Dosgi.configuration.area (system property).

    I suggest that our tuscany.bat to leverage that instead of using the osgi.config \
and default.config which require manual maintenance and ** classpath drags \
unnecessary jars. 

    2) Let's use -<option> instead of positional arguments. For example,

    tuscany -osgi contrib

    3) We should allow the deployment composite to be used to launch the node, for \
example

    tuscany -composite <compositeURI> contrib1 contrib2 ... contribN

    The compositeURI can be a relative URI in one of the contribs or an absolute URI \
which points to an external composite file.

    4) Do we prefer to have multiple commands for different purposes or one command \
with different options?


  Some of those sounds really good, just to explain, there are two things that led to \
it being as it is right now. Firstly lots of ML discussion about runtimes, launching, \
and running samples where aspects of how this should work came up, without giving \
links to all the emails an OTTOMH summary is - to have a Tuscany persona, to remove \
the mystery about what happens,  to make it simple, intuitive and consistent, and to \
enable simple sample builds. The second reason its like this is to get something \
going quickly with minimum work as it wasn't obvious if eveyone agreed we wanted \
something like this. One other thing was to make the .bat/.sh scripts as simple as \
possible as they're hard to maintain.

  For (1) i'm nervous it makes it complicated and makes it hard to see whats going \
on. The current config file is simple and fairly intuitive so there is no mystery \
compared to digging around in a bat script to point to jars somewhere else which you \
then have to unzip and look in the manifest.

  <rfeng>I have a different take here for the following reasons:

  a) MANIFEST.MF is defined by the jar spec and "Main-Class" and "Class-Path" are \
standard headers  b) The manifest.jar and equinox-manifest.jar have the accurate set \
of classpath entries. And we also support the different configurations based on the \
distro, such as one for core, and one for web service. They are automatically \
generated by Tuscany and no manual steps are required.  c) The OSGi launcher should \
not pull in other Tuscany modules and 3rd party jars which are OSGi bundles. Having \
them on the launcher classpath is problematic.  d) Arguing about mystery, the \
launcher is already on the magical path anyway. I'm trying to avoid intuitive \
directory scanning in non-development mode.


Well it doesn't seem as magical or mysterious as the alternative to me, any newbie \
could look at the bat scripts and config files and likely understand what was going \
on. IMVHO we seem to over engineer and complicate so much in Tuscany, to a actual \
user running tuscany.bat would it really make any difference at all?  What ever, how \
about we wait till all the distribution, feature, and sample running discussions have \
got a bit more finalized so we know for sure if we need something like this launcher \
at all and if so exactly what it needs to do?

For (c) could you give a bit more detail? We can probably fix it just by adding some \
more to the config file.

   ...ant


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16788" name=GENERATOR></HEAD>
<BODY id=MailContainerBody 
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" 
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT face=Arial size=2>For c), you can look at the META-INF/MANIFEST.MF 
inside generated "features/equinox-manifest.jar". The classpath contains only 
the entries for the equinox launcher.&nbsp;To pass in the configuration (where 
are the bundles) to Equinox, use 
"-Dosgi.configuration.area=features/configuration".</FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=antelder@apache.org 
href="mailto:antelder@apache.org">ant elder</A> </DIV>
<DIV><B>Sent:</B> Friday, January 30, 2009 9:50 AM</DIV>
<DIV><B>To:</B> <A title=dev@tuscany.apache.org 
href="mailto:dev@tuscany.apache.org">dev@tuscany.apache.org</A> </DIV>
<DIV><B>Subject:</B> Re: Command-line launcher, was: Re: svn commit: r737681 - 
/tuscany/java/sca/samples/build-common.xml</DIV></DIV></DIV>
<DIV><BR></DIV><BR><BR>
<DIV class=gmail_quote>On Fri, Jan 30, 2009 at 5:38 PM, Raymond Feng <SPAN 
dir=ltr>&lt;<A 
href="mailto:enjoyjava@gmail.com">enjoyjava@gmail.com</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote 
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) \
1px solid">  <DIV style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" 
  name="Compose message area" bgcolor="#ffffff">
  <DIV><FONT face=Arial size=2>More comments inline.</FONT></DIV>
  <DIV 
  style="FONT: 10pt Tahoma; font-size-adjust: none; font-stretch: normal"><FONT 
  face=Arial></FONT>&nbsp;</DIV>
  <DIV 
  style="FONT: 10pt Tahoma; font-size-adjust: none; font-stretch: normal"><FONT 
  face=Arial>Thanks,</FONT></DIV>
  <DIV 
  style="FONT: 10pt Tahoma; font-size-adjust: none; font-stretch: normal"><FONT 
  face=Arial>Raymond</FONT></DIV>
  <DIV 
  style="FONT: 10pt Tahoma; font-size-adjust: none; font-stretch: normal"><BR></DIV>
  <DIV 
  style="BACKGROUND: rgb(245,245,245); FONT: 10pt Tahoma; font-size-adjust: none; \
font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: \
-moz-initial; -moz-background-inline-policy: -moz-initial">  <DIV><B>From:</B> <A 
  title="mailto:ant.elder@gmail.com&#13;&#10;CTRL + Click to follow link" 
  href="mailto:ant.elder@gmail.com" target=_blank>ant elder</A> </DIV>
  <DIV><B>Sent:</B> Friday, January 30, 2009 9:23 AM</DIV>
  <DIV class=Ih2E3d>
  <DIV><B>To:</B> <A 
  title="mailto:dev@tuscany.apache.org&#13;&#10;CTRL + Click to follow link" 
  href="mailto:dev@tuscany.apache.org" target=_blank>dev@tuscany.apache.org</A> 
  </DIV></DIV>
  <DIV><B>Subject:</B> Re: Command-line launcher, was: Re: svn commit: r737681 - 
  /tuscany/java/sca/samples/build-common.xml</DIV></DIV>
  <DIV><BR></DIV><BR><BR>
  <DIV class=gmail_quote>
  <DIV class=Ih2E3d>On Fri, Jan 30, 2009 at 4:56 PM, Raymond Feng <SPAN 
  dir=ltr>&lt;<A 
  title="mailto:enjoyjava@gmail.com&#13;&#10;CTRL + Click to follow link" 
  href="mailto:enjoyjava@gmail.com" 
  target=_blank>enjoyjava@gmail.com</A>&gt;</SPAN> wrote:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) \
1px solid">  <DIV style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" 
    name="Compose message area" bgcolor="#ffffff">
    <DIV><FONT face=Arial size=2>A few comments:</FONT></DIV>
    <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2>1) Our distribution already contains the 
    manifest.jar and equinox-manifest.jar:</FONT></DIV>
    <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; * manifest.jar has the 
    Main-Class set to the node launcher and Class-Path set to the required 
    Tuscany modules and 3rd party jars</FONT></DIV>
    <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; * equinox-manifest.jar has 
    the Mani-Class set to the equinox node launcher and Class-Path set to the 
    dependent jars for the launcher itself without pulling other Tuscany modules 
    and 3rd party jars which are bundles under OSGi. We also have the 
    configuration generated to list the bundles.&nbsp;It can be pointed using 
    -Dosgi.configuration.area (system property).</FONT></DIV>
    <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2>I suggest that our tuscany.bat to leverage that 
    instead of using the osgi.config and default.config which require manual 
    maintenance and ** classpath&nbsp;drags unnecessary jars. </FONT></DIV>
    <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2>2) Let's use -&lt;option&gt; instead of 
    positional arguments. For example,</FONT></DIV>
    <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2>tuscany -osgi contrib</FONT></DIV>
    <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2>3) We should allow the deployment composite to 
    be used to launch the node, for example</FONT></DIV>
    <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2>tuscany -composite &lt;compositeURI&gt; 
    contrib1 contrib2 ... contribN</FONT></DIV>
    <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2>The compositeURI can be a relative URI in one 
    of the contribs or an absolute URI which points to an external composite 
    file.</FONT></DIV>
    <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2>4) Do we prefer to have multiple commands for 
    different purposes or one command with different options?</FONT></DIV>
    <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></DIV></BLOCKQUOTE>
  <DIV><BR>Some of those sounds really good, just to explain, there are two 
  things that led to it being as it is right now. Firstly lots of ML discussion 
  about runtimes, launching, and running samples where aspects of how this 
  should work came up, without giving links to all the emails an OTTOMH summary 
  is - to have a Tuscany persona, to remove the mystery about what 
  happens,&nbsp; to make it simple, intuitive and consistent, and to enable 
  simple sample builds. The second reason its like this is to get something 
  going quickly with minimum work as it wasn't obvious if eveyone agreed we 
  wanted something like this. One other thing was to make the .bat/.sh scripts 
  as simple as possible as they're hard to maintain.<BR><BR>For (1) i'm nervous 
  it makes it complicated and makes it hard to see whats going on. The current 
  config file is simple and fairly intuitive so there is no mystery compared to 
  digging around in a bat script to point to jars somewhere else which you then 
  have to unzip and look in the manifest.</DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></DIV>
  <DIV><FONT color=#0000ff><FONT face=Arial size=2>&lt;rfeng&gt;</FONT><FONT 
  face=Arial size=2>I have a different take here for the following 
  reasons:</FONT></FONT></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial color=#0000ff size=2>a) MANIFEST.MF is defined by the 
  jar spec and "Main-Class" and "Class-Path" are standard headers</FONT></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2>b) The manifest.jar and 
  equinox-manifest.jar have the accurate set of classpath entries. And we also 
  support the different configurations based on the distro, such as one for 
  core, and one for web service. They are automatically generated by Tuscany and 
  no manual steps are required.</FONT></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2>c) The OSGi launcher should not 
  pull in other Tuscany modules and 3rd party jars which are OSGi bundles. 
  Having them on the launcher classpath is problematic.</FONT></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2>d) Arguing about mystery, the 
  launcher is already on the magical path anyway. I'm trying to avoid 
  intuitive&nbsp;directory scanning in non-development mode.</FONT></DIV>
  <DIV>&nbsp;</DIV><FONT face=Arial size=2></FONT><FONT face=Arial 
  size=2></FONT></DIV></DIV></BLOCKQUOTE>
<DIV><BR>Well it doesn't seem as magical or mysterious as the alternative to me, 
any newbie could look at the bat scripts and config files and likely understand 
what was going on. IMVHO we seem to over engineer and complicate so much in 
Tuscany, to a actual user running tuscany.bat would it really make any 
difference at all?&nbsp; What ever, how about we wait till all the distribution, 
feature, and sample running discussions have got a bit more finalized so we know 
for sure if we need something like this launcher at all and if so exactly what 
it needs to do?<BR><BR>For (c) could you give a bit more detail? We can probably 
fix it just by adding some more to the config file.<BR><BR>&nbsp;&nbsp; 
...ant<BR><BR></DIV>
<DIV>&nbsp;</DIV></DIV><BR></BODY></HTML>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic