Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos
1.
Drools5 Community Training
Sponsored by Plugtree
2. Module 5: Drools BLiP
Architectural Overview
Drools5 Community Training
version: 1.0-SNAPSHOT
Release Date: 03/16/2011
Under The Creative Common License
3. Module 5: Drools BLiP
Architectural Overview
Drools5 Community Training Course
by Mauricio "Salaboy" Salatino and
Esteban Aliverti 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/.
5. Drools Overview
● It was born as an Inference Engine
● More functionality was added on top of it
● A Platform was created to create applications
● The declarative approach provided helps us to share the
knowledge with non technical roles
● A Knowledge Driven Development Approach was proposed
to build applications on top of the platform
6. The Drools Project
● Open Source
● Apache Licensed
● Free to use
● Innovative approach
● Community Support
9. Drools Expert
● Drools Expert
○ Contains the Inference Engine
○ Pure Java
○ Provides a language to write declarative rules
○ Provides the APIs to interact with it
○ Environmental Agnostic (JSE, JEE, Spring)
○ Lightweight
10. jBPM5 == Drools Flow
● jBPM5 == Drools Flow
○ Provides Business Process Management features
○ Runs on top of the Rule Engine
○ Enable us with dynamic and declarative capabilities to
create smarter processes
11. Drools Fusion
● Drools Fusion
○ Enables the notion of time to the Rule Engine
○ Let us define our meaningful events in our domain
○ Defines 13 temporal operators to correlate and aggregate
stream of events
○ It operates in near real-time allowing us to react on
immediately to an ongoing situation
○ Takes advantage of the inference capabilities of the Rule
Engine
12. Drools Guvnor
● Drools Guvnor
○ Its a centralized Knowledge Repository
○ Allow us to store and manage our business knowledge
○ Tag, Categorize and Version our knowledge assets
○ Provides some UIs to manage our knowledge assets
13. Drools Artifacts
● Drools Artifacts
○ Lightweight Java Library
○ Gives us the flexibility to use it no matter the
environment
○ Allows us to define the best architecture for each specific
situation
14. Drools Architectural Goals
● Drools was designed and conceived for:
○ Express business knowledge declaratively
○ Integrate different solutions/applications using a
declarative approach
○ To provide an unified and knowledge driven
development approach
○ To provide a link of communication between business
people and technical people
○ To be non-intrusive
18. As A Service (Centralized)
● Drools As A Service (Centralized) Architecture
19. As A Service (Centralized)
● Drools As A Service (Centralized) Architecture
20. Stateful vs Stateless Services
● Stateful vs Stateless Services
○ You need to define the nature of your problems
○ Stateless situations are easy to manage
■ Replicate services in different nodes becomes trivial
■ Caches for data access can be used
○ Stateful situations give us more rich set of features
■ Require session data replication in different nodes
■ We need to analyze what happen if a session breaks
and how it affects to the overall application
21. Stateful Knowledge Services
● Stateful Knowledge Services
○ Enable us to have long running execution
○ We will be able to maintain contextual information to
work on
○ The inference process will much more richer
○ Business Processes can run without any problem
○ Events require a stateful environment to work
○ We need to use some kind of persistence mechanism if
we want to have fault tolerance
24. Emergency Service Application
● Emergency Service Application
○ Simulate a real world situation
○ Demonstrate the advantages of using business processes,
business rules and event processing all together
○ Download and Play:
■ https://github.com/Salaboy/emergency-service-
drools-app
26. Dynamic Content Selection
● Dynamic Content Selection Application
○ Proof of Concept to show Drools features
○ Demonstrate the information that we can capture from
the user interaction with different visual components
○ Demonstrate how we can create a simple to enable non
technical roles to define/validate what the application
needs to do in different situations
○ Demonstrate how we can react on different identified
situations
○ Download and Test:
■ https://github.com/Salaboy/smart-content-selection
28. Dynamic Content Selection
● Dynamic Content Selection Application
○ Drools will keep track of the status of our visual
components for each use
○ Drools will be listening events that will be generated
during the user interaction
○ Temporal rules will be defined to correlate the streams of
events generated by one or multiple users
29. Dynamic Content Selection
● Events Correlation for a Single User
○ Behavioral Event Stream
■ Navigation Events
■ Browsing Events
■ Component Interaction Events
○ Shopping Cart Event Stream
30. Dynamic Content Selection
● Events Correlation for a Multiple Users
○ Trends Analysis
■ More than X users selecting interacting with a
Product in the last 2 minutes
■ More than X users with similar products in their
shopping carts
■ More than X searches for a specific topic
31. Dynamic Content Selection
● Behavioral Event Stream
○ Page Navigation Events
■ Links Clicks, Search Events
○ Browsing Information Events
■ Analyzing a component information (Focus,
Scrolling, Resizing, etc)
■ Multi Focus Analysis (selection patterns)
○ Component Interaction Events
■ Changing the component state (submitting a form,
select a value that changes the state of the
component)
33. Dynamic Content Selection
● Use Cases for Single User
○ Single Focus Interest Period
■ Offer Discount
○ Multi Focus / Pattern Selection
■ Related Product Suggestion
○ Abandoned Shopping Cart
■ Warning
○ Checkout Shopping Cart Quickly
■ Related Product Offer
38. Related Links
● You can find more information, examples, tutorials and
more in:
○ Salaboy Blog
■ http://salaboy.wordpress.com
○ Esteban Blog
■ http://ilesteban.wordpress.com
○ Plug Tree Blog
■ http://www.plugtree.com