Free Newsletters
Technology & Business Daily

InfoWorld
Log-in | Register
STRATEGIC DEVELOPER  

Tools for rules

Rules-based programming will either help us out or create a different kind of mess

By Jon Udell  
May 16, 2003
 

The dust was thick on my copy of the 1985 Clocksin and Mellish classic, Programming Prolog. But Ted Neward, author of the forthcoming book Effective Enterprise Java, brought it all rushing back: expert systems, declarative rules engines, predicate calculus, backward- vs. forward-chaining evaluation.

Free IT resource

Open Source Business Conference (OSBC) May 22-23, 2007

Sponsored by OSBC

Free IT resource

Virtualization Insights from Top Experts - Learn how virtualization gets real!

Sponsored by Dell

Neward gives an example on his Weblog why this obscure discipline is back in vogue. "If the guy filing the expense report files a 334-B form, then the upper limit on the total is twice his Personal Expense Liability total (which you get from the HR database, of course), unless his boss is an Assistant Vice President, in which case we have to get departmental approval from two managers and the AVP himself."

Today we program this stuff in procedural languages, and we make a hell of a mess doing so. Wouldn't it be great if we could declare a bunch of rules and have a rules engine work out the consequences? As Ted points out, this is the moral equivalent of using SQL to say what you want done with data not how.

Don't go hunting in the attic for your 5-1/4-inch Turbo Prolog floppy, though. Although Jess, a Java-based engine developed at Sandia Labs, has roots in both Lisp and Prolog, the emerging business-rules engines work with languages such as Java and C#, read XML-rule declarations, and are packaged for J2EE and/or .Net deployment.

I spent some time with two of these products: YASU Technologies' QuickRules (a commercial toolkit) and drools (the open source Java project that inspired Ted Neward'sblog posting). They differ in interesting ways. QuickRules provides a GUI rules editor that writes the XML rule definitions for you. But those definitions can only refer to Java or .Net classes; they don't use Java or C# directly to express tests and actions. With drools, you hand-edit the XML rule definitions. The tests and actions can not only refer to Java, they can also be written in Java or, happily, in Python.

These differences are only superficial, though. In fact, these products feel remarkably similar. And they will seem alien to most programmers, just as XSLT (eXtensibleStylesheet Language Transformation) and SQL did until we got used to them. In the declarative realm, the engine that runs your code has a mind of its own. You can try, for example, to pretend that XSLT is a procedural language, but a transformation that does not embrace the match-and-apply paradigm is running the engine on one cylinder. At the end of the day, you have to learn how the engine thinks.

Rules debuggers, such as the one provided by Ilog'sJRules will be essential (see "Working by the rules"). In my experiments with QuickRules and drools, even the simplest rulesets produced complex behavior. A test is evaluated, it triggers an action, the fact database is updated, and a new round of test evaluation begins. All this proceeds automatically and can take an unpredictable number of rounds to settle.

Tools will help us visualize that otherwise-hidden activity. But it's going to take a long while for programmers -- never mind business analysts -- to internalize the model. Now's the time to start. In Prolog's heyday, rules engines spent a lot of time solving old chestnuts such as the Tower of Hanoi puzzle. Business objects and processes weren't represented in ways that made them accessible to automatic reasoning. Thanks to the Web services movement, that's changing big time.

Will rules-based programming just create a different kind of mess? I doubt anyone really knows, but I'm glad we're gearing up to do the experiment. Sooner or later, something like this has to work.





 


 
Jon Udell is lead analyst and blogger in chief at the InfoWorld Test Center.

  More of Jon Udell's column
  Jon Udell's Weblog

Newsletter Check out all of our free newsletters!
Enter e-mail address:




 

TOP NEWS:


»  RIM's BlackBerry Bold beats Apple to the 3G punch
The well-connected BlackBerry Bold 9000 supports tri-band HSDPA and quad-band EDGE, 802.11a/b/g Wi-Fi, stereo Bluetooth, and both assisted and autonomous GPS

»  Can Sun rejuvenate Java?
Promised technologies begin to emerge that could finally make JavaFX a more serious competitor to Flex, Silverlight, and scripting

»  Rich Web development: Is the browser doomed?
The Web is evolving into a full-fledged app-delivery platform, calling into question the browser's ability to fulfill the needs of today's rich Internet apps

»  You don't know tech: The InfoWorld news quiz
Match your weekly tech news wits against our snarky quiz master

»  Spinning off fabs would be risky for AMD, analysts say
AMD has expressed a desire to control chip-manufacturing costs, which has created speculation that the company might sell off its chip fabrication plants

»  Hackers find a new place to hide rootkits
A pair of security researchers has developed a new kind of rootkit, called an SSM, that hides in an obscure part of the processor that is invisible to antivirus apps




BRINGING PERFORMANCE VALIDATION "INTO THE LIFECYCLE"
Today's enterprise apps are complex and ever-changing, which makes delivering high performance difficult. By virtualizing the behavior of application services and data in a VSE, teams can answer this challenge with validation best practices and test tools to ensure solid performance throughout the lifecycle. Register now to attend this webcast! Sponsor: ITKO

»  Click here to view this Webcast
  The Data Protection You've Been Looking For
Enterprise data is of supreme importance. If you can't find it quickly, it's worthless. If you lose it, it's a crisis. This IT Strategy Guide explores how to keep your data safe.

»  Click here to download now

- Special Advertising Partners -
WHITE PAPERS
 
  • Virtually Limitless Virtual Storage - Do you need virtualization space savings of 50% or more with virtually no performance impact? You might be able to get storage...
  • Invisible IT? - The goal of IT is to become an invisible entity within a larger organization. Eliminating visibility and road blocks IT ...
  • It Really Is Easy to be Green - "Green IT" is a popular concept. And IT organizations are learning the influence that IT purchase decisions have on data...
  • Key Strategies For SOA Testing - SOA requires a unique approach to testing. Unless you're willing to reorient your testing procedures and technology now,...
  • Eliminate Botnet Security Risks - Botnets are widely regarded as the top threat to network security. This Whitepaper explains how botnets have traditionally...
  • Zero Day Protection For Your Network - Zero day attacks are a growing threat because they pass undetected through conventional signature-based defenses. Rather...

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
INFOWORLD MARKETPLACE
 
» BUY A LINK NOW
 

FIND PRODUCTS AND COMPANIES
» COMPLETE PRODUCT GUIDE



TECHNOLOGY INDEX
• Applications
• Application Development
• Security
• Networking
• Wireless
• Platforms
• Hardware
• Data Management
• Storage
• Web Services
• Business
• Telecom
• Professional Services
• Standards

TECH WATCH 


What's the 411 on GOOG-411?
Just as Google has become synonymous with "performing a Web search," 411 is understood to mean "information" -- as in "what's the 411?" I was thus surprised to discover, from a billboard, no less, that the king of search is taking on the ...

Apple HTML source reveals 'iPhone Extreme'
"This one's a stretch..." reports AppleInsider. Um, yeah. Reporting on HTML code sightings of product names could be called a stretch, but iPhone Extreme has a ring to it. Now, that sounds like the product Apple should have released first, rather ...

COLUMNISTS

Unified under law
Ephraim Schwartz's Column and Blog (InfoWorld) - In the litigious world we live in, deploying a unified communications platform in your enterprise could...
» MORE COLUMNISTS

MORE INFOWORLD BLOGS


Open Sources 
Product Management
When I joined MySQL four years ago, there was quite a lot of debate about product management. We didn't actually have ...

Zero Day 
Botnet herders tending smaller flocks
New research backs up the theory that botnet operators are keeping their networks smaller in a continued effort to keep ...



• Advice Line
• Database Underground
• The Deep End
• Enterprise Mac
• Geeks in Paradise
• Grid Meter
• The Gripe Line
• InfoWorld Daily
• Inside IT
• IT Troubleshooter
• ITXtreme
• Open Sources
• ProdBlog
• Real World SOA
• Reality Check
• Security Adviser
• SMB IT
• The Storage Network
• Tech Watch
• Virtualization Report
• Zero Day

ADVERTISEMENT


RESOURCE CENTERadvertisement 

GOVERNMENT IT & POLICY
'If you don't go after the network, you're never going to stop these guys. Never.'
From the State Department, All the News for Inquiring Minds
TechPresident, the Internet Citizenry's New Consensus Taker



Sponsored Technology Links

 
 
 HOME  NEWS  BLOGS  PODCASTS  VIDEOS  TECHNOLOGIES  TEST CENTER  EVENTS  CAREERS  IT EXEC-CONNECT   About | Advertise | Awards | RSS | Contact Us 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy, Terms of Service.
All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses,
phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

CIO :: ComputerWorld :: CSO :: Demo :: GamePro :: Games.net :: IDG Connect :: IDG World Expo
Industry Standard :: IT World :: JavaWorld :: LinuxWorld :: MacUser :: Macworld :: Network World :: PC World :: Playlist