Hi,
 
Few weeks back I showed up here asking whether JESS is the right tool to use for a system which need to match 8000 commission schemes against 1 million sales record.
 
As part of my 'proof-of-concept' project to decide whether to use JESS to develop a new system, I am experimenting with 10000 sales records and few commission schemes (actualy 4 schemes which means 4 rules)
 
I did it in two ways by using embedding JESS into a simple JAVA program. (I am still newbee to Java and Jess. So pardon me for my primitive way of doing things)
 
1. Load 4 rules into JESS
2. read record by record from sales file (text tile)
       assert 1 sales fact for each record.
3. do a (run). so the rules will be fired and the sales record is matched against the rules. It may match 0..4 rules. If a sales record matches a rule, then that rule-id is stored in a slot in the sales record.
  
4. Save the sales record to oracle DB.
 
Steps 2,3,4 are looped 10000 times. Everything works well. 10000 records are inserted. In this case, file reading and writing into DB is done in JAVA
 
I thought, this should not be the way. 10000 (run)s?
 
So I changed the logic.
 
1. Load 4 rules
2. assert 10000 facts.
3. do a (run). So in one shot all records are matched against the rules.
4. Then run a (defquery) get all the sales data facts and put into database in JESS itself. I wrote a small user-function which accepts facts and then inserts the values into DB.
 
Here I face a problem. It inserts only 6000+ records. So I fired (facts) immediately after asserting 10000 facsts. I could see only 6000+ records. But I am sure the JAVA function asserts 10000 records.
 
Why is it so? Is there a limitation for number of facts in JESS?(very unlikely) Or is this is a limitation of the evaluation copy? I downloaded the evaluation copy from Manning website after I purchased the JIA eBook. Or am I doing something wrong?
 
thanks
 
 
 

Yahoo! Mobile
- Download the latest ringtones, games, and more!

Reply via email to