wso2con eu 2016: an introduction to the wso2 analytics platform

31
Introduction to WSO2 Analytics Platform Srinath Perera (@srinath_perera) VP – Research WSO2

Upload: wso2-inc

Post on 13-Feb-2017

188 views

Category:

Technology


7 download

TRANSCRIPT

Page 1: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Introduction to WSO2 Analytics Platform

Srinath Perera (@srinath_perera) VP – Research WSO2

Page 2: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

A Day in Your Life

Page 3: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Value Preposition

Page 4: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform
Page 5: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform
Page 6: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Collect Data §  One Sensor API to publish

events -  REST, Thrift, Java, JMS,

Kafka -  Java clients, java script clients*

§  First you define streams (think it as a infinite table in SQL DB)

§  Then publish events via Sensor API

Page 7: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

“Publish once, process anyway you like”

Page 8: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Collecting Data: Example

§  Java example: create and send events §  Events send asynchronously §  See client given in http://goo.gl/vIJzqc for more info

Agent agent = new Agent(agentConfiguration); publisher = new AsyncDataPublisher("tcp://hostname:7612", .. ); StreamDefinition definition = new StreamDefinition(STREAM_NAME,VERSION); definition.addPayloadData("sid", STRING); ... publisher.addStreamDefinition(definition); ... Event event = new Event(); event.setPayloadData(eventData); publisher.publish(STREAM_NAME, VERSION, event);

Send events

Define Stream

Initialize Stream

Page 9: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Data Collection Examples •  Collect data from inbuilt agents in

WSO2 products, Tomcat etc. •  Collecting your log data via log stash •  Collecting JVM and JMX stats via

agent •  Ingesting data from message queues

such as JMS or Kafka •  Pulling data from a RSS feed, or

scraping a web page •  Write a custom agent to collect data

from your system and push it to DAS

Page 10: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Analysis: Batch Analytics •  Batch analytics reads data from a disk ( or some other

storage) and process them record by record •  “MapReduce” is most widely used technology for batch

analytics –  Apache Hadoop –  Apache Spark 30X faster and much more flexible

•  Analytics (Min, Max, average, correlation, histograms, might join or group data in many ways)

Page 11: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

SQL like Queries: Spark SQL §  Since many understands SQL, Hive made

large scale data processing Big Data accessible to many

§  Expressive, short, and sweet. §  Define core operations that covers 90%

of problems §  Lets experts dig in when they like! (via

User Defined functions)

insert overwrite table BusSpeed select hour, average(v) as avgV, busID from BusStream group by busID, getHour(ts);

Page 12: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Use Case: ESB Analytics ▪ Detailed tracing ( Message level and

mediator level) and data analysis via DAS ▪ Drill down by time, by services,

mediators, then trace back to “invocation, activity etc” ▪ Visualize Execution ▪ Finding Hot spots

Page 13: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Value of some Insights degrade Fast!

§  For some usecases ( e.g. stock markets, traffic, surveillance, patient monitoring) the value of insights degrades very quickly with time.

§  We need technology that can produce outputs fast §  Static Queries, but need very fast output

(Alerts, Realtime control) §  Dynamic and Interactive Queries ( Data

exploration)

SeeWSO2ConExperianTalk(DigitalMarke8ng)-seevideo

Page 14: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Real Time Analytics

Page 15: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

People Tracking via

BLE •  Track people through BLE via

triangulation

•  Higher level logic via Complex

Event Processing

•  Traffic Monitoring

•  Smart retail

•  Airport management

Page 16: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Case Study: Realtime Soccer Analysis

Watch at: https://www.youtube.com/watch?v=nRI6buQ0NOM

Page 17: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

CEP Queries on top of Storm

▪  Accepts CEP queries with hints about how to partition streams ▪  Partition streams, build a Apache Storm topology running CEP nodes as Storm

Sprouts, and run it. see http://goo.gl/pP3kdX for more info.

Page 18: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Interactive Analytics §  Best way to explore data is by

asking Ad-hoc questions §  Interactive Analytics ( Search)

let you query the system and receive fast results (<10s)

§  Shows data in context (e.g. by grouping events from the same transaction together)

§  Built using Lucence based Indexes.

SparkSQL> SELECT * FROM TWITTER_DATA

Page 19: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Predictive Analytics §  Can you “Write a program to drive a Car?” §  Machine learning

§  Takes in lot of examples, and build a program that matches those examples

§  We call that program a “model” §  Lot of tools

-  R ( Statistical language) -  Python ( Pandas, sklearn, Theano,

Tensorflow) -  Apache Spark’s MLBase and Apache

Mahout (Java)

Page 20: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Predictive Analytics in DAS •  Building models

–  With WSO2 Machine Learner Product via a Wizard ( powered by MLLib)

–  Build model using R and export them as PMML

•  Built models can be used them with both WSO2 CEP and ESB

Page 21: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Predict Wait Time in the Airport •  Predicting the time to

go through airport

•  Real-time updates and events to passengers

•  Let airport manage by allocate resources

Page 22: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Anomaly Detection •  Has things changed?

– Anomalies by value though “Clustering”

– Anomalies through time using Markov Chains

•  Detect Problems are drill in to find details

•  Available as a solution 1.  hAps://www.youtube.com/watch?v=aLwG4thHOXg2.  hAp://wso2.com/analy8cs/solu8ons/fraud-and-anomaly-

detec8on-solu8on/3.  hAp://wso2.com/whitepapers/fraud-detec8on-and-preven8on-

a-data-analy8cs-approach/

Page 23: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Anomaly Detection: API Analytics ▪  Includes API Statistics ▪ Relatime anomaly Detection ▪ Alert Dashboard ▪ Examples ▪ API health monitoring ▪ Abnormal response times ▪ Request Pattern Detection ▪ Detection access from New

or rarely used Host names ▪ Abnormal Tier Usage and

tier limit crossings

Page 24: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

IoT Analytics ≅Anomalies •  Visualizing and Detecting Conditions

about Moving Dots

•  Visualizing, finding Problems, and Drilling Down, and doing Root cause analysis on Equipment Networks

•  Doing Anomaly Detection on time series data

DetaileddiscussioninThinkingDeeplyaboutIoTAnaly8cs,hAps://iwringer.wordpress.com/2015/10/15/thinking-

deeply-about-iot-analy8cs/

Page 25: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Communicate: Dashboards •  Dashboard give an “Overall

idea” in a glance (e.g. car dashboard) –  Boring when everything is good!!

•  Build your own dashboard. –  WSO2 DAS supports a gadget

generation Wizard –  You can write your own Gadgets

using D3 and Javascript.

Page 26: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Gadget Generation Wizard

•  Starts with data in tabular format •  Map each column to dimension in your

plot like X,Y, color, point size, etc •  Create a chart with few clicks

Powered by VizGrammer lib that uses Vaga undneath (see

https://github.com/wso2/

VizGrammar)

Page 27: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

IoT Analytics ▪  IOT Server collects data from

devices and send them to DAS ▪  Includes detailed device

management analytics ▪ Device providers can write their

analytics templates ▪ Device developers can also create

self service charts with zero coding through “Gadget Generation Wizard”

Page 28: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Communicate: Alerts

▪ Done with CEP Queries ▪ Last Mile (Email, SMS, Push notifications to a UI, Pager, Trigger

physical Alarm) ▪ E.g. API Manager Alert Dashboard

Page 29: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Analytics Templates ▪ Parameterized Analytics

Queries Written as Templates ( MACRO) ▪ End users can create

new instances by filling a form ▪ API analytics use cases

are done this way!

Page 30: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

Key Differentiators ▪ Open Source, under Apache 2 license ▪ Publish data once, analyze it anyway you like ▪ Flexible packaging or as a scalable cluster ▪ Rich, extensible, SQL-like configuration

language ▪ Compact, easy to learn syntax addressing

complex requirements, such as time windows, patterns, sequences which would be complex to develop in a programming language such as Java. ▪ Rich set of data connectors

Page 31: WSO2Con EU 2016: An Introduction to the WSO2 Analytics Platform

ThankYou!

#WSO2ConEU

Shareyourfeedbackforthissessionwso2con.com/app