2011-03-29 London - Why do I need the guvnor BRMS?
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

2011-03-29 London - Why do I need the guvnor BRMS?

on

  • 8,260 views

Why do I need the Guvnor BRMS and the Drools rule engine?

Why do I need the Guvnor BRMS and the Drools rule engine?

Statistics

Views

Total Views
8,260
Views on SlideShare
8,229
Embed Views
31

Actions

Likes
2
Downloads
219
Comments
0

7 Embeds 31

http://jedaway.blogspot.com 23
http://www.slashdocs.com 3
http://twitter.com 1
http://webcache.googleusercontent.com 1
http://jedaway.blogspot.de 1
http://www.docseek.net 1
http://jedaway.blogspot.in 1
More...

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

2011-03-29 London - Why do I need the guvnor BRMS? Presentation Transcript

  • 1. Geoffrey De Smet Why do I need the Guvnor BRMS?
  • 2. Guvnor agenda
    • Use cases
    • 3. My business requires domain expertise
    • 4. My business rules change often
    • 5. Auditable and reproducible
    • 6. Future improvements
  • 7. Use cases I have hammer, so every problem is a nail?
  • 8. The myth
    • Because
      • Drools can fulfil business rules
      • 9. Drools is Turing complete
    • we should write the entire business layer in Drools?
      • No!
      • 10. Not imperative like Java, Scala, Groovy, ...
      • 11. Declarative like RegEx, SQL, JPA-QL, …
        • Easier to read, better at scaling
    • Extract business decisions in Drools that either:
      • Require schooled domain expertise
      • 12. Change often/fast
  • 13. Use cases
    • Financial decisions
      • Mortgages acceptance and interest calculation
      • 14. Insurances acceptance and fee calculation
    • Price calculations
      • Phone/Telecom bills
    • Diagnostics
      • Possible diseases based on symptoms
    • Complex validation
      • Car parts selection
    • Not a good use case: an XML parser
      • Use Java code for that
  • 15. Mortgages example
  • 16. Developers don't like data input from spreadsheets
    • Before App 1.0: Mortgages rules in a spreadsheet
      • Which version/copy of the spreadsheet file?
      • 17. Which field has the result our application need?
    Version 1 Version 2
  • 18. Mortgage experts like the flexibility of spreadsheets
    • Since App 1.0: Mortgages rules in source code
      • Changing business rules not flexible enough
        • Business rules are hard coded in Java
    Invalid: must be a number
    • Flooded with new improvement requests:
      • when income below 500
      • 19. when income below 1000 and age above 50
      • 20. when income below 1% of mortgage amount
  • 21. Data model in Guvnor
    • Import POJO jar
    • 22. or Design the model in Guvnor:
  • 23. Mortgage experts like the flexibility of Guvnor
    • App 2.0: Mortgage rules in Guvnor repository
      • Flexible like spreadsheet
        • But fields clearly defined
      • No spreadsheet versions/copies
        • Auditable
  • 24. My business requires domain expertise Only mortgage managers understand mortgage rules
  • 25. Schooled domain expertise
    • Are we, the developers, domain experts?
      • Yes, we've been working in this company for year(s).
    • Do we have
      • university's degree in economics? No
      • 26. participated in mortgages conferences/courses? No
      • 27. years of mortgage customer experience? No
    • Do we have a clue when the mortgage rules need to change? No
    • 28. Are we, the developers, domain experts? No
      • Mortgage manager is the domain expert
  • 29. Domain experts can not read/write Java source code
    • Communication problem
      • Domain expert can not read it:
    for (Mortgage m : mortgages ) { for (Applicant a : m.getApplicants()) { if (a.getAge() > 70 ) { boolean existsGuarantor = false ; for (Guarantor g : m.getGuarantors() { if (g.getAge < 60 ) { existsGuarantor = true ; } } // Will they spot the bug in this code? if (existsGuarantor) { m.setApproved( false ); } } } }
    • DRL scales better than this Java code
  • 30. Domain experts can read/write DRL with Guided Rule Editor Change
  • 31. Guided Rule Editor demo video Demo video
  • 32. Domain experts can read/write DSL even better
    • DSL is even easier to read/write
    • Developers create the building blocks
    • 33. Domain experts make the building
    Source: wikipedia
  • 34. My business rules change often This mortgage rule change must be released by noon
  • 35. Deliver changes fast
  • 36. Business rule change
    • Not a data change
      • Requires test and release lifecycle
      • 37. Logic changes
    • Not a software change
      • Delivered in hours, not days
      • 38. Self-service by mortgage manager
  • 39. Testing before releasing
    • Domain experts need to unit test too
      • Example: mortgage of Erik (75) must be disapproved
  • 40. Releasing
    • Release a snapshot of the rules package
    • 41. Available at URL:
      • http://127.0.0.1:8888/org.drools.guvnor.Guvnor/package/presentationmortgages/mortgagesDeployment
  • 42. Deployment infrastructure
  • 43. Auditable and reproducible Why was that mortgage approved last year?
  • 44. Auditing
    • View old revisions of rules
  • 45. Future improvements Feed-back welcome
  • 46. Modules: reuse rules
    • Module contains assets (rules)
      • Packages will be renamed to modules
    • Module can depend on other modules
      • Reuse of assets (rules) from other modules
      • 47. Dependency graph (like Maven/OSGi but simplified)
    Mortgage rules Car loan rules General loan rules Customer rules 2.0 1.1 1.1 2.1
  • 48. Extended release lifecycle
    • Draft
    • 49. Test
    • 50. Released
      • Version
      • 51. Immutable (all dependent modules are released)
  • 52. Summary
  • 53. Summary
    • Use Drools and Guvnor
    • 54. when your business decisions either
      • Require domain expertise
      • 55. Change often/fast
  • 56. Q & A
    • Questions?
    • 57. Useful links
    • 58. Website
    • 59. http://www.jboss.org/drools/
    • 60. Reference manual
    • 61. http://www.jboss.org/drools/documentation.html
    • 62. Blog
    • 63. http://blog.athico.com/
    • 64. Mailing lists (forum interface through nabble.com)
    • 65. http://www.jboss.org/drools/lists.html
      • Slides available online