agenda - red hat · amadeus otf application server service oriented architecture the open...

34

Upload: others

Post on 16-May-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container
Page 2: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Agenda

_ Context• Amadeus in a few words • Business Rules

• Functional usage• Technical challenges• New Requirements

_ Red Hat BRMS integration in Amadeus• Study/prototype/benchmarks• Industrialization

_ Red Hat & Amadeus collaboration

Page 3: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container
Page 4: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

_ We are the leading technology company dedicated to the global travel industry

_ We are present in 190+ countries and employ 14,000+ people worldwide

_ Our solutions enrich travel for billions of people every year

_ We work together with our customers, partners and other players in the industry to improve

business performance and shape the future of travel

595 million total bookings processed in 2016 using the Amadeus distribution platform

1.4 billion passengers boarded in 2016 with Amadeus and Navitaire solutions

1 of the world’s top 10 software companiesForbes 2016 global rankings

Amadeus in a few words

4

5th consecutive year included in the DJSI The only travel technology company in the

Dow Jones Sustainability Index in 2016

Page 5: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Flexibility

Scalability

Reliability

Security

Enterprise Service Bus

OTF

FRONTEND

OTF

FRONTEND

Red Hat

Enterprise

Application

Platform

Red Hat

Enterprise

Application

Platform

Amadeus OTF

Application

Server

Amadeus OTF

Application

Server

Service Oriented Service Oriented Service Oriented Service Oriented

Architecture Architecture Architecture Architecture

The Open Transaction Framework (OTF) is the Amadeus’ Enterprise

Application Server, a container to deploy, configure and manage applications

Applications & Applications & Applications & Applications &

IsolationIsolationIsolationIsolation

Health active monitoring

Travel Agents Load ControlAirlines Hotels e-Commerce Airports Self-service Impacted Systems

Amadeus architecture core pillars

Page 6: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Inspire

Shop

Book

On-trip

Pre-trip

Post-trip

Enriching every step of the traveler's journey

6

Business Rules everywhere!

Page 7: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

7

Amadeus Business Rules

Example

Criterion Type

[Weight]

Market Pair [ 0 ] Flight Group [ 4 ] Date Pair [ 2 ]

Criterion Name Market

Origin

Market

Destination

Flight Group Start Date End Date Meal Rule

Weight

Rule 1 World UK 0

Rule 2 UK World BA1-15 01APR17 30APR17 6

Rule 3 London Paris 01APR17 30APR17 2

Rule Type Definition

Criterion Values Decision ValueMost Precise Rule

Page 8: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Markets Flight Groups

Standard Types:

String, date, integer …

Points of Sale

• In-house rule engine embeddedembeddedembeddedembedded inininin allallallallAmadeusAmadeusAmadeusAmadeus applicationsapplicationsapplicationsapplications

• TailoredTailoredTailoredTailored forforforfor thethethethe TravelTravelTravelTravel IndustryIndustryIndustryIndustry

Customized

aggregation of

geographical locations

Customized points

where the purchase is

performed

Customized list of

flights

� Rules administration User Interfaces

� Access control

� Excel and csv Import Export for massive manipulation

� Rules History

Customization of the Behavior of Amadeus Applications

Excel

Amadeus Business Rules

Page 9: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

~2 Million rules~150 000

flight

groups

~85 000

markets

~40 000

points of

sale

Biggest clients manage more than 40 000

business rules

1500 business rule owners in Production

� Matching logic : Most precise rule

� High performances

� ~3 Million aggregated evaluations/sec

Customization of the Behavior of Amadeus Applications

Database

snapshot

Amadeus Business Rules

Page 10: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Page 10

Administration Rule EngineReplication

Business Analyst

Developer

Implementation

Agent

Middleware Data

Server(MDS)

Application Server B

Node 1RuleEngine

Node 2RuleEngine

Application Server A

Node 1RuleEngine

Node 2RuleEngine

Admin UI

ABR High Level Architecture

Json Admin

Services

Publish &

Subscribe

Page 11: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

New Requirements

_ More complex usecases

• Expressivity

• No constraint on the number of conditions

• Ex: ABR limitation to 99 criteria

• Calculation

• Inference

_ Agility for faster time to market

• Dynamicity

• ABR is static because of rule template (criteria and action)

• More operations for more complex conditions than ABR: =, <, >, regexp, contains, memberOf, join, inference…

_ Reduce operational footprint

• Decrease CPU cost for cloud deployment

Page 12: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container
Page 13: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Page 13

_ Business

• Custom Travel Semantics to be integrated

• Rule management serviceability (easy integration in business UIs)

_ Technology

• Integration with C++ applications

• Business rules sharing between c++ and java applications

_ Operability

• Distributed application servers

• Rolling deployment

Challenges

Page 14: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

_ SW/HW Configuration

• SLES11/JDK8

• 24 cores @ 3.33GHz / 48 GB Ram

_ Client-Server setup

• Client (C++) side: Zero-MQ client

• Server (Java) side: Zero-MQ multithreaded server / Red Hat

Enterprise BRMS 6.3.0

_ Test protocol

• Conversion of ABR rules into Drools rules

• 1 Simple Use case

• 1 Complex Use case (inference)

• Measure rule evaluation round trip latency

• 1 (random) input fact per fireAllRules call

• From 10 up to 100k rules

Red Hat BRMS in C++Evaluation Prototype

C++ Stress Client

Java Drools Server

KieContainer

Worker

Thread

Worker

Thread…

dispatcher

IPC (Unix Socket)

Page 15: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

15

PerformancesScalability

_Minimum connecting time

rules

• 1 input fact

• 1 (most precise) rule match

_Red Hat BRMS outperforms

ABR when ruleset grows past

1K rules

20000

19900

1000

900

Minimum Connecting Time -

Page 16: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

_Availability suppression rules

_Market and Point of Sale matching

• E.g., most precise geographical location, or

travel agent office

_Two strategies

• Use inference: market rule triggers other rules

• Hardcoded facts preprocessing logic

16

PerformancesMarket and Point Of Sale Semantics

0

200

400

600

800

1000

1200

Drools (~300 rules

w/ inference)

Drools (~150 rules

no inference)

ABR (~150 rules)

Availability Suppression - Latency (us)

Rules Evaluation IPC Facts Encoding / Decoding

Page 17: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

IPC solutions2 candidate solutions for Latency/CPU compromise

74%

26%

ZEROMQ IPC

Drools evaluation IPC

Latency: 108 us

95%

5%

INFORMATICA IPC

Drools evaluation IPC

Latency: 84 us100 Bytes

1K Bytes

10K Bytes

73%

27%

Latency: 110 us

67%

33%

Latency: 120 us

95%

5%

Latency: 84 us

89%

11%

Latency: 90 us

Payload size

Page 18: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Definitely candidate for integration in Amadeus Backend Applications

_ BRMS Drools scalable and faster than ABR

• BRMS : Average latency of 80us from 10 to 200 000 rules

• ABR: Average latency of 100us to 20ms from 10 to 200 000 rules

_ BRMS Drools better CPU consumption on certain usecases*

• BRMS : 1 Million evaluations/sec with 70 cores

• ABR : 1 Million evaluations/sec with 700 cores

• BRMS : 24 cores machine: 350 000 evaluations/sec

• ABR: 24 cores machine: 35 000 evaluations/sec

_ Validation of our long term vision to have a common rule engine for C++ and Java applications

* N.B.: This extrapolation is an order of magnitude measured in local development machines for MCT & FAC rules. CPU usage may defer depending on how complex the rules are.

Page 19: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

C++ Application Server

Architecture for C++ Application Servers

Amadeus

Data

Replication

Framework

C++ OLTP Process

Drools Server

KieContainer

Worker

Thread

Worker

Thread…

dispatcher

IPC (Unix Socket)

Rolling

Deployment

Thread

KJar

KJar

Page 20: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

0

100

200

300

400

500

600

700

10k rules 100k rules

KieContainer Loading Time (sec)

DRL/Kjar Serialized kBase

Rolling Deployment

_ Goal: avoid outage while switching to new rules version

• Load new KieContainer in separate thread

• Switch reference when ready

• Weak References to avoid classloader leaks

_ Server startup time still impacted

• Critical operability criterion

• KieBase serialization helps

Page 21: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

BRMS Drools for C++Technical Stack

Drools Facts

C++ BOM

This image cannot currently be displayed.

Protocol Buffer

encoding

Inter Process

Communication

(Unix Socket)

Amadeus BRMS Drools Server

Rule Evaluation

Request

IPC Dispatching

Load balancing

Encoding

Decoding

Rule evaluation

C++ OLTP Process

Amadeus BRMS Drools Client Lib

Rule Evaluation

Result

ZeroMQ-managed IPC channel• Rule evaluation jobs queueingqueueingqueueingqueueing• Load balancing Load balancing Load balancing Load balancing over multiple worker threads • Seamless crash resiliencyresiliencyresiliencyresiliency

Page 22: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

22

© A

ma

de

us

IT G

rou

p a

nd

its

aff

ilia

tes

an

d s

ub

sid

iari

es

Drools Fiddlehttps://github.com/droolsfiddle

Page 23: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container
Page 24: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Page 24

_ Openshift

• Intensive collaboration for Amadeus Cloud Services

_ BRMS

• Excellent contact with Gabriel!

• Kick off with 1 months consultancy

• Functional and technical understanding

• Architecture

• Benchmarks

• 3 days technical workshop in Boston with Edson

• BRMS Enterprise Subscription

• 3 months consultancy per year

RedHat & Amadeus collaboration

Page 25: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Page 25

_ Alias feature to emulate the rolling deployment BRMS 7

_ Drools Fiddle : potential integration in BRMS Workbench New repository & blog

_ Protobuf encoding for KieServer commands

_ KieBase protobuf serialization in the KJar

Upstream and next steps

Page 26: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container
Page 27: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Memory profiling of the JVM

_ Current worse case scenario : 1 rule type MCT, 1 owner, 200k rules

© 2

01

5 A

ma

de

us

IT G

rou

p S

A

Page 28: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Memory profiling of the JVM

_ Average application : 1 rule type, 25 owners, 1k rules, 1 JVM, 10 workers

© 2

01

5 A

ma

de

us

IT G

rou

p S

A

Page 29: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Drools scalability

© 2

01

5 A

ma

de

us

IT G

rou

p S

A

~ 80 us

Drools

rules

rules

Average Evaluation response time/ruleset size

Evaluation response time for 200k rules

Page 30: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Different IPC solutions comparison

_ Latency

© 2

01

5 A

ma

de

us

IT G

rou

p S

A

InformaticaSpeedusZeroMQ

Page 31: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Different IPC solutions comparison

_ CPU Active

© 2

01

5 A

ma

de

us

IT G

rou

p S

A

Page 32: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Different IPC solutions comparison

_ CPU Idle

© 2

01

5 A

ma

de

us

IT G

rou

p S

A

Page 33: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Time to load rules package in memory

© 2

01

5 A

ma

de

us

IT G

rou

p S

A

0

5

10

15

20

25

30

35

40

10k Rules

DRL

KJAR

Serialized kBase

s

Page 34: Agenda - Red Hat · Amadeus OTF Application Server Service Oriented Architecture The Open Transaction Framework (OTF) is the Amadeus’ Enterprise Application Server, a container

Throughput and CPU measures

© 2

01

5 A

ma

de

us

IT G

rou

p S

A

_ Concurrent c++ clients sending rules

evaluation to a single java server

_ Measure of the CPU consumed by the

JVM

_ On local development machines, we

can serve 100k TPS by using around 7

cores (for FAC)

_ CPU/TPS graph shows the CPU cost of

1 transaction

_ Extrapolation

_ 1M TPS => ~70 cores

_ 1M TPS for ABR => 700 cores!