views:

787

answers:

6

I was asked to make some drools traning for my teammates. Just to show them how it can be used and how usefull it may be. To do this training I first have to learn Drools, and I figured that the best way to learn it will be small project centered around drools.

Any interesting ideas?

My idea for this project was to do some webMethods flow files validation (just some example validations). I'd do validation only - we have in-house parser of that file format.

But something that actually does some work would be nice.

A: 

Why are you training them on a tool you don't even use? How are you planning on applying it? A contrived example is just that -- contrived. If you have a real need for the technology, then apply it to that domain. At a minimum this can act as a very rough proof of concept to see if the tech is even applicable to your system.

Will Hartung
We don't know this person's station in life -- maybe he's an underpaid technical writer who was still tasked with this project. I think this is an unhelpful answer.
nathaniel
Contrived examples can be great at showing a specific aspect of a technology, without wading through unrelated stuff that a real world example often requires.
Jim Barrows
+4  A: 

Actually, we have a drools based project, you could try to mimic that. :-)

Suppose you have incoming SMS messages arriving on an HTTP based protocol. An HTTP request contains the Anumber (telephone number of the sender) the Bnumber (telephone number of the recipient) and the text of the message.

Your goal is to use drools to route the messages, based on their content, to the appropriate services. You should have a set of rules, each rule stating something like: if the Bnumber is 1792 and the message text contains the keyword "VIDEO" then the message should be directed to the video providing service.

Actually, we use this exact setup, a drools based router which picks up messages from HTTP servlet threads and puts them to JMS queues based on their contents.

Would it be interesting for you to work on this program? :-)

Zizzencs
A: 

One example from a previous project:

You are trying to deliver a package and the way you want to deliver it is to use a number of transport companies. Each company will pick the package up at a depot and deliver it to another depot until it finally reaches its destination. Each company has a schedule that can be a weird combination of days and times. For example every Tuesday and Thursday except the 5th Tuesday and first Thursday of a month except on public holidays. Each trip between depots will take a given amount of time. Given a fixed route between depots how long will it take me to deliver this package given a starting time?

Peter Kelley
A: 

I'm gonna give you two real examples that my company is using right now. The company is one of the biggest e-commerce from Brazil.

  1. Drools is used to apply price promotions and discount over products while users just navigates inside the product's catalog. So, before rendering the response for the user browser, we have to apply promotions related to price, installment and freight.

  2. And while checking out the products, there are may promotions that can be applied due to the customer address region, state, age, sex, product amount, product amount per category, combined promotions, holidays, and so on. The application of each promotion affects the entire list of product, that requires a new rules application until the checkout gets a stable state.

It was really challenging but working very well. Drools is used in other contexts inside this company too.

paulosuzart
A: 

If you are trying to learn Drools there is also a pretty good book that has been published recently. It can be found at http://www.packtpub.com/drools-jboss-rules-5-0-developers-guide/book. I had already been using Drools for a while when it came out, but skimmed through it to learn some new concepts. Some of my teammates have also read the book and agreed it helped their understanding of the tool/application.

There are some short falls. The information isn't organized real well. You must read it from front to back or you're sure to miss some foundational concepts that will inhibit you're learning at later points. Also the example code can be a bit hard to work through. Overall though I would say it will help flatten your learning curve.

loyalBrown
A: 

The simplest thing would be to play a game, say cards. Poker might be a bit complex, but spades, old maid etc might be easier.

Jim Barrows