Upcoming SlideShare
×

# Drools5 Community Training module 4 RETE Algorithm Introduction

3,731
-1

Published on

2 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Hi Namrata,
There is no need to implement the RETE algorithm, Drools does for you. If you create rules in the DRL language the RETE tree will be automatically generated. For more info you can look at this post:
http://salaboy.com/2011/06/06/drools-reteoo-for-dummies-1-intro/

Are you sure you want to  Yes  No
• can anyone tell me how to implement rete in drl files ???

Are you sure you want to  Yes  No
Views
Total Views
3,731
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
137
2
Likes
2
Embeds 0
No embeds

No notes for slide

### Drools5 Community Training module 4 RETE Algorithm Introduction

1. 1.    Drools5 Community Training Rete Algorithm Introduction Sponsored by Plugtree
2. 2. Module 4: Drools Expert RETE Algorithm Drools5 Community Training version: 1.0-SNAPSHOT Release Date: 03/16/2011Under The Creative Common License
3. 3. Module 1: Drools Expert RETE Algorithm Drools5 Community Training Course by Mauricio "Salaboy" Salatino is licensed under a Creative Commons Attribution 3.0 Unported License.Based on a work at salaboy.wordpress. com. Permissions beyond the scope of this license may be available at http: //salaboy.wordpress.com/.
4. 4. Agenda● RETE Algorithm: ○ Introduction ○ Characteristics ○ Rules activation & firing ○ RETE network structure and nodes
5. 5. Agenda● Theoretical Background● Drools Business Logic Integration Platform Introduction ○ Drools Expert ○ jBPM5 / Drools Flow ○ Drools Fusion ○ Drools Guvnor
6. 6. RETE IntroductionThe RETE algorithm is an efficient pattern matchingalgorithm for implementing production rule systems
7. 7. RETE characteristics● Model the rules as a network with different node types● The node type will work as a filter● We will insert our facts inside this network● The facts will flow through the network only passing the nodes that they match● This network will sacrifice memory for performance
8. 8. RETE net structure
9. 9. Object Type Nodes● Filter facts based on their types
10. 10. Alpha network● Contains the alpha nodes● Filters facts based on single attributes
11. 11. Beta network● Contains the beta nodes also known as two input nodes● Represents the join relationships between different patterns● Song(genre == "Jazz") AND Artist(name == "John")
12. 12. Beta network● Song(genre == "Jazz", \$artist: artist) AND Artist(this == \$artist, name == "John")
13. 13. Facts match a Rule => Activation
14. 14.    Questions?
15. 15. Enjoy! Questions and Feedback arealways appreciated!