hi,<div>sure it all sounds fine.</div><div>So the main piece of work here will be cutting out many dependencies of the existing xmla servlet to the rest of the mondrian codebase.</div><div><br></div><div>I will have a go at it soon - no doubt I&#39;ll be in touch with more questions once I get started.</div>
<div><br></div><div>thanks,</div><div>Michele</div><div><br><br><div class="gmail_quote">On 11 March 2011 22:12, Julian Hyde <span dir="ltr">&lt;<a href="mailto:jhyde@pentaho.com">jhyde@pentaho.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



<div>
<div><span><font color="#000080" size="2" face="Lucida Sans">Let&#39;s keep it simple. The output of this project should be a 
library (a jar file), and one of the classes in that jar is a servlet. When the 
project is built it will push the jar into pentaho&#39;s repository, which is 
maven2-compatible.</font></span></div>
<div><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
<div><span><font color="#000080" size="2" face="Lucida Sans">Anyone who wants to package that jar into a war can do so, 
but in their own workspace. You can write your own maven project for that if you 
wish. </font></span></div>
<div><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
<div><span><font color="#000080" size="2" face="Lucida Sans">Right now that jar would consist of a subset of the classes 
in mondrian/classes. It&#39;s easy to build that jar by adding a few lines to 
mondrian&#39;s build.xml, or even using &#39;jar -cvf&#39; on the command 
line.</font></span></div>
<div><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
<div><span><font color="#000080" size="2" face="Lucida Sans">Julian</font></span></div><br>
<blockquote style="border-left:#000080 2px solid;padding-left:5px;margin-left:5px;margin-right:0px" dir="ltr">
  <div dir="ltr" lang="en-us" align="left">
  <hr>
  <font size="2" face="Tahoma"><div class="im"><b>From:</b> Michele Rossi 
  [mailto:<a href="mailto:michele.rossi@gmail.com" target="_blank">michele.rossi@gmail.com</a>] <br></div><b>Sent:</b> Friday, March 11, 2011 12:55 
  PM<br><b>To:</b> <a href="mailto:jhyde@pentaho.com" target="_blank">jhyde@pentaho.com</a><br><b>Cc:</b> 
  <a href="mailto:mondrian@pentaho.org" target="_blank">mondrian@pentaho.org</a><div><div></div><div class="h5"><br><b>Subject:</b> Re: [Mondrian] xmla over olap4j 
  server<br></div></div></font><br></div><div><div></div><div class="h5">
  <div></div>Hi Julian,
  <div>regarding the new xmla server project - I have only ever created web-apps 
  (.WAR) using  eclipse-level projects mirroring the folder 
  structure dictated by the servlet specification.</div>
  <div><br></div>
  <div>So you have a WEB-INF folder with a web.xml etc.</div>
  <div><br></div>
  <div>With such a layout Maven can create a WAR very easily.</div>
  <div><br></div>
  <div>I am sure that with Ant you can do all sorts of things, including 
  creating that structure dynamically with a bit of build.xml tricks.</div>
  <div>However  I am not sure about the best patterns to follow if we go 
  down that road.</div>
  <div>The end product is a standard WAR file that you can run in any servlet 
  container and point to any olap4j driver right? </div>
  <div><br></div>
  <div><br></div>
  <div>Patch files: sure, I assume it&#39;s something that the Perforce client can 
  do basing them on a changelist?</div>
  <div>I will look into it.</div>
  <div><br></div>
  <div>Use of Maven: building a convincing case will take me a while and I am 
  not sure a long email is the best way to share my points.</div>
  <div><br></div>
  <div>I recently gave a presentation at work about it and people were quite 
  convinced afterwards.</div>
  <div><br></div>
  <div>Let&#39;s just say that if you adopt Maven you get all sorts of good things 
  for free including </div>
  <div>-full eclipse integration</div>
  <div><br></div>
  <div>-automatic project-site generation with a variety of code quality reports 
  (test coverage is the one that impressed my boss most), </div>
  <div><br></div>
  <div>-integration with Sonar  (another advanced code quality analysis 
  tool)</div>
  <div><br></div>
  <div>-integration with TeamCity (automatic builds and test execution)</div>
  <div><br></div>
  <div>-entirely declarative build files (&quot;pom.xml&quot;) with no strange tricks - 
  much easier to mantain than ANT scripts (it&#39;s a personal opinion of course but 
  I think those build.xml files are evil - they seem easy to write and later you 
  find them totally impossible to maintain / debug)</div>
  <div><br></div>
  <div><br></div>
  <div>Michele<br><br>
  <div class="gmail_quote">On 11 March 2011 18:56, Julian Hyde <span dir="ltr">&lt;<a href="mailto:jhyde@pentaho.com" target="_blank">jhyde@pentaho.com</a>&gt;</span> wrote:<br>
  <blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
    <div>
    <div><font color="#000080" size="2" face="Lucida Sans"></font> </div><br>
    <blockquote style="border-left:#000080 2px solid;padding-left:5px;margin-left:5px;margin-right:0px" dir="ltr">
      <div dir="ltr" lang="en-us" align="left">
      <hr>
      <font size="2" face="Tahoma"><b>From:</b> Michele Rossi [mailto:<a href="mailto:michele.rossi@gmail.com" target="_blank">michele.rossi@gmail.com</a>] <br><b>Sent:</b> Friday, March 
      11, 2011 1:43 AM<br><b>To:</b> <a href="mailto:mondrian@pentaho.org" target="_blank">mondrian@pentaho.org</a>; <a href="mailto:jhyde@pentaho.com" target="_blank">jhyde@pentaho.com</a><br><b>Subject:</b> Re: [Mondrian] xmla 
      over olap4j server<br></font><br></div>
      <div>
      <div></div>[re-sending from my private email address as it&#39;s not working 
      from my work address] 
      <div><br>
      <blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
        <div class="gmail_quote"><br>
        <div class="gmail_quote"><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px">Julian, 

        <div>I have a few questions for you:</div>
        <div><br></div>
        <div>1. How do I get started?</div>
        <div>Can you create an account on perforce for me with write 
        permissions?<span><font color="#000080" size="2" face="Lucida Sans"> </font></span></div></span></div></div></blockquote></div></div></blockquote>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans">Please submit your changes as patches attached to jira 
    cases. We don&#39;t give people committer privileges until they have made a few 
    successful contributions. </font></span></div>
    <div>
    <blockquote style="border-left:#000080 2px solid;padding-left:5px;margin-left:5px;margin-right:0px" dir="ltr">
      <blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
        <div class="gmail_quote"><span> </span>2. Olap4j drillthrough</div>
        <div class="gmail_quote">The mondrian olap4j driver implements 
        drillthrough via the &quot;executeQuery&quot; method which returns a 
        java.sql.ResultSet right? </div>
        <div class="gmail_quote">Can we not leverage that method to implement 
        drillthrough on the xmla server?<span><font color="#000080" size="2" face="Lucida Sans"> </font></span></div></blockquote></blockquote></div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans">Possibly. Depends on your requirements. Mondrian&#39;s XMLA 
    clients expect more in the XMLA response than is currently available in the 
    ResultSet returned by that method. Therefore the XMLA server calls a method 
    in XmlaExtra. The default implementation of XmlaExtra calls executeQuery. 
    Same effect, longer route.</font></span></div>
    <div>
    <blockquote style="border-left:#000080 2px solid;padding-left:5px;margin-left:5px;margin-right:0px" dir="ltr">
      <blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
        <div class="gmail_quote"><span></span> </div><font color="#000080" size="2" face="Lucida Sans"></font></blockquote>
      <blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
        <div class="gmail_quote"><font color="#000080" size="2" face="Lucida Sans"></font><br></div>
        <div class="gmail_quote">3. The new project:</div>
        <div class="gmail_quote">We will need a new &quot;olap4j xmla server&quot; project 
        with its separate build an dependencies.</div>
        <div class="gmail_quote">Can you think of a good name for it?</div>
        <div class="gmail_quote">Perhaps Olap4jXmlaServer could be a good 
        candidate :)<span><font color="#000080" size="2" face="Lucida Sans"> </font></span></div></blockquote></blockquote></div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans">Sounds reasonable.</font></span></div>
    <div>
    <blockquote style="border-left:#000080 2px solid;padding-left:5px;margin-left:5px;margin-right:0px" dir="ltr">
      <blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
        <div class="gmail_quote">4. How to build the new project: </div>
        <div class="gmail_quote">I know that mondrian is built using Ant.</div>
        <div class="gmail_quote"><font color="#000080" size="2" face="Lucida Sans"></font><br></div>
        <div class="gmail_quote">Have you ever thought about starting to use 
        Maven?</div>
        <div class="gmail_quote">I&#39;ve used Maven successfully for years and I&#39;ve 
        totally forgot how to use ant.</div>
        <div class="gmail_quote"><font color="#000080" size="2" face="Lucida Sans"></font><br></div>
        <div class="gmail_quote">I think it would also be beneficial in terms of 
        linking olap4j releases with server releases.</div>
        <div class="gmail_quote">We could then distribute both olap4j, mondrian 
        and the xmla server on public maven repositories.<span><font color="#000080" size="2" face="Lucida Sans"> </font></span></div></blockquote></blockquote></div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans">At this point I don&#39;t want to create a new project. I 
    would like to work with the xmla server code in situ in the mondrian code 
    base, to learn what the necessary changes are, and where would be the 
    appropriate cut points. Then I will help you factor it into another project. 
    But first, let&#39;s get it working in situ.</font></span></div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans">Re. maven, see below.</font></span></div>
    <div>
    <blockquote style="border-left:#000080 2px solid;padding-left:5px;margin-left:5px;margin-right:0px" dir="ltr">
      <blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote"><font color="#000080" size="2" face="Lucida Sans"></font>
        <div class="gmail_quote"><font color="#000080" size="2" face="Lucida Sans"></font><font color="#000080" size="2" face="Lucida Sans"></font><font color="#000080" size="2" face="Lucida Sans"></font><font color="#000080" size="2" face="Lucida Sans"></font><font color="#000080" size="2" face="Lucida Sans"></font><font color="#000080" size="2" face="Lucida Sans"></font><br>
</div>
        <div class="gmail_quote">5. Proposed solution</div>
        <div class="gmail_quote">I can put together a webapp project quickly using 
        the following ingredients </div>
        <div class="gmail_quote"><font color="#000080" size="2" face="Lucida Sans"></font><br></div>
        <div class="gmail_quote">a. maven build</div>
        <div class="gmail_quote"><font color="#000080" size="2" face="Lucida Sans"></font><br></div>
        <div class="gmail_quote">b. unit tests based on mondrian: </div>
        <div class="gmail_quote">You create an in-process mondrian instance and 
        connect to it using the mondrian olap4j driver. </div>
        <div class="gmail_quote">Then you hit the new server using the olap4j xmla 
        driver. </div>
        <div class="gmail_quote">You can then compare results making assertions on 
        the equality of metadata and values.</div>
        <div class="gmail_quote"><font color="#000080" size="2" face="Lucida Sans"></font><br></div>
        <div class="gmail_quote">c. The output artifact would a standard .WAR 
        file </div>
        <div class="gmail_quote"><font color="#000080" size="2" face="Lucida Sans"></font><br></div>
        <div class="gmail_quote">d. Jetty launcher</div>
        <div class="gmail_quote">I propose the creation of a jetty launcher 
        too. </div>
        <div class="gmail_quote">I can create such launcher using maven reasonably 
        quickly. </div>
        <div class="gmail_quote">The result would be a tar.gz file with a number 
        of sub-folders, one of them containing the .war file discussed above, 
        others containing shared jetty libraries and finally the .bat and .sh 
        launchers.</div>
        <div class="gmail_quote"><font color="#000080" size="2" face="Lucida Sans"></font><br></div>
        <div class="gmail_quote">We could then have a &quot;cfg&quot; folder with a template 
        .properties file where a user would have to put the details of his/her 
        favourite olap4j driver and the connection details.<span><font color="#000080" size="2" face="Lucida Sans"> </font></span></div></blockquote></blockquote></div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans">All of the above sounds fine. In due course. But please, 
    don&#39;t make big changes as the first step. (I&#39;ve found that the most 
    successful committers are the ones who submit small patches at 
    first.)</font></span></div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans">In this case, the patches would be whatever hacks to 
    mondrian&#39;s xmla server are necessary to build your flavor of the server. I 
    will learn a lot from those patches.</font></span></div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans">When time comes to create the new project, we can discuss 
    using maven. You&#39;d have to make a strong case, because it would be a Pentaho 
    project (containing about 15k of mondrian source code, plus unit tests) and 
    Pentaho projects have standardized on using an ant+ivy+subfloor 
    infrastructure.</font></span></div>
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans"></font></span> </div><font color="#888888">
    <div dir="ltr" class="gmail_quote"><span><font color="#000080" size="2" face="Lucida Sans">Julian</font></span></div></font></div></blockquote></div><br></div></div></div></blockquote></div>
</blockquote></div><br></div>