drools5 community training module 5 drools blip architectural overview + demos

41
Drools5 Community Training Sponsored by Plugtree

Upload: salaboy-salaboy

Post on 05-Dec-2014

6.482 views

Category:

Technology


0 download

DESCRIPTION

For more information please visit: http://salaboy.wordpress.com/2011/02/23/drools-5-community-training-announced-roadmap/

TRANSCRIPT

Page 1: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

  

Drools5 Community Training Sponsored by Plugtree

Page 2: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Module 5: Drools BLiP Architectural Overview

Drools5 Community Trainingversion: 1.0-SNAPSHOT

Release Date: 03/16/2011Under The Creative Common License

Page 3: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Module 5: Drools BLiP Architectural OverviewDrools5 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/.

Page 4: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Agenda

● Drools Overview● Core Components

○ Drools Main Modules● Possible Architectures● Demos

Page 5: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 6: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

The Drools Project

● Open Source● Apache Licensed● Free to use● Innovative approach● Community Support

Page 7: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Drools Overview

● Drools Expert (Rule Engine)

● Drools Flow == jBPM5

● Drools Fusion

● Drools Guvnor

Page 8: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Drools Overview

Page 9: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 10: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 11: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 12: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 13: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 14: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 15: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Alternative Architectures

● Drools Alternative Architectures○ Embedded○ As a Service

Page 16: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Embedded

● Drools Embedded Architecture

Page 17: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Embedded -> Centralized Knowledge

● Drools Embedded Architecture, centralized Knowledge

Page 18: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

As A Service (Centralized)

● Drools As A Service (Centralized) Architecture

Page 19: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

As A Service (Centralized)

● Drools As A Service (Centralized) Architecture

Page 20: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 21: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 22: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Stateful Knowledge Services with Events

● Stateful Knowledge Services with Events

Page 23: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Demos

● Demos ○ Emergency Service Application○ Dynamic Content Selection PoC

Page 24: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 25: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Emergency Service Application

Page 26: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 27: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Dynamic Content Selection

Page 28: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 29: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Dynamic Content Selection

● Events Correlation for a Single User○ Behavioral Event Stream

■ Navigation Events■ Browsing Events■ Component Interaction Events

○ Shopping Cart Event Stream

Page 30: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 31: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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)

Page 32: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Dynamic Content Selection

● Shopping Cart Event Stream○ Add Product To Cart○ Remove Product From Cart○ Checkout Products○ Empty Cart

Page 33: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 34: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Dynamic Content Selection

● Single Focus Interest Period ○ Offer Discount

Page 35: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Dynamic Content Selection

● Multi Focus / Pattern Selection ○ Related Product Suggestion

Page 36: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Dynamic Content Selection

● Abandoned Shopping Cart ○ Warning

Page 37: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Dynamic Content Selection

● Checkout Shopping Cart Quickly ○ 10% Discount Voucher for future shops

Page 38: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

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

Page 39: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

  

Questions?

Page 40: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

Enjoy! Questions and Feedback are always appreciated!

Page 41: Drools5 Community Training Module 5 Drools BLIP Architectural Overview + Demos

  

Contact us atwww.plugtree.com