Introducing Oracle Event Processing NoSQL Database Data Cartridge

Transcription

Introducing Oracle Event Processing NoSQL Database Data Cartridge -1

Hi, and welcome to this online, self-paced tutorial about Oracle NoSQL Database.My name is Swarnapriya Shridhar. I will be your guide on behalf of the course author, SalomeClement. This short tutorial explains how to integrate oracle event processing with OracleNoSQL Database.Introducing Oracle Event Processing NoSQL Database Data Cartridge -2

Introducing Oracle Event Processing NoSQL Database Data Cartridge -3

Introducing Oracle Event Processing NoSQL Database Data Cartridge -4

This tutorial describes the Oracle NoSQL Database Data Cartridge. You will first get anoverview of event processing and then learn about the Oracle NoSQL Database DataCartridge.In the overview section, you will learn about event processing, Oracle Event Processor andhow event processing is related to Big Data. You will then understand the use of eventprocessing in the big data world with the help of a use case.Introducing Oracle Event Processing NoSQL Database Data Cartridge -5

An event is anything that happens that is significant to an enterprise. Event processing is thecapture, processing and consumption of events. Processing includes formatting, filtering,correlation, enrichment, aggregation, and pattern matching of the events.Introducing Oracle Event Processing NoSQL Database Data Cartridge -6

In an event driven architecture, there are three main components: an event source, an eventprocessor, and an event consumer.In an enterprise network, events are produced when business processes start and completeor fail. Some events can be detected by sensors. By processing these events, the activity ofthe enterprise and its business can be monitored and changed. You can detect businesssituations and derive early and intelligent insight to assist you in making timely and effectivebusiness decisions.There are three approaches to event processing: event passing, event routing, and complexevent processing.In this tutorial, we will be talking about complex event processing. Complex event processing,or CEP, is event processing that combines data from multiple sources to infer events orpatterns that suggest more complicated circumstances. The goal of complex event processingis to identify meaningful events and respond to them as quickly as possible.Introducing Oracle Event Processing NoSQL Database Data Cartridge -7

Introducing Oracle Event Processing NoSQL Database Data Cartridge -8

Relational databases are best equipped to run queries over finite stored data sets. A storeddata set is appropriate when significant portions of the data are queried repeatedly andupdates are relatively infrequent. However, modern applications generate data streams asopposed to data sets, such as sensor data applications, financial tickers, networkperformance measuring tools, network monitoring and traffic management applications, andclick stream analysis tools. These applications require long-running queries over continuousunbounded sets of data. In addition, data streams represent data that is changing constantly,often exclusively through insertions of new elements.For managing and processing data in such applications, a different data management andquerying capability, such as an event processor, is required. To address this requirement,Oracle SOA Suite provides Oracle Event Processing (OEP), a data managementinfrastructure that supports the notion of streams of structured data records together withstored relations.You will learn more about OEP in the next slide.Introducing Oracle Event Processing NoSQL Database Data Cartridge -9

Oracle Event Processing is a component of SOA suite, and can also be downloadedseparately. OEP is a complete solution for building applications to filter, correlate, andprocess events in real-time so that downstream applications, service oriented architectures,and event-driven architectures are driven by true, real-time intelligence. It is a light weight,java based application server, which connects to high volume data feeds and has a eventprocessing engine to match events based on user defined rules.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 10

An OEP application consists of four components: adapters, streams, processors, andbusiness logic. These components are connected to each other to form an Event ProcessingNetwork.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 11

Introducing Oracle Event Processing NoSQL Database Data Cartridge - 12

Big Data has evolved with the expansion of internet and mobile network usage. Businesseswant to acquire all the data generated around them and process and analyze that data toenhance their business further. A huge amount of data that is generated is semi-structured orstructure less, which can not be stored in traditional relational databases due to their volume,velocity, variety, and value. Oracle NoSQL Database is a solution to acquire and store suchBig Data.For real-time applications using event driven architectures and wanting to use this big data,there needs to be a mechanism to communicate with the Oracle NoSQL Database. OracleNoSQL Database Data Cartridge for event processing is a solution to this requirement. Laterin this tutorial, you will learn more about this data cartridge. Before that, this big data andevent processing scenario is explained further using a use case. Click next to proceed.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 13

A study of the US heathcare industry shows that a handful of patients with chronic medicalconditions like Diabetes, Heart disease, Pulmonary Disease, Cancer, and Obesity consumea large portion of our heathcare resources.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 14

Triggered by these unsustainable costs and with the support of changing science andevolving care delivery models, the heathcare industry is reviewing its procedures to find analternative way to delivery medical care by implementing the Big Data solution. Let usimplement this solution to a simple medical care situation.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 15

Mark, 69 year old, has been facing heart and blood pressure related heath problems for sometime. Today he is feeling the symptoms of high blood pressure and decides to visit his localcity hospital. The on-duty heart specialist reviews Marks condition using tools that show all ofMarks heath history including all doctor notes, prescriptions, and lab reports. The specialistdecides to monitor Marks heath more closely. Mark is given a Remote Patient MonitoringDevice and instructed to perform routine heart and blood pressure tests and send the resultsto the heathcare facility. The test results will be received by the heathcare facility in real timeand monitored by the specialist. Any anomalies in the results or even lack of results within aspecified time interval will trigger an alert that is sent to the specialist and an immediateresponse will be given. Since the device is user-friendly and easy to operate, Mark is quicklytrained on how to use it to monitor himself.What you saw here was a very simple use case scenario. But, you can see how the patient’scondition is monitored regularly to prevent anything serious from happening and also cuttingdown the in-patient expenses. Lot more exciting innovations can be expected in the heathcareindustry because of Big Data.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 16

Now, let us look at the components involved in building this solution and where exactly theOracle NoSQL Database data cartridge is used.[[When a user sends test results using the remote monitoring device, events are reported toOEP that consist of a DeviceID and the current test results of the patient. OEP then takes thisdata, performs required processing, and also determines if there is any anomaly. If ananomaly is noted, then an alert is created and sent to the concerned authorities. The alertcontains all required details about the patient that is stored in Oracle RDBMS as well as theOracle NoSQL Database. The DeviceID is used to query the databases. In order to query anOracle NoSQL Database from an OEP application, you need to use the Oracle NoSQLDatabase data cartridge.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 17

In the previous section, you saw what is event processing, what is Oracle Event Processing,and how event processing is related to Big Data with the help of a use case.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 18

In the next section, you will learn to use the Oracle NoSQL Database Data Cartridge for EventProcessing. You will learn how to configure your environment, how to integrate Oracle NoSQLDatabase with event processing network, and how to query the KVStore from an eventprocessing network.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 19

If you want your OEP applications to fetch data from an Oracle NoSQL Database, you need touse an OEP NoSQL Database data cartridge. To use this data cartridge, you need to firstintegrate an Oracle NoSQL Database with an event processing network. You can then useCQL queries to retrieve values from the KVStore by specifying a key in the query and thenreferring to fields of the value associated with the key.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 20

Introducing Oracle Event Processing NoSQL Database Data Cartridge - 21

Introducing Oracle Event Processing NoSQL Database Data Cartridge - 22

Oracle CEP applications use CQL queries to retrieve data. You can retrieve the OracleNoSQL Data from within the event processing network by writing CQL queries as shown inthe slide.In this example, the event type instances representing data from the S1 channel andCustomerDescription NoSQL data source are both implemented as JavaBeans classes. TheCustomerDescription in the FROM clause corresponds to the id attribute value in the storeelement. Because both event types are JavaBeans classes, the Oracle CQL query canaccess the customer description associated with a particular event by equating the event'suser ID with that of the customer description in the WHERE clause, treating both asJavaBeans properties.Once an entry from the store has been selected, fields from the value retrieved from the storecan be referred to in the SELECT portion of the query or in additional clauses inthe WHERE clause. The creditScore value specified in the SELECT clause will include thevalue of the creditScore field of the CustomerDescription object retrieved from the store in thequery output. The reference to creditScore in the WHERE clause will also further restrict thequery to events where the value of the CustomerDescription creditScore field is greater than5.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 23

The WHERE clause requests that an entry be retrieved from the store that has the key specified by thevalue of the event's userId field. This field must be of type String. Only equality relations are supportedfor obtaining entries from the store. And the join condition can use a single key only.The key used to obtain entries from the store can be formatted in one of two ways: by beginning thevalue with a forward slash ('/') or by omitting a slash.If the value specified on the left hand side of the equality relation starts with a forward slash, then thekey is treated as a full key path that specifies one or more major components, as well as minorcomponents if desired.For example, if the userId field of a SalesEvent object has the value "/users/user42/-/custDesc", thenthat value will be treated as a full key path that specifies "users" as the first major component, the userID "user42" as the second major component, and a minor component named "custDesc".As a convenience, if the value specified on the left hand side of the equality relation does not start witha forward slash, then it is treated as a single major component that comprises the entire key.Note that keys used to retrieve entries from the store must be specified in full by a single field accessedby the Oracle CQL query. In particular, if a key path with multiple components is required to accessentries in the key-value store, then the full key path expression must be stored in a single field that isaccessed by the query.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 24

In this tutorial, you learnt about the Oracle NoSQL Database Data Cartridge for Oracle EventProcessing. You should now be able to describe event processing and Oracle NoSQLDatabase Data Cartridge for Event Processing. You should be able to explain how eventprocessing fits in the Big Data world. You should also be able to describe how to use theOracle NoSQL Database Data Cartridge.Introducing Oracle Event Processing NoSQL Database Data Cartridge - 25

Introducing Oracle Event Processing NoSQL Database Data Cartridge - 26

Introducing Oracle Event Processing NoSQL Database Data Cartridge - 27

Introducing Oracle Event Processing NoSQL Database Data Cartridge - 28

NoSQL Database Data Cartridge for event processing is a solution to this requirement. Later in this tutorial, you will learn more about this data cartridge. Before that, this big data and event processing scenario is explained further using a use case. Click next to proceed. Introducing Oracle Event Processing NoSQL Database Data Cartridge - 13