Forgot your password?
Java Books Media Programming Book Reviews IT Technology

Jess in Action 120

Posted by timothy
from the two-for-one dept.
Simon P. Chappell and Eric Kaun contributed reviews of Jess in Action, Ernest Friedman-Hill's introduction to Jess, a pure Java rule-based system developed at Sandia National Laboratories. Kaun writes "Jess in Action presents the Jess rule-based framework, and explores it through four meaty and well-chosen examples: a console tax forms advisor, a console PC repair assistant, a Swing HVAC controller, and a servlet-based purchasing agent. The examples vary greatly in their designs and styles of interaction between Jess and Java, and expose patterns in a concrete context. It's especially nice the way each example builds on the functionality of the one before, such as a text-based question/interview module that is extended into a Swing GUI." Chappell points out that the book's author is also Jess' creator, so he speaks from authority. Read on for both reviews.
Jess in Action
author Ernest Friedman-Hill
pages 480
publisher Manning Publications
rating 9
reviewer Simon P. Chappell, Eric Kaun
ISBN 1930110898
summary Introduces rules and declarative programming style using JESS.

Eric Kaun's review, continued

Jess in Action starts with an introduction to rule-based systems, goes through the basics of the Jess language, and then dives into the examples; the appendices include API references to both Jess functions and Jess's Java APIs, and numerous links and references are scattered throughout the book. If I have any complaint about the organization, it's that the book could have been even more example-driven, abandoning (or shortening) the chapter on syntax and basic functions and introducing them only when used in an example; the rest could have been left to the appendix of Jess functions.

The book is interesting and readable, but dense with concepts, so it contains only 388 pages of actual text, and 50 pages of appendices will take some (well-spent) time to get through. A second skimming impressed me anew with the richness of the material, and the productive way in which it's presented, so I recommend reading the book once to get the overall feel, and then going through it again with the working Jess command shell, editor, and command line in front of you. Or an IDE if you must. :-)

Jess itself consists of a rule language, a runtime engine which supports forward and limited backward-chaining, and APIs for integration with Java; there are many add-on tools for Jess, referenced throughout the book. As with most rules engines, rules are specified as declarative patterns, not procedural code.

Jess in Action is well worth your time and attention, at the least for its exploration of rules, and at most for presenting a strong, flexible platform to tackle what is probably one of the uglier parts of your development process: the sequencing and parameterization of business decisions. Although the list of Cons below is longer, they're just nit-picking; this is an excellent, entertaining, and productive read that will likely expand your programming horizons considerably.

  • Clearly, concisely, and entertainingly written for Java programmers of any background
  • A strong introduction to two important topics: rules and declarative programming style
  • Well-chosen and developed working examples, each with a different design style
  • The description of the author's unit test framework for rules in Appendix C is a nice touch
  • Early discussion of Jess syntax focuses too much on Java-like procedural style
  • More of a tutorial - not long enough to be a good reference (though that would probably require a detailed Jess Patterns book)
  • Discussions of development methodology and knowledge engineering are unnecessary, as they're covered better elsewhere and a short summary adds little to the book
  • There's no single list of rule and Jess-related links; references to tools and discussions are scattered throughout the book
  • There are no general references to rules and rule-based systems for theory and background

Simon P. Chappell's review

While part one of the book has two slim chapters to introduce rule-based systems to the casual reader, the rest of the book is a no-messing user guide, reference manual and tutorial on using Jess. If you want to learn about rule-based systems, this should not be your first book. If you know of rule-based systems and have decided to use Jess, then run, don't walk to the bookstore and purchase a copy of this book.

I liked the solid, yet gentle, progression through part two, where the basics of using Jess are explained. The explanations were clear and each concept was introduced in a sequence that built upon the previous concepts and information. For example, I had thought that rules were all you had to worry about in rules-based systems, but it turns out that because rules operate on facts, designing the representation of those facts is a pre-condition of designing rules. (Right, I know you knew that, but it was new to me! :-)

Parts three through six are complete case-studies of the application of Jess in increasingly complex applications. The examples are well-explained and the rationale for each step is discussed in sufficient detail to educate but not bore.

Part seven is a self-described 'grab bag' of stuff that didn't fit in any of the other parts of the book. This section spends some time looking at using XML with JESS, including markup languages for rules, and interfacing with Jess from EJBs and Application Servers.

Lastly, there's the fact that the author of the book is also the author of the software in question. Dr. Friedman-Hill obviously knows Jess better than anyone else in the world and this shows through in the way that he not only explains how to achieve activities in and with Jess, but he also takes time, here and there, to explain some of the design decisions and trade-offs in its creation.

You can purchase Jess in Action from Slashdot welcomes readers' book reviews -- to see your own review here, read the (recently updated) book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

Jess in Action

Comments Filter:
  • by Anonymous Coward on Monday November 03, 2003 @12:50PM (#7378233)
    3. What are the licensing issues surrounding Jess?
    Jess is and will always be available at no cost for academic use worldwide, with an appropriate license. Commercial users can purchase a Jess license by contacting Craig Smith at Sandia's Technology Transfer office (Telephone 925/294-3358; email: The licensing fees are negotiable and generally quite reasonable. You can also purchase an inexpensive "Home Office" license. Jess is not licensed under the GPL, the LPGL, the BSD license, or any other free software or open source license. Redistribution of the Jess source code under any free software or open source license is prohibited.

  • by Anonymous Coward on Monday November 03, 2003 @12:56PM (#7378276)
    The content of the book is good. I would agree with the reviews. If you're not familiar with rules engines or how RETE works, you're better off with a simpler book. From personal experience, the hardest part of using rules engines in a production environment is understanding how to use rules engines and the pros/cons of RETE. Rete was originally described by Forgy and has been proven in numerous academic and production systems.

    Rules technology is pretty powerful, but like everything else, you have to know what you're doing. The most common mistake is when a programmer tries to use rules engines in a procedural manner like VB. One area where rules engines are used in production systems is business process management, like processing insurance or handling loan approvals.

  • by Asmodeus (10868) on Monday November 03, 2003 @12:56PM (#7378277)
    Drools is another rete based rule engine with a java implementation. It has more flexible licencing.

  • by watchful.babbler (621535) on Monday November 03, 2003 @01:13PM (#7378411) Homepage Journal
    Should you wish an alternative to the commercially-licensed JESS, Stanford has its own Java Theorem Prover [], DAML-compliant and capable of handling forward- and backward-chained reasoning. Object code can be freely redistributed.
  • by arnasobr (134440) on Monday November 03, 2003 @01:54PM (#7378773)
    My favorite is Mandarax []. It's a Java-based backward chaining rule engine with excellent documentation. I've found it to be fast and extensible. And even better, it's LGPL!
  • by realfake (302363) on Monday November 03, 2003 @02:27PM (#7379085)
    Jess seems, at first glance, to be equally as redundant. Perhaps some of you could delve into the benefits of Jess, on my account? :) A rules engine like Jess or CLIPS allows you to express a set of rules very economically, expressively, and readably. It's not right for everything, but in many situations it allows you to do things that would be practically impossible if you expressed the same thing as if/then/else statements in code. For example, in a situation where rules need to change frequently, it's great to be able to allow an expert user to edit the rules which can live somewhere outside the code. If you find yourself recompiling frequently to suit the fickle whims of a user who wants some kind of rule changed, a rules engine can be a huge time saver.
  • by taweili (111177) on Monday November 03, 2003 @03:03PM (#7379470)
    JEOPS is another pure Java rule engines available under LGPL. It can be found here []
  • by Mengoxon (303399) on Monday November 03, 2003 @03:22PM (#7379709) ystems.html
  • by AlXtreme (223728) on Monday November 03, 2003 @03:42PM (#7379931) Homepage Journal
    Trust me, you're not the only one

    A few months ago, we had to implement a rule-based system for our AI course, using Jess. Now, I'm all for CLISP-like syntax, but it's very annoying to actually get something working in Jess: the documentation on the site was incomplete and sketchy (had to discover how stuff worked the hard way, by breaking it) and also to me it seemed Jess wasn't even complete (defqueries were very messy, although using the java API should have proven better results. maybe). Our Mr. Friedman-Hill seemed to be too busy working on his book for the last 4/5 years and wasn't interested in developing something that actually was complete.

    In short, my opinion is: don't use it. There are far better alternatives for rule-based solutions, maybe not as the java API Jess is (although I havn't used drool either). It'll save you a real headache once you actually use the beast and need something working... then again, I might just be disillusionised, as I was hoping it to be far more useful...

    as always, my 2 eurocents

  • by sohp (22984) <(snewton) (at) (> on Monday November 03, 2003 @05:44PM (#7381268) Homepage
    Rules Engine Problems

    Rules engines at best are competent beginners in a limited, structured domain. Discovering and programming the rules is a process requiring a very significant investment of time and effort, including both technical and business experts. "more difficult and important is the twofold task of knowledge acquisition: finding articulate, self-analytical experts who know why they do things, and developing efficient techniques for extracting what they know and distilling it into rule bases. The essential prerequisite for building an expert system is to have an expert." [] In most cases, experts don't in fact use the rules that might be discovered by interview and reflection. Rules are always context free and cannot take into account the relevance of facts.

    Rules engines can't handle exceptions that are not programmed in. Rules engines apply their rules ceteris paribus, assuming that everything not accounted for in the rules is constant, when if fact the unaccounted-for variables may in fact be the important ones. Expert human collaboration and judgment is required to correct and update rules engine errors.

    The ongoing maintenance of rules is a significant effort and drain on resources. In a rapidly changing business, the value of the rules degrades rapidly without maintenance.

    Deskilling of workers is a significant risk in heavy reliance on rules engines. As more business expertise becomes embodied in the rules engine, the ability of the workers to understand the domain becomes less.

    Recommended readings include:

  • by Anonymous Coward on Monday November 03, 2003 @06:04PM (#7381457)
    From my experience, the one problem with Java Theorem Prover is that it doesn't allow for rules. It does reasoning only with properties defined by DAML/RDF. It's a nice piece of software but if you want to specify rules (complicated, or otherwise) you have to use some other system (Prolog, JESS, CLIPS, etc.)

    BTW, DAML is being replaced by OWL, a W3C standard.

  • by MCISheriff (721657) on Wednesday November 05, 2003 @09:12AM (#7395348)
    Although there are a number of posts that discuss how old rule based programming is, how hard it is to use, how out-dated, etc.; I totally disagree. Every language may have its purpose, so rule based programming isn't a solution for everything. I have never used JESS, but use CLIPS, which it is based upon. I find CLIPS to be an extremely useful system, very well thought out, and easy to extend. Our system is written in C++ and uses CLIPS to implement the business logic. The system has been in place for 7 years, is used globally, and several of the sites where it is used process over 100 million events a day. (So it can be used in "near-real time" systems. While compiled languages and rules-based-systems may be faster, CLIPS is easy to use, easy to change, and easy to debug. And as I said earlier, it is very easy to extend. We've been using it for 7 years and I've never regretted our decision to go with it. And while it may be an "old" language, it is very well supported and continues to be updated.

The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group.