26 May 2011, 12:26pm
Work:
by

leave a comment

  • Running CouchDB-Lucene On Tomcat

    As of the time of writing, CouchDB-Lucene (v0.6.0) distribution was bundled with Jetty WebServer and runnable from command line. But if you dive a little bit into the code, you’ll find that the run script basically executes com.github.rnewson.couchdb.lucene.Main, which in turn (1) reads the couchdb-lucene.ini config, (2) creates a Jetty Server, and (3) sets up com.github.rnewson.couchdb.lucene.LuceneServlet on the server.

    At work, we had to use Tomcat due to SOE reason, so I spent a bit of time trying to get CouchDB-Lucene running on Tomcat and get it deployed as a .war file. Here’s how we did it, please note that this is the tedious way of doing it, all because I had to integrate CouchDB-Lucene into an existing web app. There’s an easier way to build a .war file mentioned at the end of this post.

    1. Unpack couchdb-lucene-<version>.zip .
    2. Create a standard web app directory structure with WEB-INF dir.
    3. Configure LuceneServlet in your-app/WEB-INF/web.xml .
      <web-app>
      ...
      <servlet>
      <servlet-name>lucene</servlet-name>
      <servlet-class>com.github.rnewson.couchdb.lucene.LuceneServlet</servlet-class>
      </servlet>
      ...
      <servlet-mapping>
      <servlet-name>lucene</servlet-name>
      <url-pattern>/</url-pattern>
      </servlet-mapping>
      ...
      </web-app>
    4. Copy all jars from couchdb-lucene-<version>/lib/ to your-app/WEB-INF/lib/ . The jetty-*.jar files can be excluded.
    5. Copy couchdb-lucene-<version>/conf/couchdb-lucene.ini and couchdb-lucene-<version>/conf/log4j.xml to your-app/WEB-INF/classes/ .
    6. Deploy your-app on Tomcat.
    7. Configure the CouchDB external process hook script with the host name and port number where Tomcat is listening on.

    There was one catch though, LuceneServlet did not have any no-argument constructor for the web.xml configuration, so that’s one of the changes I had to make. The other change was some file reorganisation so that you can use mvn war:war to generate a target/couchdb-lucene-<version>.war file. Too easy!

    I’ll submit a pull request to master later, but in the mean time you can clone my fork to get the patched LuceneServlet and to easily generate the .war file.

    Update (27/05/2011): It’s now part of couchdb-lucene master as of 0081272a30dc679effc1cf1298e365b953f568a5, should be included in v0.7.0 .

    15 May 2011, 7:37pm
    Projects:
    by

    leave a comment

  • Jenkins BuildMonitor – 20000 Downloads Later

    Yesterday, Jenkins BuildMonitor Firefox Add-on surpassed 20,000 downloads. I uploaded the first version on June 8th, 2008, so that’s almost 3 years ago, and there have been 26 releases since.

    On average, there are about 2500-2700 active daily users on weekdays. That became the basis of my release mantra: “Let’s not piss 2500 people off.”

    The top locales are en-US, de, en-GB, fr, ja, pl. We’ve got en, fr, and ja locales covered https://github.com/jenkinsci/firefox-extension-buildmonitor/tree/master/src/main/resources/firefox/chrome/locale. Any German or Polish translator around? please feel free to submit a pull request.

    While the top operating systems are Windows, Linux, Darwin, Solaris, FreeBSD.

    And as you know, this add-on is now named Jenkins BuildMonitor, though in practice it should still work with both Jenkins and Hudson just fine. As for the project management, I’m staying with the original Hudson – now Jenkins – community, source code on GitHub, mailing list on Google Groups, etc.

     

    Recent Posts

    Recent Comments

    • Cliffano Subagio: It does sound like something from Kelly, but it’s been a while since I read the book and I...
    • ben: I am trying to find & verify this quote of Kelly Johnson’s, (date, time, to whom and location) which...
    • Monty: Awesome post. I love what you have put out here. It is truly inspirational. I wish you continued success. I...
    • Cliffano Subagio: Good to hear about your opportunity to visit Japan, I’m sure you will have a great...
    • Kayla: I’m going to Japan for two week this summer. Our sister city is Tsubame, Japan and my school has an...

    Most Commented Posts

    Linkroll