Jul 14, 2015
WebSphere ILOG BRMS Decision ServicesBest Practices to execute WebSphere ILOG JRules Decision Services
Presentation Summary This session introduces the concept of Decision Services and explain their design in ILOG BRMS. We present an overview of the different runtime incarnations provided by WebSphere ILOG Business Rule Management System including Web Services, PoJos and EJBs. We cover a set of best practices to deploy and execute Decision Services on WebSphere Application Server including in cluster. Pierre FEILLET WebSphere ILOG BRMS Product Architect
1
Agenda BRMS Overview Terminology ILOG JRules 7.1 Platform
Decision Services Deployment Engine Rule Execution Server Decision Warehouse
Integration guidelines Platforms Topologies
2
BRMS Overview Concepts Business Rule Business Rule Management System Decision Service
WebSphere ILOG JRules 7.1
3
Business Rule Definition Business rule is a statement that defines or constrains some aspect of the business. It is intended to assert business structure or to control or influence the behavior of the business. Individual business rules that describe the same facet of an enterprise are usually arranged into business rulesets. Business rules describe the operations, definitions and constraints that apply to an organization in achieving its goals. - Wikipedia definition
4
Business Rules bridge Line Of Business and IT Quasi-natural language
Decision TablesBusiness Rule A statement of business logic that: Derived from Business Policy Can be authored by business users Is executable
Decision Trees
5
BRMS Definition A BRMS or Business Rule Management System is a software system used to define, deploy, execute, monitor and maintain the variety and complexity of decision logic that is used by operational systems within an organization or enterprise. This logic, also referred to as business rules, includes policies, requirements, and conditional statements that are used to determine the tactical actions that take place in applications and systems. - Wikipedia definition
6
Decision Service A service that automates an operational business decision Contained Decision Logic is written and maintained by a Business User Separation from Business Processes and procedural application code
7
ILOG Business Rule Management SystemRules are authored and managed
A technology for creating, maintaining and deploying rule based decision services Reduces the time to deploy changes Improves the understanding of how decisions are made Increases opportunities for logic automation Favors the reuse of business logicNo, for the following reason: Too big Debt-To-Income ratio
User Tools
Rule Repository
Rules are stored and organize d
Is this customer eligible for a loan?Execution components
Rules are deployed in Decision Services
8
WebSphere ILOG JRules 7.1 Platform DesignDevelopmentRule Studio
MaintainRule Solutions Rule Team Decision Validation Server Services Custom Web Applications Rule Repository
Line Of Business
for Office
Share
DeployProductionTransparent Decision Services Rule Execution Rules for COBOL Server
Common Activity Flow Authoring Project boot in Rule Studio Web editing in Rule Team Server Test & Simulate with Decision Validation Services Deploy Upload a RuleApp in Rule Execution Server Alternatively export a ruleset archive Execute In Rule Execution Server Alternatively directly in the Rule Engine
10
WebSphere JRules Decision ServiceService Definition Platform Neutral
Authoring RS4J RTS RSO Deployment
Vocabulary Business Object Model Business Rules
eXecutable Rules
Execution Dev Test Prod
XSD eXecutable Object Model
Platform Specific
11
BRMS Artifact pipeline AuthoringRule Project Vocabulary BOM Business RulesAnt tasks Rule Studio Rule Team Server
Extractor
Business Rule Compiler
DeploymentRuleApp Archive
ExecutionRule Execution Server Rule Engine
Ruleset Archive Ruleset Archive
12
Decision Service Deployment artefacts RuleApp archive Kind of EAR for Business Rules Aggregates one or several Ruleset archives Notion of RuleApp/version/Ruleset/version path Contains Whole runnable business logic for execution Metadata at RuleApp & Ruleset levels Ruleset Archive Contains eXecutable Rules as text executable XSD But not Java eXecutable Object Model Java XOM is passed by the calling app
13
Decision Service flavours in JRules Out of the Box - Dedicated container Hosted Transparent Decision Services Code generated Monitored Transparent Decision Services Custom RES components embedded in client applications JEE & J2SE components PoJo EJB Stateless, Stateful sessions & MDB Resource Adapter Integration made possible in any classical J2SE & JEE apps WebApps, Web Services, EJBs
14
Execution Component StackDVS backend SSP Rule Sessions
Decision Services
HTDS, MTDS & custom apps
EJB
POJO JCA
JEE & SE facade components
eXecution Engine Engine Engine Unit
Server core component
Rule Engine
Base execution component
15
Rule Engine Execution kernel Optimized for condition & test sharing 100% Java Programming model Passive component: runs only when invoked Synchronous Parameters & working memory In memory processing No duplication of processed objects No requirement on processed objects (Interface or whatever contract) Object Model Java (&.Net for JRules 2 .Net) classes passed by the classloader XML
16
Rule Engine implementation One engine runs in one VM Deployment based on a ruleset archive Deployed from Rule Studio & Rule Team Server IRL file rules XML metadata Contains XML compiled model
Threading MT safe Execute in the current thread No thread created in your back by the engine
Byte code generated at parse & run time
17
Rule Engine Algorithms 3 different algorithms to process production rules RETE Stateful real inference (forward chaining) engine Agenda of rule instances Sequential, a simple translation to if statements in generated bytecode Fastpath a decision tree built by analysing rules
And the ruleflow to bind them all Microflow Synchronous
18
Rule Execution Server Central management point Deployment of rule executable material aka RuleApp/Ruleset Hot deployment Versioning Diagnostic Execution Pooling & Caching JEE, J2SE, .Net Management & eXecution Units linked by DB storing RuleApps JMX based update notification to eXecution Units Use of standards JSR94 WS-I 1.0 Basic Profile (HTDS) 100% Java
19
Rule Execution Server ArchitectureRuleApp & Ruleset archive Decision Services DVS backend SSP
Management Console Management Model JMX
JMX Update Notification
Rule Sessions
EJB
POJO JCA
eXecution Engine Engine Engine Unit
RuleApp/Ruleset Repository
Decision Warehouse DB
Decision Traces
20
Rule Session code example// Create a Rule Session request IlrSessionFactory pojoFactory = new IlrPOJOSessionFactory(); IlrSessionRequest sessionRequest = pojoFactory.createRequest(); sessionRequest.setRulesetPath(IlrPath.parsePath( MyRuleApp/1.0/MyRuleset/1.0 )); // Enable trace to retrieve infos on executed rules sessionRequest.setTraceEnabled(true); sessionRequest.getTraceFilter().setInfoAllFilters(true); // Set the input parameters for the execution of the rules Map inputParameters = sessionRequest.getInputParameters(); Announcement announcement = new Announcement(); inputParameters.put("customer", user); // Create a stateless rule session IlrStatelessSession statelessSession = pojoFactory.createStatelessSession(); // Execute the rules and returns the response return statelessSession.execute(sessionRequest);
21
Decision Service Hosted Transparent Decision ServicesDecision ServiceRuleApp/ version/Ruleset/Version
WSDL WebService
Deployment Execution Monitoring Transparency Warehouse
Rule Logic eXecutable Model
eXecution Unit 22
Decision Warehouse Decision Tracability Decisions recorded in a DB Traces flowing from RuleSessions Possible DAO customization to push Decision Traces into other channels (JMS, BI tools, ) Part of DVS Product GUI in RES Console Tab Search Decisions, used to filter and display rule execution trace information Persistence Properties to specify the trace configuration for your session Clear Decisions to delete trace information from the Decision Warehouse database
23
Integration guidelines Platforms Transaction Security Performances Deployment topologies
24
Supported Platforms OS Application Servers IBM WebSphere Application Server V6.1.0.21 IBM WebSphere Application Server V7.0 IBM WebSphere Community Edition 2.1 IBM WebSphere Extended Deployment 6.1 Apache Tomcat 6.0 JBoss 4.2.3, 5.0.0 Oracle Application Server 10.1.3. WebLogic Server 9.2.3, 10.0.1, 10.3 Sun Java System Application Server 8.2
AIX on POWER Linux on IBM System z HP-UX on PA-RISC Solaris on SPARC HP-UX on IA64 Solaris on x86-64 IBM i Windows on x86 Linux on x86 Windows on x86-64 Linux on x86-64 z/OS Linux on POWER
List of supported operating systems for WebSphere ILOG JRules BRMS 7.0
25
Supported Platforms JVM IBM 64-bit SDK for Windows - 5.0, 6.0 Oracle JRockit for Windows x64 - 5.0, 6.0 Sun JDK for Windows x64 - 5.0, 6.0
Databases IBM DB2 for LUW 8.2, 9.1, 9.5, 9.7 Oracle 10g, 11g Apache Derby 10.4 MySQL V5.0 PostgreSQL V8.3 SQL Server 2005, 2008 Sybase 12.5, 15 Pointbase
26
Deployment on Multiple Languages .Net JRules 2 .Net feature JRules includes a .NET version of the rule engine. This means that rulesets that are written using Rule Studio and stored in a ruleset archive can be remapped and deployed to a business rule application that embeds the .NET rule engine.
Cobol Rules for Cobol product Cobol source generation from Business Rules
27
Security & Transaction in WAS Security RES leverages JEE & WAS security Transaction Pojo RuleSessions & Engine fit to transactions XU Resource Adapter can be set transactional or not If not transactional then you can use it multiple times in the same transaction Transactional is local and not XA: so no reentrance allowed
28
PerformancesTransaction per second by ruleset size and execution type45000 800 40000 700 35000 600 30000 500 400 300 200 100 Execution on Java XOM Execution on XML XOM 5824 WS Execution (HTDS) 11648 14560 8736 Nb rules 0 2912 5824 8736 Nb rules 11648 14560 0 2912 5000 25000 Execution on Java XOM Execution on XML XOM WS Execution (HTDS) 15000 10000 20000 Java XOM
Parsing time by ruleset size
Hardware OS Memory CPU WAS JRules
X3550M2 / DESTINY 64-bit Windows Server 2008 Enterprise (SP1) 52.0 GB Intel Xeon X5570 @ 2.93GHz (2 processors 8 cores -16 threads) WAS 7.0.x 7.0.x
See Session 1736 on Performances
29
Deployment Topology guidelines J2SE Standalone RES execution jar RuleApp deployment with Ant tasks Guidelines for JEE & WAS RAR eXecution Units can be deployed Globally on the AS Internally to EARs Remain local resources RES Management relies on JMX Scoped to eXecution Units in the Cell Shared DB between RES Management & eXecution Units
30
Typical Decision Service WAS topology
Cell
WAS Node Decision Service
https
http
BrowserWebSEAL Proxy Server Apache HTTPD (mod_proxy) WAS Node Decision Service DB Server RES DB
ClusterRed Zone Yellow Zone
WAS Node Decision Service
RES Mgt Console
Green Zone31
Take Away WebSphere ILOG JRules enable your organization to manage Decision Services From Business User authoring to execution on your IT
JRules Decision Services have several incarnations On the fly created Web Services with HTDS Source generated with MTDS Custom integration in JEE & J2SE applications
Large set of supported platforms including WAS 7.0 & 6.1 with cluster
32
Other WebSphere ILOG BRMS SessionsMondaya.m. 2140: Feedback (Rule Team Server) p.m. 2155: Customer Experience 2861: Business Agility 1809: Business/IT Alignment 2160: Feedback (Realtime Monitoring) 2198: Live on Stage! 2140: Feedback 2291: Business Agility 2927: BRMS SOA
Tuesdaya.m. 2203: LAB 1545: BRMS - BPM p.m. 1818: BRMS for Business Users 2160: Feedback 2981: Meet the Experts 1499: BRMS for z 2517: Business Agility 2140: Feedback 2160: Feedback 2885: Panel 2080: Healthcare 1734: BRMS for COBOL
Wednesdaya.m. 1545: BRMS - BPM 2730: Public Sector 1736: Performance p.m. 1547: LAB, BRMS-BPM 2140: Feedback 1848: Governance 1922: Best Practices 2160: Feedback 2013: BOF (multi-topic)
Thursdaya.m. 1997: BRMS - BPM 1749: Decision Services on WAS (repeats on Friday a.m.) 2160: Feedback p.m. 2140: Feedback
* In blue interactive / hands-on * In orange customer speaker33
We Value Your Feedback ! Please complete the session survey for this session by: Accessing the SmartSite on your smart phone or computer at: http://imp2010.confnav.com Surveys / My Session Evaluations
Visiting any onsite event kiosk Surveys / My Session Evaluations
Each completed survey increases your chance to win an Apple iPod Touch with daily drawing sponsored by Alliance Tech
34
Questions and Answers
35
Copyright and Trademarks IBM Corporation 2009. All rights reserved. IBM, the IBM logo, ibm.com and the globe design are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml. Other company, product, or service names may be trademarks or service marks of others.
36