Your SlideShare is downloading. ×
0
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
2011-03-29 London - drools
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

2011-03-29 London - drools

3,636

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,636
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
231
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Mark Proctor Project Lead <ul><li>T he SkyNet funding bill is passed.
  • 2. The system goes online on August 4th, 1997.
  • 3. Human decisions are removed from strategic defense.
  • 4. SkyNet begins to learn at a geometric rate.
  • 5. It becomes self-aware at 2:14am Eastern time, August 29th
  • 6. In a panic, they try to pull the plug.
  • 7. And, Skynet fights back </li></ul>
  • 8. Agenda <ul><li>Open Source
  • 9. Community
  • 10. History
  • 11. Unified Concept
  • 12. Expert
  • 13. Quick Example
  • 14. Conditional Elements
  • 15. Truth Maintenance and Inference
  • 16. Fusion </li></ul>
  • 17. Open Source
  • 18. Business Model
  • 19. Free as in Free Speech <ul><li>Think of “free speech”, not “free beer” </li></ul>
  • 20. Cathedral & the Bazaar <ul><li>Published 1997 </li><ul><li>Cathedral </li><ul><li>GNU Emacs, GCC </li></ul><li>Bazaar </li><ul><li>Linux </li></ul></ul><li>19 guidelines </li><ul><li>Scratching an Itch
  • 21. Given Enough Eyeballs
  • 22. Release Early, Release Often </li></ul><li>Linus' Law </li><ul><li>&quot;given enough eyeballs, all bugs are shallow“ </li></ul><li>Convinced Netscape to OSS </li></ul>
  • 23. Open Source <ul><li>Light Weight Components
  • 24. Flexibility
  • 25. Control
  • 26. Academic / Engineering Bridge </li></ul>
  • 27. Motivations <ul><li>Fun
  • 28. Learning/Exploring
  • 29. Mastery
  • 30. Being part of Something
  • 31. Making a difference
  • 32. Scratching an itch </li></ul>RSA Animate – Drive: The surprising truth about what motivates us http://www.youtube.com/watch?v=u6XAPnuFjJc
  • 33. Risk <ul><li>Health of Project </li><ul><li>Mailing list, irc
  • 34. Code commits
  • 35. Number of Developers
  • 36. % of internal to external developers
  • 37. Commitment and health of commercial backers
  • 38. Availability </li></ul><li>Leaders or followers
  • 39. Professional services
  • 40. Hiring
  • 41. Continued education </li><ul><li>Books, events, blogs, articles </li></ul><li>Ecosystem, 3 rd parties and satellite communities </li></ul>
  • 42. Community
  • 43. Books <ul><li>Introduction to Expert Systems </li><ul><li>Peter Jackson </li></ul><li>Expert Systems, Principles and Programming </li><ul><li>Joseph C. Giarratano and Gary D. Riley </li></ul></ul>
  • 44. Oh And There are Drools Books Too
  • 45. Drools Research Network <ul><li>http://www.jboss.org/drools/research-network.html </li><ul><li>40+ Research related pages
  • 46. Many more as haven't updated </li></ul></ul>
  • 47. Community Collaboration <ul><li>40% of Drools work now done in the community </li><ul><li>US Navy Healthcare
  • 48. OSDE (Argentina's largest healthcare organisation)
  • 49. Intalio </li></ul></ul>
  • 50. Standards <ul><li>Part of the W3C RIF working group
  • 51. Director in RuleML group </li></ul>
  • 52. Sample Industries and Users <ul><li>Investment </li><ul><li>Millennium Investment Group (MIG) </li></ul><li>Logistics </li><ul><li>Fedex </li></ul><li>Airline </li><ul><li>Sabre </li></ul><li>Mortgage </li><ul><li>Franklin American </li></ul><li>Healthcare </li><ul><li>OSDE </li></ul></ul>
  • 53. Boot Camps <ul><li>San Francisco 2009 (40+ attendees) </li><ul><li>Sponsored by Third Pillar
  • 54. Sun, FAMC, OSDE, Kaseya, Fedex, TU Group, Intermountain Healthcare, Gap, Sony Pictures, Lockheed Martin, Kaiser, HP, Wells Fargo, US Navy Research, FOLIOfn, Boeing ..... </li></ul><li>San Diego 2010 (80+ attendess) </li><ul><li>Sponsored by US Navy
  • 55. 5 day event, with 2 days focus on the healthcare industry
  • 56. OSDE, AT&T, SAIC, US Navy Research, Kaiser, Clinica, Intermountain Healthcare, GE Healthcare, VA, Boeing, Nationwide .... </li></ul></ul>
  • 57. Communication <ul><li>User and Dev mailing lists
  • 58. IRC, Internet Relay Chat </li></ul>
  • 59. History
  • 60. It All Started Here Birth of CDSS 1970s 1980s Dendral Baobab Mycin Guidon Neomycin Teiresias Puff Emycin WM Sacon Centaur Wheeze Gravida Clot Oncocin
  • 61. Because Not Everyone Is As Smart As He Is
  • 62. Business Rules Engines 1980s 2010s 1990s 2000s OPS5 ART Clips Jess Drools 2 JRules Drools 3 Drools 4 Drools 5
  • 63. Drools History <ul><li>Drools 2 </li><ul><li>Rete like XML Scripting language </li></ul><li>Drools 3 </li><ul><li>Based on Clips functionality
  • 64. Iterative improves to JRules syntax with Clips functionality </li></ul><li>Drools 4 </li><ul><li>More declarative
  • 65. Basic functional programming feature with “from”
  • 66. Basic Rule Flow
  • 67. Basic BRMS </li></ul><li>Drools 5 </li><ul><li>Improved functional programming with 'accumulate'
  • 68. More Advanced Rule Flow integration
  • 69. Complex Event Process </li><ul><li>Temporal Comparators
  • 70. Sliding Time Windows </li></ul><li>Production ready BRMS </li></ul></ul>
  • 71. Unified Vision Behavioural Modelling
  • 72. Integrated Systems Semantic Ontologies Rules Event Processes Workflows Rules Workflows Event Processes Semantic Ontologies
  • 73. Integrated Systems <ul><li>EDM </li><ul><li>Enterprise Decision Management </li></ul><li>edBPM </li><ul><li>Event Driven BPM </li></ul><li>sBPM </li><ul><li>Semantic BPM
  • 74. Semantic Business Ontologies/Taxonomies </li></ul><li>EDA </li><ul><li>Event Driven Architectures
  • 75. Compliments SOA </li></ul></ul>
  • 76. Unified Vision “ A common platform to model and govern the business logic of the enterprise.”
  • 77. Unified Vision “ A common platform to model and govern the business logic of the enterprise.”
  • 78. Business Logic Lifecycle
  • 79. jBPM3 File file = new File (“.....”); // file to XML process definition ProcessDefinition processDefinition = ProcessDefinition.parseXmlString( IoUtils.FileToString( file ) ); ProcessInstance processInstance = new ProcessInstance(processDefinition); Jess Rete engine = new Rete(); FileReader file = new FileReader(&quot;myfile.clp&quot;); Jesp parser = new Jesp(file, engine); parser.parse(false); Esper EPServiceProvider epService = EPServiceProviderManager.getDefaultProvider(); EPStatement countStmt = admin.createEPL( &quot;....&quot; ); countStmt.start(); Knowledge API
  • 80. Drools Flow KnowledegBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBulider(); kbuilder.addResource( ResourceFactory.newClassPathResource( “myflow.bpmn2”, ResourceType.BPMN2 ); If ( kbuilder.hasErrors() ) { log.error( kbuilder.hasErrors().toString() ); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages( kbase.getKnowledgePackages() ); Knowledge API
  • 81. Drools Expert KnowledegBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBulider(); kbuilder.addResource( ResourceFactory.newClassPathResource( “myrules.drl”, ResourceType.DRL ); If ( kbuilder.hasErrors() ) { log.error( kbuilder.hasErrors().toString() ); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages( kbase.getKnowledgePackages() ); Knowledge API
  • 82. <drools:kbase id=&quot;kbase1&quot;> <drools:resource type=&quot;DRL&quot; source=&quot;classpath:.../testSpring.drl&quot; /> </drools:kbase> <drools:ksession id=&quot;ksession1&quot; type=&quot; stateless &quot; kbase =&quot;kbase1&quot; /> <drools:ksession id=&quot;ksession2&quot; type=&quot; stateful &quot; kbase =&quot;kbase1&quot;/> <camelContext id=&quot;camel&quot;> <route> <from uri=&quot;cxfrs://bean://rsServer&quot;/> <marshal ref=&quot;xstream&quot;/> <to uri=”drools:ksession1” /> <unmarshal ref=&quot;xstream&quot;/> </route> </camelContext> Declarative Services Spring XML and Camel
  • 83. Event Driven Architectures edBPM + EDM
  • 84. EDA <ul><li>Metaphor - In our body: </li><ul><li>SOA is used to build our muscles and organs
  • 85. EDA is used to build our sensory system </li></ul></ul>
  • 86. Rules and processes loosely coupled tightly coupled specific generic Decision Services Process Rules SCOPE COUPLING ?
  • 87. Key Characteristics <ul><li>Dynamic
  • 88. Flexible
  • 89. Adaptive </li></ul>
  • 90. Domain Overview
  • 91. Domain Overview
  • 92. Hybrid Logic Engine <ul><li>Production Rule Systems PRD (forward chaining) </li><ul><li>Reactive
  • 93. when Alarm( status == “alert” ) then send( “warning” ) </li></ul><li>Logic Programming LP (backward chaining) </li><ul><li>Query
  • 94. descendant( “mary”, “jane”) </li></ul><li>Functional Programming FP </li><ul><li>Map,Fold, Filter
  • 95. avg([12, 16, 4, 6]) </li><ul><li>Returns single value 9.5 </li></ul><li>round([10.3, 4.7, 7.8] ) </li><ul><li>Returns List [10, 5, 8] </li></ul></ul><li>Description Logic </li><ul><li>Person hasName String and livesAt Address </li></ul></ul>
  • 96. <ul><li>Production Rule Systems PRD (forward chaining FC) </li><ul><li>Drools 5.0, OPSJ ( hyrbid BC), ART( hyrbid BC) </li></ul><li>Logic Programming LP (backward chaining BC) </li><ul><li>target : Prolog (POSL Position Slotted Language)
  • 97. Drools Trunk has a prototype Prolog like query backward chaining capabilities. Stronger Polog like capabilities planned.
  • 98. Opportunistic BC planned. </li></ul><li>Functional Programming FP </li><ul><li>Lisp, Haskell
  • 99. Drools 5.0 has some functional capabilities
  • 100. Drools 5.1, 5.2 will be looking to have strong functional capabilities </li></ul></ul>Hybrid Logic Engine
  • 101. <ul><li>Description Logic DL </li><ul><li>KIF, OWL-DL
  • 102. Planned, See “The Future” </li></ul></ul>Hybrid Logic Engine
  • 103. The Future <ul><li>Full Hybrid Engine </li><ul><li>http://community.jboss.org/wiki/DroolsLanguageEnhancements </li></ul></ul><ul><li>Nested Objects
  • 104. Casting Nested Objects
  • 105. Positional Constraints
  • 106. POSL - Positional-Slotted Language
  • 107. Method Calls
  • 108. Maps and Arrays (Collections)
  • 109. Collections and XPath like filtering
  • 110. Free form Expressions
  • 111. Managed Object Graphs (MOGS)
  • 112. Nested Patterns and Queries
  • 113. Queries and Unification
  • 114. Ontologies and Relations via
  • 115. Query Based Backward Chaining with POSL </li></ul><ul><li>Triples with Hybrid POJO Graph Notation.
  • 116. Escapes for Dialects
  • 117. Accumulate Improvements to Support Haskell map/fold/filter and MVEL projection/fold
  • 118. Otherwise
  • 119. Branch (Labelled Else)
  • 120. Rule Execution Groups
  • 121. Rule Dependency Meta-Rule Language
  • 122. Parallel Meta-Rule Language
  • 123. Field Versioning
  • 124. Logical Closures/OnFalse
  • 125. Opportunistic Backward Chaining, Lazy Field/Object Values
  • 126. ... </li></ul>
  • 127. Drools Expert
  • 128. Classes
  • 129. rule “increase balance for AccountPeriod Credits” when ap : AccountPeriod() acc : Account( $accountNo : accountNo ) CashFlow( type == CREDIT, accountNo == $accountNo, date >= ap.start && <= ap.end, $ammount : ammount ) then acc.balance += $amount; end select * from Account acc, Cashflow cf, AccountPeriod ap where acc.accountNo == cf.accountNo and cf.type == CREDIT cf.date >= ap.start and cf.date <= ap.end trigger : acc.balance += cf.amount Credit Cashflow Rule
  • 130. rule “increase balance for AccountPeriod Credits” when ap : AccountPeriod() acc : Account( $accountNo : accountNo ) CashFlow( type == CREDIT, accountNo == $accountNo, date >= ap.start && <= ap.end, $ammount : ammount ) then acc.balance += $amount; end rule “decrease balance for AccountPeriod Debits” when ap : AccountPeriod() acc : Account( $accountNo : accountNo ) CashFlow( type == DEBIT, accountNo == $accountNo, date >= ap.start && <= ap.end, $ammount : ammount ) then acc.balance -= $amount; end Rules as a “view”
  • 131. Drools Expert Quick Example Stateless
  • 132. Definitions public class Applicant { private String name; private int age; private boolean valid; // getter and setter methods here } rule &quot;Is of valid age&quot; when $a : Applicant( age < 18 ) then modify ( $a ) { valid = false }; ends
  • 133. Building KnowledgeBuilder kbuilder = KnowledgeBuilderFactory .newKnowledgeBuilder(); kbuilder .add( ResourceFactory .newClassPathResource( &quot;licenseApplication.drl&quot; , getClass() ), ResourceType.DRL ); if ( kbuilder .hasErrors() ) { System.err.println( kbuilder .getErrors().toString() ); } kbase .addKnowledgePackages( kbuilder .getKnowledgePackages() );
  • 134. Executing StatelessKnowledgeSession ksession = kbase .newStatelessKnowledgeSession(); Applicant applicant = new Applicant ( &quot;Mr John Smith&quot; , 16 ); assertTrue ( applicant .isValid() ); ksession .execute( applicant ); assertFalse ( applicant .isValid() ); rule &quot;Is of valid age&quot; when $a : Applicant( age < 18 ) then modify ( $a ) { valid = false }; ends
  • 135. Drools Expert Quick Example Stateful
  • 136. Definitions public class Room { private String name // getter and setter methods here } public class Sprinkler { private Room room ; private boolean on ; // getter and setter methods here } public class Fire { private Room room ; // getter and setter methods here } public class Alarm { }
  • 137. Definitions rule &quot;When there is a fire turn on the sprinkler&quot; when Fire ($room : room) $sprinkler : Sprinkler ( room == $room, on == false ) then modify ( $sprinkler ) { on = true }; println ( &quot;Turn on the sprinkler for room &quot; + $room.name ); end rule &quot;When the fire is gone turn off the sprinkler&quot; when $room : Room ( ) $sprinkler : Sprinkler ( room == $room, on == true ) not Fire ( room == $room ) then modify ( $sprinkler ) { on = false }; println ( &quot;Turn off the sprinkler for room &quot; + $room.name ); end
  • 138. Definitions rule &quot;Raise the alarm when we have one or more fires&quot; when exists Fire () then insert ( new Alarm () ); println ( &quot;Raise the alarm&quot; ); end rule &quot;Cancel the alarm when all the fires have gone&quot; when not Fire () $alarm : Alarm () then retract ( $alarm ); println ( &quot;Cancel the alarm&quot; ); end
  • 139. Definitions rule &quot;Status output when things are ok&quot; when not Alarm () not Sprinkler ( on === true ) then println ( &quot;Everything is ok&quot; ); end
  • 140. Executing String [] names = new String []{ &quot;kitchen&quot; , &quot;bedroom&quot; , &quot;office&quot; , &quot;livingroom&quot; }; Map < String , Room > name2room = new HashMap < String , Room >(); for ( String name : names ){ Room room = new Room ( name ); name2room .put( name , room ); ksession .insert( room ); Sprinkler sprinkler = new Sprinkler ( room ); ksession .insert( sprinkler ); } ksession .fireAllRules() > Everything is ok
  • 141. Executing Fire kitchenFire = new Fire ( name2room.get( &quot;kitchen&quot; ) ); Fire officeFire = new Fire ( name2room.get( &quot;office&quot; ) ); FactHandle kitchenFireHandle = ksession .insert( kitchenFire ); FactHandle officeFireHandle = ksession .insert( officeFire ); ksession .fireAllRules(); > Raise the alarm > Turn on the sprinkler for room kitchen > Turn on the sprinkler for room office
  • 142. Executing ksession .retract( kitchenFireHandle ); ksession .retract( officeFireHandle ); ksession .fireAllRules() > Turn off the sprinkler for room office > Turn off the sprinkler for room kitchen > Cancel the alarm > Everything is ok rule &quot;Status output when things are ok&quot; when not Alarm () not Sprinkler ( on === true ) then println ( &quot;Everything is ok&quot; ); end
  • 143. Conditional Elements
  • 144. not Bus( color = “red” ) Conditional Elements exists Bus( color = “red” ) forall ( $bus : Bus( floors == 2 ) Bus( this == $bus, color == “red” ) ) forall ( $bus : Bus( color == “red” ) )
  • 145. Accumulate CE rule &quot;accumulate&quot; when $sum : Number( intValue > 100 ) from accumulate ( Bus( color == &quot;red&quot; , $t : takings ) sum( $t ) ) then print &quot;sum is “ + $sum; end
  • 146. Accumulate CE Patterns and CE's can be chained with ' from ' rule &quot;collect&quot; when $zipCode : ZipCode() $sum : Number( intValue > 100 ) from accumulate ( Bus( color == &quot;red&quot; , $t : takings ) from $hbn.getNamedQuery( “Find Buses” ) .setParameters( [ “zipCode” : $zipCode ] ) .list(), sum( $t ) ) then print &quot;sum is “ + $sum; end
  • 147. Timers Calendars
  • 148. Timers rule “name” timer 1m30s when $l : Light( status == “on” ) then modify ( $l ) { status = “off” }; rule “name” timer (int: 1m30s 0) when $l : Light( status == “on” ) then modify ( $l ) { status = “off” }; When the light is on, and has been on for 1m30s then turn it off Same as above. Interval timer with JDK semantics for initial duration, then repeat duration.
  • 149. Timers rule “name” timer ( cron: 0 0/15 * * * * ) when Alarm( ) then sendEmail( ”Alert Alert Alert!!!” ) Field Name Mandatory? Allowed Values Allowed Special Characters Seconds YES 0-59 , - * / Minutes YES 0-59 , - * / Hours YES 0-23 , - * / Day of month YES 1-31 , - * ? / L W Month YES 1-12 or JAN-DEC , - * / Day of week YES 1-7 or SUN-SAT , - * ? / L # Year NO empty, 1970-2099 , - * / Send alert every quarter of an hour
  • 150. Calendars rule &quot;weekdays are high priority&quot; calendars &quot;weekday&quot; timer (int:0 1h) when Alarm() then send( &quot;priority high - we have an alarm” ); end rule &quot;weekend are low priority&quot; calendars &quot;weekend&quot; timer (int:0 4h) when Alarm() then send( &quot;priority low - we have an alarm” ); end Execute now and after 1 hour duration Execute now and after 4 hour duration
  • 151. Truth Maintenance Inference
  • 152. TMS and Inference rule &quot;Issue Child Bus Pass&quot; when $p : Person ( age < 16 ) then insert(new ChildBusPass ( $p ) ); end rule &quot;Issue Adult Bus Pass&quot; when $p : Person ( age >= 16 ) then insert(new AdultBusPass ( $p ) ); end Couples the logic What happens when the Child stops being 16?
  • 153. TMS and Inference <ul><li>Bad </li><ul><li>Monolithic
  • 154. Leaky
  • 155. Brittle integrity - manual maintenance </li></ul></ul>
  • 156. TMS and Inference <ul><li>A rule “logically” inserts an object
  • 157. When the rule is no longer true, the object is retracted. </li></ul>when $p : Person ( age < 16 ) then logicalInsert ( new IsChild ( $p ) ) end when $p : Person ( age >= 16 ) then logicalInsert ( new IsAdult ( $p ) ) end de-couples the logic Maintains the truth by automatically retracting
  • 158. TMS and Inference rule &quot;Issue Child Bus Pass&quot; when $p : Person ( ) IsChild ( person =$p ) then logicalInsert ( new ChildBusPass ( $p ) ); end rule &quot;Issue Adult Bus Pass&quot; when $p : Person ( age >= 16 ) IsAdult ( person =$p ) then logicalInsert ( new AdultBusPass ( $p ) ); end The truth maintenance cascades
  • 159. TMS and Inference rule &quot;Issue Child Bus Pass&quot; when $p : Person ( ) not ( ChildBusPass ( person == $p ) ) then requestChildBusPass( $p ); end The truth maintenance cascades
  • 160. TMS and Inference <ul><li>Good </li><ul><li>De-couple knowledge responsibilities
  • 161. Encapsulate knowledge
  • 162. Provide semantic abstractions for those encapsulation
  • 163. Integrity robustness – truth maintenance </li></ul></ul>
  • 164. Fusion
  • 165. Drools Fusion: Enables... <ul><li>Event Detection: </li><ul><li>From an event cloud or set of streams, select all the meaningful events, and only them. </li></ul><li>[Temporal] Event Correlation: </li><ul><li>Ability to correlate events and facts declaring both temporal and non-temporal constraints between them.
  • 166. Ability to reason over event aggregation. </li></ul><li>Event Sequencing: </li><ul><li>A -> ( B OR C ) -> D </li></ul><li>Event Abstraction: </li><ul><li>Ability to compose complex events from atomic events AND reason over them </li></ul></ul>
  • 167. Drools Fusion: Features <ul><li>Support to Event semantics: </li><ul><li>Usually immutable, but not enforced
  • 168. Strong temporal relationships
  • 169. Managed lifecycle
  • 170. Point-in-time and Interval events </li></ul><li>Time semantics </li><ul><li>Discrete </li></ul><li>Temporal relationships </li><ul><li>All 13 operators defined by James Allen (+ negations) </li></ul></ul>
  • 171. Drools Fusion: Temporal Reasoning
  • 172. Drools Fusion: Temporal Reasoning
  • 173. $c : Custumer( type == “VIP ) $oe : BuyOrderEvent( customer == $c ) from entry-point “Home Broker Stream” not BuyAckEvent( relatedEvent == $oe.id, this after[1s, 10s] $oe ) from entry-point “Stock Trader Stream” Operators Existing Drools 'not' Conditional Elements can be used to detect non-occurrence of events BackAckEvent must occur between 1s and 10s ' after' BuyOrderEvent
  • 174. Aggregations Rule Engines do not deal with aggregations $n : Number( intValue > 100 ) from accumulate ( $s : StockTicker( symbol == “RHAT” ) over window:time ( 5s ), average ( $s.price ) ) Over 5 seconds Aggregate ticker price for RHAT over last 5 seconds The pattern 'Number' reasons 'from' the accumulate result
  • 175. CEP Applied at FedEx Custom Critical * Presented by Adam Mollemkopf at ORF 2009
  • 176. CEP Applied at FedEx Custom Critical * Presented by Adam Mollemkopf at ORF 2009
  • 177. <ul><li>At least 50% of Alerts can be reasoned automatically, promoting staff savings and improved Customer and Driver experiences.
  • 178. Risk Avoidance via pro-active monitoring </li><ul><li>Reduction in insurance claims and shipment service failures </li></ul><li>Minimum 30% efficiency gains in shipment monitoring , saving at least 15% of Operations staff cost. </li></ul>CEP Applied at FedEx Custom Critical * Presented by Adam Mollemkopf at ORF 2009
  • 179. <ul><li>Some numbers (from early 2010): </li><ul><li>24 x 7 sessions, no downtime
  • 180. Average of 500k+ facts/events concurrently in memory </li><ul><li>Business hours: 1M+ facts/events concurrently </li></ul><li>Response time for reasoning cycles: </li><ul><li>Average: 150 ms
  • 181. Peak: 1.2 sec </li></ul><li>Several hundred rules </li></ul></ul>CEP Applied at FedEx Custom Critical * Presented by Adam Mollemkopf at ORF 2009
  • 182. Differential Update <ul><li>Differential Update (a.k.a. “true modify”) </li><ul><li>Implements a real “modify/update” operation, instead of retract+assert. </li><ul><li>Reuses tuples, reduces GC stress, improves performance </li></ul></ul></ul>
  • 183. Questions? Questions? <ul><li>Dave Bowman : All right, HAL; I'll go in through the emergency airlock.
  • 184. HAL : Without your space helmet, Dave, you're going to find that rather difficult.
  • 185. Dave Bowman : HAL, I won't argue with you anymore! Open the doors!
  • 186. HAL : Dave, this conversation can serve no purpose anymore. Goodbye. </li></ul>Joshua: Greetings, Professor Falken. Stephen Falken : Hello, Joshua. Joshua: A strange game. The only winning move is not to play. How about a nice game of chess?

×