<div dir="ltr">For another perspective, I can offer up one of my playgrounds that I was using to work out a problem not long ago. It closely fits a model I&#39;ve used for integration in the past and is using Fusion. I also use the Spring framework, as it just simplifies life at this level of integration. It&#39;s not perfect, but does have some abstractions and best practices I&#39;ve formed over the last few years. It&#39;s in Groovy and uses Gradle, but I think you&#39;ll be able to bridge the gap if you&#39;ve done much with Java. <div>
<br></div><div><a href="https://github.com/jeremyary/CEP_dynamicFactRetraction">https://github.com/jeremyary/CEP_dynamicFactRetraction</a><br></div><div><br></div><div style>- jary</div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Fri, Jan 18, 2013 at 9:06 AM, Stephen Masters <span dir="ltr">&lt;<a href="mailto:stephen.masters@me.com" target="_blank">stephen.masters@me.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 style="word-wrap:break-word"><div>I should warn you that it&#39;s a work in progress and the current version has very little Drools related code in it. Most of the Drools code is actually in the tests, where I have been prototyping things. The current piece of code in there is a validator which might as well be a stateless session, but I&#39;m also putting some code for a streaming trade aggregator into it. I have it in another side project at the moment, so it should hopefully be quick to add it this weekend. It&#39;s not using the time window queries of Fusion, but it is using a single session in stream mode, so that events can be inserted as they occur.</div>
<div><br></div><div>However, hopefully for now it provides a reasonable example of a web project structure and build, with Drools components. Keep an eye on the project over the next few days for some more meat on the bones! :)</div>
<div><br></div><div>Steve</div><div><div class="h5"><div><br></div><br><div><div>On 18 Jan 2013, at 14:14, Thomas Söhngen &lt;<a href="mailto:thomas.soehngen@stockpulse.de" target="_blank">thomas.soehngen@stockpulse.de</a>&gt; wrote:</div>
<br><blockquote type="cite">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Hi Steven,<br>
      <br>
      thank you very much for the code example, I&#39;ll take a deeper look
      at it. Are you using Fusion too? <br>
      <br>
      For our Drools project we need minimal logic for the application
      itself. We just need a database of rules and need to send streams
      of events to Fusion. When rules are matched, a message should be
      send to a pub/sub channel. This is all the logic we need for our
      application. <br>
      <br>
      We are currently not using any &quot;classic&quot; Java framework (like
      Spring etc.), but we are using a specialized framework for
      distributed realtime computation (Storm). I have no experience
      with the classic application frameworks and thats my biggest
      problem atm, because it&#39;s hard for me to find a good way to start
      with Drools without any EE application background. Your example
      seems to be a good starting point for this, so thank you again :)<br>
      <br>
      Best regards,<br>
      Thomas<br>
      <br>
      Am 1/18/2013 11:44 AM, schrieb Stephen Masters:<br>
    </div>
    <blockquote type="cite">
      
      Hi Thomas,
      <div><br>
      </div>
      <div>I don&#39;t know what frameworks you were thinking of using, but
        this might be a reasonable basic example of a Java web
        application with Drools components:</div>
      <div><a href="https://github.com/gratiartis/sctrcd-fx-web" target="_blank">https://github.com/gratiartis/sctrcd-fx-web</a></div>
      <div><br>
      </div>
      <div>It&#39;s something I have been knocking up as a minimal example
        project. As such, it&#39;s a work in progress, and the Drools
        functionality is *very* minimal. I&#39;m just at the stage where I&#39;m
        looking to make that part of the projects a little bit richer.</div>
      <div><br>
      </div>
      <div>It&#39;s built on Maven and the Spring Framework. As such you
        should be able to cd into the root of the project and run &quot;mvm
        jetty:run&quot; to run it up in a web container.</div>
      <div><br>
      </div>
      <div>My tip for getting your project up and running initially
        would be to ignore JBoss AS for now, and run your project up on
        Tomcat. It should reduce the complexity of your deployment, so
        you can concentrate on your application instead. At a later
        stage, you may find it worth moving to JBoss AS as your
        application server, in which case your app would be running up
        inside Tomcat anyway, so if your app works under Tomcat, there
        should be little or no change to migrate to JBoss AS.</div>
      <div><br>
      </div>
      <div>For your local dev purposes, this has the added benefit that
        maven can spawn a Tomcat container on the fly, so you don;t need
        to worry too much about server config.</div>
      <div><br>
      </div>
      <div>Steve</div>
      <div><br>
      </div>
      <div><br>
        <div>
          <div>On 17 Jan 2013, at 10:59, Thomas Söhngen &lt;<a href="mailto:thomas.soehngen@stockpulse.de" target="_blank">thomas.soehngen@stockpulse.de</a>&gt;
            wrote:</div>
          <br>
          <blockquote type="cite">
            
            <div text="#000000" bgcolor="#FFFFFF"> Hi,<br>
               I am currently evaluating Drools for our needs, from the
              features it seems to be a perfect fit. I am a Java
              developer, but unfortunately I have no background in
              enterprise application servers and I am currently stuck
              trying to setup a testing environment. A short summary of
              our current setup and how we want to use Drools:
              <ul>
                <li>We are using <a href="https://github.com/nathanmarz/storm" rel="nofollow" link="external" target="_blank">Storm</a>
                  to accumulate a large number of messages from around
                  the web</li>
                <li>From these we create streams of message metadata
                  (like sentiment) for different topics (like stocks) </li>
                <li>We have additional streams like stock-tickers</li>
                <li>We have a knowledge-base of additional facts about
                  companies (like market cap.) in MySQL</li>
                <li>We want users to be able to define alerts triggered
                  by rules based on these streams and facts</li>
              </ul>
              Storm is perfect for the data pre-processing and
              aggregation, Drools would fit in to allow outsiders to
              define rules and evaluate them on the streams in realtime.
              My idea is, to run Drools Fusion as a stand-alone
              application on a dedicated server or cluster of servers.
              Drools Guvnor would be used as an interface for the rules.
              The rules would trigger new events, which would be sent to
              a subscription channel (like Redis Pub/Sub). <br>
              <br>
              As mentioned above, I have no experience in setting up and
              running Java application servers. The Drools documentation
              seems to be very elaborate, but assume that you know how
              to start such a service from scratch, which I don&#39;t. I
              know Java, but not at an enterprise level, so all the
              Beans, wars, etc. are new to me. I setup a JBoss AS, which
              was a pretty easy thing to do, but I am clueless about how
              to really &quot;run&quot; Drools on it and what to do next. <br>
              <br>
              So what would be the next steps to get a server, where I
              can send messages to? Are there any tutorials or
              guidelines which describe how to built such a thing from
              the very beginning? Any help or suggestion would be very
              appreciated! <br>
              <br>
              Regards &amp; thanks in advance, <br>
              Thomas Söhngen </div>
            _______________________________________________<br>
            rules-users mailing list<br>
            <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
            <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre cols="72">-- 
Thomas Söhngen

Office: <a href="tel:%2B49%20221%20294%20975%2020" value="+4922129497520" target="_blank">+49 221 294 975 20</a>
Email: <a href="mailto:thomas.soehngen@stockpulse.de" target="_blank">thomas.soehngen@stockpulse.de</a>

<a href="http://www.stockpulse.de/" target="_blank">www.stockpulse.de</a>
<a href="http://www.facebook.com/stockpulse" target="_blank">www.facebook.com/stockpulse</a>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StockPulse UG (haftungsbeschränkt)
Sitz der Gesellschaft: Köln
Amtsgericht: Köln (HRB 145359)
Vertretungsberechtige Geschäftsführer: Stefan Nann, Jonas Krauss 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StockPulse UG (Limited Liability)
Registered Office: Cologne
District Court: Cologne HRB (145359)
Managing Director: Stefan Nann, Jonas Krauss 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</pre>
  </div>

_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br></div></div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br></div>