27
High Performance CEP: The SAP Sybase Event Stream Processor Technical Product Overview Speaker’s Name/Department (delete if not needed) Month 00, 2011

SAP Sybase Event Streaming Processing

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: SAP Sybase Event Streaming Processing

High Performance CEP: The SAP Sybase Event Stream Processor

Technical Product Overview

Speaker’s Name/Department (delete if not needed)

Month 00, 2011

Page 2: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 2

Insight from fast-moving data: Continuous Intelligence

Analyze events as they occur

• Continuous insight

• Immediate response

Rapid application development

• Reduce/eliminate dependence on specialist

programming skills

• Cut implementation/deployment time

• Improve business agility

Non-intrusive deployment

• Event-driven architecture

• Adapt to existing data models

Page 3: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 3

The SAP Sybase Event Stream Processor

• Unlimited number of input

streams

• Incoming data is processed as it

arrives, according to the

business logic defined using high

level authoring tools

• Send output to apps, dashboards

• Capture data in SAP HANA, Sybase IQ,

Sybase RAP for historical analysis,

compliance

?

INPUT

STREAMS

Sensor Data

Transactions

Events

Reporting

Tools

Applications

Studio

(Authoring)

Reference

Data

SAP®

Sybase®

ESP SAP HANA, Sybase IQ

Dashboard

Message

Bus

Page 4: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 4

Sample Architecture of a CEP-based Application:

Real-time P&L

Historical Analytics,

Ad-hoc Analysis,

Compliance

Mark

et

Data

Mid

dle

ware

Reuters

Bloomberg

Nasdaq

Sybase

IQ

Order Management Systems

Market Prices

Trading Systems

Live Dashboard

Alerts

Page 5: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 5

Two approaches to CEP

Rules Continuous

Queries

Page 6: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 6

Key Concepts

Input Streams Events arrive on input streams

Derived Streams,

Windows Apply continuous query

operators to one or more

input streams to produce a

new stream

Database Analogy • Streams are like tables

• Events are rows in the table

• Fields in an event message are

columns in the table

Windows can Have State • Retention rules define how many or how

long events are kept

• Opcodes in events can indicate

insert/update/delete and can be

automatically applied to the window

Page 7: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 7

ESP Studio: Both visual and textual authoring

• ANALYST-LEVEL SKILLS (EXCEL, VBA)

• EASY TO UNDERSTAND COMPLEX MODELS

• NO NEED TO LEARN LANGUAGE SYNTAX

• RAPID PROGRAMMING

• EASY TO USE LANGUAGE (CCL)

• MODULAR, PROJECT BASED APPROACH

Visual Dataflow Authoring Language-based Authoring

ESP Studio supports both Visual and Textual authoring

• Visual diagram produces CCL (code-behind approach)

• User can switch back and forth between diagram and language

• Eclipse-based

Page 8: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 8

CCL: Continuous Computation Language SQL-based Event Processing Language

Leverage familiarity and simplicity of SQL

Instead of “snapshot” queries, continuous queries

Filter (WHERE), Aggregate (GROUP BY), Join, Compute

Extensions for event streams

Windows, Patterns

Example CCL Query

Calculation of 10

minute VWAP

CREATE LOCAL WINDOW VWAP10

PRIMARY KEY DEDUCED

AS

SELECT

TICKER.Symbol AS Symbol ,

Sum ( TICKER.Price * TICKER.Size) / Sum ( TICKER.Size)

AS VWAP

FROM TICKER KEEP 10 MINUTES

GROUP BY TICKER.Symbol ;

Page 9: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 9

Key CCL Language Features

• Stateless and stateful elements.

– STREAMS (stateless without keys)

– WINDOWS (stateful with keys)

– Windows push updates and automatically process

opcodes.

• Retention policies on Windows

– Named windows (windows created with “CREATE

WINDOW..”)

– Unnamed windows (FROM A KEEP 5 ROWS)

– Time and Count based retention policies

– Custom windows with EventCache

• Parameters, Variables

– Variables can maintain state

• Full support for JOINS

– ANSI JOIN Syntax

– Stream-Window Joins and Window-Window joins

• Filter

• Aggregate

– Group By, Group Filter, Group Order

• Pattern Matching

– Watch for specific sequence of events within time

interval

– Within or across streams

– Pattern can include missing events

• Transform/Project

– Change event schema, compute new fields

Page 10: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 10

SPLASH scripting adds extensibility to CCL

SPLASH (Stream Processing LAnguage SHell) was introduced in Aleri to provide

extensibility and overcome the limitations of SQL

It complements CCL, providing the ability to write custom functions and stream/window

operators using a simple, procedural language that is optimized for stream processing

Syntax is similar to C and Java, it’s spirit is closer to little languages like AWK or Perl

ESP 5.0 has full support for SPLASH

For more info see the SPLASH Tutorial on sybase.com (in the Aleri Product Documentation/Manuals)

if (temperature < 0) {

display := 'below zero';

} else if (temperature = 0) {

display := 'zero';

} else {

display := 'above zero';

}

Control Structures: if, while, switch

Data Structures:

- Variables - Vectors - Dictionaries - Event Cache

Flex Streams:

- Custom event “handlers” written in SPLASH

Page 11: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 11

Modularity

Benefits:

Facilitates re-use

Simplifies team development

Improves manageability of

large projects

CREATE MODULE • Defines a module consisting of

windows and streams

• Define inputs, outputs,

parameters

IMPORT • Equiv. to #include – include

external .ccl file(s)

• Beyond modules, re-use

declarations, etc

LOAD MODULE • At load point, define bindings

and parameters

• Same module can be loaded

multiple times

Page 12: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 12

Support for External function libraries (UDF)

• Call out to external function libraries

• Support for C and Java

• Can be used to supplement built-in functions

• Can also be used to “trigger” external actions

Page 13: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 13

ESP Studio: RUN/TEST Tools

Single click to Run a project

Rich Suite of Testing, Tuning and Debugging tools

Stream viewer

Record/playback

Manual event input

Performance Monitor

Event Tracer

Debugger with Breakpoints

Multi-server control

View/monitor projects running on multiple servers and clusters

Page 14: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 14

ESP Advanced Cluster Architecture

Controller

Manager

Manager

Manager

Manager

Controller Controller

Private

Cloud

Project Project

Project Project Project

Project Project

Project Project Project

Project Project

Project Project Project

Page 15: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 15

ESP Cluster Architecture Key Features

Manager • Equi-peer management of cluster.

• Program deployment and lifecycle control.

• Program load balancing at deployment.

• Launcher failure detection.

• Container failure detection.

• Program failover.

• Publishes lifecycle updates for Managers, Controllers and Programs.

• Name resolution.

Controller • Acts as a daemon for Managers to launch Container processes.

• Allows for launching of any configured Program type.

Container • Process that hosts a Program (i.e. – esp_server).

Page 16: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 16

Choice of high availability configurations

Configurable to your level of

availability and flexibility needs

Instant failover to "hot" spare

• highest degree of availability

• recovery in seconds; no data loss

Shared resources "warm" spares

• flexible configurations

• recovery in minutes

• parallel & pipeline configurations

All managed by fault tolerant

cluster manager

FT Cluster

Manager

Parallel & Pipelined

Shared Warm Spares

Shared

State

Synchronized

Hot Spare

Page 17: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 17

ADAPTERS

Standard

(Built-in)

• JMS, MQ, TIBCO

• Sockets

• Databases

• Files

• MS Excel

• Email (out)

Optional

(Add-on)

• Market Data • Reuters, NYSE Tech

• FIX

• Rep Server

Custom

(SDK)

• C/C++

• Java

• .NET

Page 18: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 18

Integration/Connectivity

In-Process Adapters

• Entirely under the control of the ESP server.

• Performance advantages

• No hot-standby at the adapter level

• C/C++ only

External Adapters

• Independent of ESP Server

• Uses ESP pub/sub API

• TCP socket connectivity to ESP Server

• Auto-failover in hot-standby configurations

• C/C++, Java, .NET

Application with Native ESP

Support

• Embed ESP pub/sub API directly in producer or consumer applications

Page 19: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 19

USING Sybase Replication Server for Change Capture Real-time change capture: turn database transactions into event streams

Replication Agent

Replication Server

Database

SAP Sybase ESP

Transactions (insert, update,

delete) Real-time Event

Stream

Page 20: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 20

ESP Project

High Level ESP Architecture

Query Engine

Launcher

Cluster Manager

Se

cu

rity

(K

erb

ero

s, P

AM

, S

SL

)

Data Source/Destination

Client

Log File

Security

Distributed Cache SDK Interface URI Resolution

Lifecycle/Status

SD

K -

.N

ET

\ JA

VA

\C+

+

Adapter

Studio

Ga

tew

ay

Window Stores

Adapter Framework

Load Balancing Failover

Co

mm

an

d &

Co

ntr

ol

Compiler

Tools SQ

L Q

ue

ry

Internal

Adapter

s

SDK

External

Adapter

s

Page 21: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 21

What sets SAP Sybase ESP apart

• Performance

− Scalable for extreme throughput

− Consistent low-latency

− Only CEP vendor to submit to STAC

benchmarking

• SPLASH scripting

− Overcome limitations of SQL

− Flexibility and productivity

• Authoring flexibility

− Language or UI/IDE

• “Private Cloud” Architecture

− Scalable, Dynamic

• State Management

− Unique ability to automatically apply

incoming events as

inserts/updates/deletes to a table

− Simplifies modeling

− Extremely efficient

• Dynamic

− Add continuous queries to live system

• High Availability

− Hot-Hot with Auto-Failover

• Advanced Subscriptions

− Initial state followed by updates

− Subscriptions with predicates

Page 22: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 22

Source: STAC Research Sep 08 – conducted against Aleri 3.1; 5.0 performance is

similar

The only CEP vendor to publish STAC benchmarks

High Performance

STAC Certified measurement of throughput and latency

• Linear scaling with addition of more cores:

180,000 messages/sec on 16 cores

300,000 messages/sec on 24 cores

• Consistent/predicable low latency.

Only minor increase in latency from 20,000 to 300,000 messages/sec:

Mean: 1.296 - 1.568 ms

Medium: 1.177 - 1.502 ms

Std Dev: 0.567 - 1.104 ms

Min: 0.091 – 0.115 ms

99th percentile: 2.479 – 3.165 ms

Page 23: SAP Sybase Event Streaming Processing

PANOPTICON EX REAL-TIME DATA VISUALIZATION

Page 24: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 24

Visually Rich Real-time Dashboards with

Historical Drill-down and Analysis

Page 25: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 25

Panopticon EX Features

Visual Data Analysis

Real-time streaming from Sybase ESP

Historic Time Series data from Sybase RAP or IQ

Drag-and-Drop Designer

Rich palette of charting objects

Simple configuration

No coding required

Multi-dimensional Analysis (in-memory OLAP)

Delivered via Desktop (thick client) or Web (browser)

SDK provides APIs for ability to customize, embed

Page 26: SAP Sybase Event Streaming Processing

© 2012 SAP AG. All rights reserved. 26

Panopticon EX for ESP

Native integration with Sybase

ESP, RAP, and IQ

True real-time dashboards,

subscribing to ESP streaming

output

Seamless drill-down into

historical time series data in

Sybase RAP

Panopticon EX

Reduces Insight

Latency

It’s Not Just the Time it

Takes to Get the Data

It’s also the time it

takes to understand the

data

Rich Palette of

Visualization Tools

Designed to Make it

Easier to Understand the

Data

Page 27: SAP Sybase Event Streaming Processing

Thank you

Contact information:

F name MI. L name

Title

Address

Phone number