White Paper

WHITE PAPER

07/2017

The Different Levels of Streaming Analytics: Use Cases

By Srinath Perera
Vice President - Research, WSO2

1. Introduction

Streaming analytics allows users to monitor event streams and respond to complex conditions within milliseconds. For example, a bank may use streaming analytics to monitor transactions and trigger an alert when a suspicious transaction takes place.

What this means is that streaming analytics essentially enables users to respond to changing conditions within seconds to milliseconds. Hence, it's also classified under real-time analytics.

Streaming analytics comes in many forms ranging from detecting simple conditions (e.g. temperature is greater than 30oC) to complex pattern detection (e.g. triple bottom pattern has been seen over Apple trading data). Refer to the blog post Patterns for Streaming Real-time Analytics for more details.

For a reader who would like to understand the different flavors of streaming analytics, the Gartner report titled The Five Levels of Stream Analytics1 released in February 2017 will be useful.

The Gartner report1 first makes several observations in its 'Recommendation'; excerpts from the report are as follows:

  1. "While event stream processing isn't new, there is a resurgence of interest in speeding up time to insight for business intelligence and analytics processes"
  2. "Despite increases in both the demand for stream analytics and the supply of available technology, today's stream processing deployments remain on the fringe of most IT departments"

The Gartner report1 outlines five maturity levels for streaming analytics, which provide a roadmap for organizations to follow. The report introduces five maturity levels that have been summarized in Figure 1 below.

Figure 1

Figure 1: Maturity Roadmap for Stream Analytics

This white paper discusses how enterprises can implement each of these levels using the WSO2 Analytics Platform to derive value from streaming data.

2. Implementing Level 1: Ingesting

According to the Gartner report1, in the 'Analysis' section, at this level, "efforts are aimed at ingesting the data as it arrives; sometimes applying data integration techniques in real time (ltering, enrichment, complex-event processing [CEP] for feature generation/abstraction); storing the data in a data lake or other data store; or conducting the analytics on the data at rest at a later time."

WSO2 Data Analytics Server (WSO2 DAS) supports data ingesting out of the box. With WSO2, users represent data as streams where they can publish data over multiple protocols, such as JMS, Kafka, HTTP, and Thrift. Users can filter, edit, transform, detect patterns, or correlate those queries with Siddhi streaming SQL like query language. After processing, users can write the results to a disk (a relational database or an HBase cluster).

For example, the following query filters the stream to only keep events with the condition price > 100 and reshapes the stream.

from inputStockStream[price > 100]
select symbol, price * volume as transactionAmount insert into outputStockStream

Please refer to this link for more information
https://docs.wso2.com/display/DAS310/Siddhi+Query+Language.

The following are some preprocessing actions that are possible with WSO2 DAS:

  1. Filtering events
  2. Reshaping and transforming events (e.g. bring events in multiple schemas to one schema)
  3. Enriching events (e.g. add customer ID to record after looking up a data base)
  4. Aggregation (e.g. when the data rate is high, only keep per second or per hour summaries)
  5. Fix missing data (e.g. imputing replacement value), detect and flag errors, error correction
  6. Join event streams and correlation

Ingesting can cleanup the data and enforce a shared schema. We believe this can make the rest of the processing simple and avoid each data processing task to repeat the cleanup logic. Furthermore, it stops different tasks from using different definitions of cleanup data.

Data ingesting that's possible with DAS are not limited to the above use cases. A good example of a smart ingesting system can be found in a railway sensing system, where each part of the railway is monitored with overlapping sensors. This allows the system to detect malfunctioning sensors and automatically fixes the readings as part of the ingesting system.

3. Implementing Level 2: Orienting

According to the Gartner report1, in the 'Analysis' section,, "at this level, the enterprise, or more likely specifc business units, recognizes the uses for stream processing for situation awareness around marketing, customer support or operations monitoring." In our view, this may include a dashboard with visualization to show the current status in context to the past.

WSO2 DAS has been used to build real-time situational dashboards. For example, consider the following use case where video uses data streams collected from buses in London (via Transport for London) to track, monitor, and visualize their operations. Refer to WSO2 TFL demo for more details.

In another example, video uses data streams collected from a real football game through sensors deployed in the ball, player's boots, and goalkeeper's gloves to track the game in real time and to provide high level event statistics, such as ball possession time and detecting offsides. Refer to our Football Analytics use case story for more details.

The following are a few more sample use cases that are possible with WSO2 DAS:

  1. Operation dashboards showing progress towards a goal
  2. Trend analysis
  3. Drug interaction warnings for a doctor in prescription view
  4. Risk analysis views for a portfolio and alerts
  5. Logistic monitoring and optimization views
  6. Location analytics and tracking

As mentioned earlier, a key aspect of this level is to present the data in context to make it easier to have situational awareness. Among examples of this are alerts, color coding to show what's normal and abnormal, past averages with data, etc.

Furthermore, for some domains, such as finance and banking and smart energy, WSO2 provides out-of-the-box solutions. Refer to http://wso2.com/smart-analytics/solutions/ for more details on these solutions.

4. Implementing Level 3: Advising

According to the Gartner report1, in the 'Analysis' section, "at this level, the stream processing is extended with model-based decision support capabilities."

To illustrate the implementation of this level, let us consider the WSO2 Fraud and Anomaly Detection Solution. This solution provides a system that may detect a fraud and raise an alert, allowing the operator to go to a view that shows the incident and data around the incident to make the final decision and carry out the task from the same view itself.

Moreover, most systems would provide prescriptions that are potential solutions, further aiding human decision.

The following are more examples where WSO2 DAS can be used to build an advising solution:

  1. Fraud detection
  2. Medical diagnostics
  3. Traffic predictions
  4. Churn alerts
  5. Crime predictions

5. Implementing Level 4: Deciding

According to the Gartner report1, in the 'Analysis' section, "the focus at this level is improving capabilities to ensure reliability, quality and fault tolerance or to accelerate the time to respond to emerging situations because a human is not required in the loop."

We believe decisions systems are used in various situations as follows:

  1. When outcome has very high confidence
  2. When downside of a failure is not apparent or negligible (e.g. production recommendation, advertisement)
  3. Things happen too fast to include a human in the loop

At the same time, we feel these algorithms need to be carefully monitored as they can have unexpected consequences. Among some examples are 23 million book in Amazon and stock market flash crashes. Hence, these solutions must be carefully designed and tested.

For example, as explained in the Experian Case Study, WSO2 DAS is used to make advertisement placement decisions and these are then carried out. The following are more examples where WSO2 DAS has been or can be used to provide deciding solutions.

  1. Algorithmic trading
  2. Advertisement buy and placement
  3. Targeted offers for smart grid and other energy optimizations, such as Next
  4. SPAM detection
  5. Throttling
  6. Product recommendations

Furthermore, for some domains such as finance and banking, and smart energy WSO2 provides out-of-the-box solutions.

6. Implementing Level 5: Learning

According to the Gartner report1, in the 'Analysis' section, "at this level, the organization's streaming data and analytics capabilities use machine learning to adapt to changing market and environmental conditions."

With WSO2 DAS a user can run machine learning models built with Apache Spark or model exported to Predictive Modeling Markup Language (PMML). Most R and Python models can be exported as PMML.

Figure 1

Figure 2

A sample query to evaluate the model using CEP looks as follows:

from data_input#h2opojo:predict('ccpp/DRF_model_python_1479702792496_1')
select T, V, AP, RH, prediction
insert into data_output

You can find detailed instructions from
https://docs.wso2.com/display/ML100/WSO2+CEP+Extension+for+ML+Predictions.

The following are two learning systems that are built with WSO2 DAS.

The following are a few specific example learning systems that you can built with WSO2 DAS:

  1. Recommendations
  2. Fraud detection
  3. Intruder detection
  4. Churn prediction
  5. Predictive maintenance
  6. Ranking (e.g. customers)
  7. Video analytics
  8. Sequence detection, pattern detection
  9. Sentiment analytics and text analytics

7. Conclusion

Streaming analytics comes in many flavors and its adoption significantly differs from case to case. Gartner's five maturity levels enable users to evaluate the maturity of their streaming use cases and provides a path to make full use of streaming analytics. By incorporating these, we believe enterprises can address the business challenges faced with the adoption of technology that's required to remain competitive and act fast on new business opportunities. They particularly help organizations to find that balance between their technology and business strategies.

This paper explains how each of these levels can be implemented with WSO2 DAS, a powerful open source analytics product that analyzes data streams in real time.

8. References

For more details about our solutions or to discuss a specific requirement contact us.

x

Interested in similar content?