The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Drools, jBPM OptaPlanner presentation
1. • Distinguished Engineer II
• Chief Architect
• Projects : Drools, jBPM and OptaPlanner
• Release per sprint
• 3 weeks per sprint
• Products : Red Hat PAM (BPMS) / DM (BRMS)
• Release per quarter
Mark Proctor
18. ● Multi Cloud
● Using multiple public clouds.
● Avoid vendor lock-in.
● Lower costs, via competition
Multi Cloud
19. ● Hybrid Cloud.
● Combination of 1 or more public and private clouds.
● With a degree of portability.
Hybrid Cloud
20. ● Virtual Machines (Early Cloud).
● Virtualises the hardware.
● Slow startup.
● Inefficient use of resources (uses all memory).
● Containerisation (Modern Cloud) aka Kubernetes.
● Virtualises the Operating System.
● Instead of providing virtual hardware to a VM, you provide a virtual OS to your
application.
● Run large number of applications, with fast startup and efficient resource
utilisation.
● Higher Density.
Virtual Machines vs Containerisation
21. ● Kubernetes is the project.
● OpenShift is the RHT Product based on Kubernetes.
● OpenShift has:
● Stricter security policies.
● Integrated CI/CD with Jenkins.
● Image Streams for image management.
● Single image with managed virtual tags (dev/stage/prod)
● Automated redeployment on new versions
● Automate build chains
OpenShift vs Kubernets
22. KNative
Kubernetes-based platform to build, deploy, and manage modern serverless workloads.
● KNative Build
○ Configurable and flexible approach to building source code into containers
● KNative Serving
○ Rapid deployment of serverless containers, with automatic scale-to-zero support.
○ Revisions mark point-in-time snapshots of deployed code and configurations.
● KNative Eventing
○ Universal subscription, delivery, and management of events
○ Scalable from just a few events to live streams
23. ● Stateless (with Ephemeral Storage)
● Push caching and scaling to OCP K8
● Fast creation of pods on demand
● Push state external
● Sticky Sessions
● Templates and Operators
● Istio (Service Mesh)
● KNative / Serverless
Cloud Native Application
25. ● A polyglot VM with cross-language JIT supporting:
○ Java Bytecode and JVM languages
○ Interop with different languages
○ Dynamic languages through Truffle API
● Cross-language interop out of the box
○ Simple AST-based interpreter
○ JIT across language boundaries
● Support for native binary compilation (SubstrateVM)
○ faster boot-up
○ lower memory footprint
26. AOT Compilation
● Static Analysis
● Closed World Assumption
● Dead Code elimination
Faster Process
Start Time
Lower Memory
Footprint
Smaller Size
On Disk
28. A cohesive platform for optimized developer joy:
! Based on standards, but not limited
! Unified configuration
! Zero config, live reload in the blink of an eye
! Streamlined code for the 80% common usages,
flexible for the 20%
! No hassle native executable generation
Developer Joy
33. ○ Community, Skunk Works, effort exploring a number of directions
○ Cloud native (Kubernetes) architecture
■ First class environment for development of applications on OCP.
○ GraalVM / Quarkus
○ Domain-specific REST process service
○ OmniChannel tooling with VSCode/Che
■ With consistent Business Practitioner version (e.g. electron.js)
○ Goal - provide services* attractive to OpenShift application developers for:
■ Decisions (rules)
■ Process (workflow)
■ Events
■ Optimizations
Submarine
34. ● A pure Java DSL for rules and process authoring
● A pure Java canonical representation of a rule base
● Automatically generated by Maven plugin or Quarkus extension
● Can be embedded in jar
● Faster boot
● Allow for faster prototyping and experimentation of new features, without
worrying about language design
● Prerequisite to make Drools and jBPM natively compilable on GraalVM
Canonical Executable Model : What
35. ● Do not parse BPMN, DRL, DMN etc at runtime.
○ Generate code from parsers at build time.
○ Executable means java rules and workflow fluent DSLs.
● Removed
○ Reflection
○ Bytecode Generation
● Move all “determinism” to the language layer
○ Indexes, property reactivity
Canonical Executable Model : How
54. Active DataBases
•Validation enforcement, triggers.
•Simpler semantics, no forward chaining.
•Without 2 phase. Does not allow mutation of selected tables.
•Scoped deterministic execution within the transaction
Decisioning
•DMN
CEP
•Power of production system LHS, with additional temporal reasoning
•No inference, rules are isolated
Reactive Programming with Pattern Matching
•Light Weight, simple facet of a production system
•No Reactive Joins, but can do passive joins
•Built into native language
Offshoots
54
55. Reactive Programming / Pattern Matching
55
public static class Customer {
int String name;
int discount = 0;
}
public static class GoldCustomer extends Customer { }
public static class SilverCustomer extends Customer { }
public static class BronzeCustomer extends Customer { }
public static void main( String[] args ) {
observable.subscribe( customer -> {
switch (customer) {
case GoldCustomer g: {
CriteriaQuery<Double> cr = cb.createQuery(Double.class);
Root<ShoppingCart> root = cr.from(ShoppingCart.class);
cr.select(cb.sum(root.get("items.value"))).where("customer = " + g.name);
Query<Double> query = session.createQuery(cr);
double total = query.getResultList().get(0);
g.discount = total > 100 ? 20 : 15;
break;
}
case SilverCustomer s: s.discount = 10; ………… break;
case BronzeCustomer b: b.discount = 5; ………… break;
default: customer.discount = 0;
}
} );
}
56. Blended Languages - LinQ / Reactive LinQ
56
var result=
(
from data in myData
join inData in incomingData
on data.ID equals inData.ID
select new
{
data.ID,
inData.LOCATION,
data.COUNT
}
).ToList();
57. Still Here
57
Working
MemoryModules
Inference Engine
Pattern
Matching
Agenda
“It’s time to trade rule technology dating back to the 80’s for state of
the art AI…
Artificial intelligence (AI) and natural language processing (NLP)
have improved dramatically.
Logical reasoning technology has advanced while production rule
technology remains stagnant” (Paul Haley 2018)
• http://haleyai.com/wordpress/2018/04/02/confessions-of-a-production-rule-vendor-part-2/
61. •Pluggable Knowledge Types
•Canonical Model
•Separation of rules from data
•Improved, declarative, rule execution control (Instead of push/pop stacks)
•Common “unit of execution” for runtimes (rules, workflow, bpm).
•Improved APIs and programming model
•Pluggable Belief Systems
Areas of Improvements
61
62. Simple TMS
62
•A rule “logically” inserts an object
•When the rule is no longer true, the object is retracted.
rule "IsChild"
when
$p : Person( age < 16 )
then
logicalInsert( new IsChild( $p ) )
end
rule "IsAdult"
when
$p : Person( age >= 16 )
then
logicalInsert( new IsAdult( $p ) )
end
rule "Issue Child Bus Pass"
when
$p : Person( )
IsChild( person =$p )
then
logicalInsert(new ChildBusPass( $p ) );
end
rule "Issue Adult Bus Pass"
when
$p : Person()
IsAdult( person =$p )
then
logicalInsert(new AdultBusPass( $p ) );
end
63. Defeasible
63
rule "All Birds Fly" @Defeasible
when
$b : Bird( )
then
logicalInsert(new Fly( $b ) );
end
rule "Penguins With Rockets Fly”
@Defeasible @Defeats(“Penguins Don't Fly”)
when
$b : Penguin( )
Rocket($b;)
then
logicalInsert(new Fly( $b ) );
end
rule "Penguins Don't Fly"
@Defeasible @Defeater
when
$b : Bird( )
Penguin($b;)
then
logicalInsert(new Fly( $b ), “neg” );
end