1 Introduction to Oracle Stream Analytics

Oracle Stream Analytics is very advanced, scalable, reliable, and flexible. Oracle Stream Analytics helps you in designing event processing applications with ease.

Oracle Stream Analytics is developed to simplify the complex event processing operations and make them available even to users without any technical background.

This chapter contains the following sections:

1.1 Oracle Stream Analytics User Interface

Oracle Stream Analytics user interface components are listed and explained at a high level in the sections that follow.

1.1.1 Sign In Page

Oracle Stream Analytics uses the same set of users and user roles configured in the Visualizer. Oracle Stream Analytics uses the same role-based authorization and authentication system provided by the Oracle Stream Analytics Event Processing Server.

Sign in to the Oracle Stream Analytics application using the following credentials:

  • User Name: <the user name you have provided at the time of installation> (oepadmin is the default user)

  • Password: <the password you have provided at the time of installation>

You can also sign in using any of the user accounts (with an administrator role) from the Oracle Stream Analytics Event Processing Server.

The Sign In page is as shown below:

Figure 1-1 Oracle Stream Analytics Sign in Page

Description of Figure 1-1 follows
Description of "Figure 1-1 Oracle Stream Analytics Sign in Page"

1.1.2 Home Page

The Home page lists the industry verticals that Oracle Stream Analytics supports.

Each industry vertical has a tag associated with it and the tags are case-sensitive.

  • Distributed Intelligence for IOT - Acquire, analyze, and act on high-volume, high-velocity data from sensors and devices both at the edge and in the data center in real-time. Tag for this vertical is IOT.

  • Risk and Fraud Management - Leverage industry's best stream processing platform to assess risk and prevent financial fraud in real-time. Tag for this vertical is risk.

  • Transportation and Logistics - Manage fleet, track assets, and improve supply chain efficiencies by combining streaming data with Oracle's advanced spatial functions. Tag for this vertical is transportation.

  • Customer Experience and Consumer Analytics - Know the sentiment of your customers to reduce churn, improve loyalty, make offers, and attract customers in real-time. Tag for this vertical is customer.

  • Telecommunications - Pro actively monitor your networks, predict network failures, and prevent distributed denial of service type attacks. Tag for this vertical is telecom.

  • Retail — Understand and Apply instant Retail Shopping trends, instigate beneficial shelf life patterns and placements, be responsive to Customers cart utilization and interoperate with advanced Vending Machines. Tag for this vertical is retail.

The Home page is as shown below:

Figure 1-2 Oracle Stream Analytics Home Page

Description of Figure 1-2 follows
Description of "Figure 1-2 Oracle Stream Analytics Home Page"

1.1.3 Catalog Page

The Catalog page is the location where resources including explorations, streams, references, maps, connections, and targets are listed. This is the go-to place for you to perform any tasks in Oracle Stream Analytics.

The resources you see in the Catalog vary depending on the runtime you are using for the application.

You can mark a resource as a favorite in the Catalog by clicking on the Star icon. Click the icon again to remove it from your favorites. You can also delete a resource or view its topology using the menu icon to the right of the favorite icon. The Catalog page is as shown below:

The tags applied to items in the Catalog are also listed on the screen below the left navigational pane. You can click any of these tags to display only the items with that tag in the Catalog. The tag appears at the top of the screen. Click Clear All at the top of the screen to clear the Catalog and display all the items. The following screen shows the Catalog when you select a tag:

Figure 1-4 Catalog with Tag Applied

Description of Figure 1-4 follows
Description of "Figure 1-4 Catalog with Tag Applied"

You can include or exclude explorations, streams, references, maps, connections, and targets using the View All link in the left panel under Show Me. When you click View All, a tick mark appears beside it and all the components are displayed in the catalog.

When you want to display or view only a few or selective items in the catalog, unselect View All and select the individual components. Only the selected components will be shown in the catalog.

1.1.4 Exploration Editor

Exploration Editor, also known as the Explorer, allows you to create or edit the explorations in Oracle Stream Analytics.

1.1.4.1 Expression Editor

The Expression Editor helps you to create expressions easily. Expression Editor supports various standard functions that allow you to perform operations on strings, numerical data, alphanumerical data, date-time, and many more data types. The Expression Editor is available within explorations to perform calculations and obtain certain data.

1.1.5 Streams Wizard

Streams Wizard allows you to create or edit the streams in Oracle Stream Analytics.

1.1.6 References Wizard

References Wizard allows you to create or edit the references in Oracle Stream Analytics.

1.1.6.1 Working with Maps, Connections, Targets

Maps, Connections, and Targets are new features added in this release.

See the following sections for more information:

1.1.6.1.1 Creating/Editing Maps

A map is a virtual fencing over a geographical area to define boundaries. The maps help you in defining boundaries over a specific area and then use it to analyze the data for your business. Based on the data you analyze, you can use the data to improve your business performance.

You can use the maps to set up triggers for your business. Whenever a device enters or exits the defined boundaries, the user is alerted through a text message or an e-mail.

To create a map:

  1. Navigate to the Catalog.
  2. Select Create New Item > Map.
    The Create Map — Type Properties wizard opens.

    Figure 1-5 Create Map — Type Properties

    Description of Figure 1-5 follows
    Description of "Figure 1-5 Create Map — Type Properties"
  3. Enter details in the following fields of the Type Properties screen:
    1. Enter a Name for the map. This is a mandatory field.
    2. Enter a Description for the map. This is an optional field.
    3. Enter Tags for the map. You can enter any tag you like. The tags help you in filtering the maps in the Catalog.
    4. Select a Map Type. The available types are:
      • None (Create manually) — this value indicates that you do not want to use any of the existing map types and would like to create a type manually. When you select this option you can only save the details but cannot complete creating the map.

      • Database Table — the map will be based on the data stored in a database table.

        Note:

        Your database table must contain at least one field of the SDO_GEOMETRY type.
    5. Click Save to commit the changes you have made or to save the details added so far.
    6. Click Next.
      The Create Map — Connection Details screen opens.

      Figure 1-6 Create Map — Connection Details

      Description of Figure 1-6 follows
      Description of "Figure 1-6 Create Map — Connection Details"
  4. Enter details in the following fields of the Connection Details screen:
    1. Select a Data source name from the drop-down list. This data source name comes from the connections you have created earlier.
    2. Click Back if you want to navigate to the previous screen in the wizard.
    3. Click Save to commit the changes you have made or to save the details added so far.
    4. Click Next.
      The Create Map — Shape screen opens.

      Figure 1-7 Create Map — Shape

      Description of Figure 1-7 follows
      Description of "Figure 1-7 Create Map — Shape"
  5. Select a Name for the shape. You can change the id property, description property, name property, shape property. The selected shape displays the shape binding keys of the map and the connection.
  6. Click Back to navigate to the previous screen in the wizard.
  7. Click Save to save the details you have entered so far and complete creating a map.
A map is created with the details you have provided.
The created map appears as follows:

You can click the Saved Geo-Fences to view the saved area on the map. You can use the zoom in and zoom out controls the view of the map. You can click Show Points to see the latitude and longitude of the selected Geo-Fence.

Click the Edit Info icon to edit the details of the map like name, description etc. The Undo icon can be used to revert the last made change and Redo icon can be used to repeat the last action performed.

1.1.6.1.2 Creating/Editing Connections

A connection is a collection of metadata required to connect to an external system, such as URLs, credential and the like. A connection is the basis for creation of streams and targets.

To create/edit a connection:
  1. Navigate to the Catalog.
  2. Select Create New Item > Connection.
    The Create Connection — Type Properties wizard opens.

    Figure 1-9 Create Connection — Type Properties

    Description of Figure 1-9 follows
    Description of "Figure 1-9 Create Connection — Type Properties"
  3. Enter details in the following fields of the Type Properties screen:
    1. Enter a Name for the map. This is a mandatory field.
    2. Enter a Description for the map. This is an optional field.
    3. Enter Tags for the map. You can enter any tag you like. The tags help you in filtering the maps in the Catalog.
    4. Select a Connection Type. The available types are:
      • Kafka

      • Twitter

      • Coherence cache

      • HTTP Pub-Sub

      • MQTT

      • WebLogic Server.

    5. Click Next.
      The Create Connection — Connection Details screen opens.

      Figure 1-10 Create Connection — Connection Details

      Description of Figure 1-10 follows
      Description of "Figure 1-10 Create Connection — Connection Details"
    6. The fields available vary depend on the type of connection selected.

      Table 1-1 Types of Connections

      Field Name Description

      Kafka

      Select this type when you want to use a Kafka connection.

      Note:

      Specifying a topic name for the Kafka connection is necessary for the connection to be used in a stream. A topic must exist for the deployment to be successful.
      • Zookeepers

      Enter zookeepers connection strings separated by commas.

      • Kafka bootstrap

      Enter Kafka connection strings separated by commas.

      Twitter

      Select this type when you want to use a Twitter connection.

      • Consumer Key

      Enter an API key to be used as the consumer key.

      • Consumer Secret

      Enter an API secret to be used as the consumer secret.

      • Access Token

      Enter an access token.

      • Access Token Secret

      Enter a secret access token.

      • Http proxy host

      Enter a host for the HTTP proxy.

      • Http proxy port

      Enter a port number for the HTTP proxy.

      Coherence cache

      Select this type when you want to use a Coherence cache connection.

      • Tangosol config

      Copy and paste the XML content (without the XML header) from the tangosol config.xml file in this field.

      • Cache config

      Copy and paste the XML content (without the XML header) from the cache config.xml file in this field.

      HTTP Pub-Sub

      Select this type when you want to use a HTTP Pub-Sub connection.

      • Server URL

      Enter a URL of the server.

      • Username

      Enter a username to be used for this connection.

      • Password

      Enter a password to be used for this connection.

      MQTT

      Select this type when you want to use a MQTT connection.

      • Server URls

      Enter a URL for the server.

      WebLogic Server

      Select this type when you want to use a WebLogic server connection.

      • URL

      Enter a URL for the server.

      • Username

      Enter a username to be used for the connection.

      • Password

      Enter a password to be used for the connection.

  4. Click Back if you want to navigate to the previous screen in the wizard.
  5. Click Save to commit the changes you have made or to save the details added so far.
A connection is created with the details you have provided.
1.1.6.1.3 Creating/Editing Targets

A target is an object that defines an interface with a downstream system. The list of target types is mostly the same as the list of stream types in terms of supported technologies and messaging systems. Targets are also typed in terms of event shape definitions.

To create/edit a target:
  1. Navigate to the Catalog.
  2. Select Create New Item > Connection.
    The Create Connection — Type Properties wizard opens.

    Figure 1-11 Create Target — Type Properties

    Description of Figure 1-11 follows
    Description of "Figure 1-11 Create Target — Type Properties"
  3. Enter details in the following fields of the Type Properties screen:
    1. Enter a Name for the map. This is a mandatory field.
    2. Enter a Description for the map. This is an optional field.
    3. Enter Tags for the map. You can enter any tag you like. The tags help you in filtering the maps in the Catalog.
    4. Select a Connection Type. The available types are:
      • HTTP Publisher

      • Kafka

      • JMS

      • Coherence cache

      • CSV File

      • REST

      • MQTT

      • EDN.

    5. Click Next.
      The Create Connection — Connection Details screen opens.

      Figure 1-12 Create Target — Target Details

      Description of Figure 1-12 follows
      Description of "Figure 1-12 Create Target — Target Details"
    6. The fields available vary depend on the type of target selected.

      Table 1-2 Types of Targets

      Field Name Description

      HTTP Publisher

      Select this type when you want to use a HTTP Publisher target.

      • Connection

      Select a connection from the drop-down list which is of type HTTP Publisher.

      • Channel

      Enter a suitable channel for the HTTP Publisher.

      Kafka

      Select this type when you want to use a Kafka target.

      • Connection

      Select a connection from the drop-down list which is of type Kafka.

      • Topic name

      Enter a suitable topic name for the Kafka target.

      JMS

      Select this type when you want to use a JMS target.

      • Connection

      Select a connection from the drop-down list which is of type JMS.

      • JNDI Name

      Enter a suitable JNDI name for the JMS.

      Coherence cache

      Select this type when you want to use a Coherence cache target.

      • Connection

      Select a connection from the drop-down list which is of type coherence cache.

      • Cache name

      Enter a suitable name for the cache.

      • Cache key

      Enter a suitable key for the cache.

      CSV File

      Select this type when you want to use a CSV file as a target.

      • File Name

      Enter a file name and click Download to download the CSV file.

      • Append

      Select this check box if you want to append the CSV file to the target.

      REST

      Select this type when you want to use a REST target.

      • Target URL

      Enter a URL for the REST target.

      MQTT

      Select this type when you want to use a MQTT target.

      • Connection

      Select a connection from the drop-down list which is of type MQTT.

      • Topic name

      Enter a suitable name for the MQTT target. This topic name should have been defined in the MQTT connection.

      • Quality of service

      Enter a numerical value greater than zero. The values you can enter are:

      • 0 - at the most once

      • 1 - at least once

      • 2 - exactly once.

      Use the increment or decrement icons to increment or decrement the values.

      EDN

      Select this type when you want to use a EDN target.

      • Connection

      Select a connection from the drop-down list which is of type EDN.

    7. Click Back if you want to navigate to the previous screen in the wizard.
    8. Click Save to commit the changes you have made or to save the details added so far.
    9. Click Next to navigate to the next screen in the wizard.
      The Create Target — Shape screen opens.

      Figure 1-13 Create Target — Shape

      Description of Figure 1-13 follows
      Description of "Figure 1-13 Create Target — Shape"
  4. Select Select Existing Shape to do the mapping using an exiting shape.
  5. Select Create New Shape to create a new shape for the mapping When you create a new shape, you must provide a name for the shape, add fields to the shape and select the type of the field.
  6. Click Back if you want to navigate to the previous screen in the wizard.
  7. Click Save to commit the changes you have made or to save the details added so far.
A target is created with the details you have provided.

1.2 Components of Oracle Stream Analytics

The components of Oracle Stream Analytics are listed in the sections that follow.

1.2.1 Stream

A stream is a source of dynamic data. The data is flowing, it is not static or frozen. For example, stock prices of a particular company can be considered as a stream as the data comes in every second. Stream can be from EDN Server, JMS Server, REST Service, HTTP Pubsub Server, simulated from a CSV file (data dump), Kafka Adapter, Twitter Adapter, MQTT Adapter, Coherence Cache Adapter, or Event Generator.

1.2.2 Reference

A reference is a source of static data that provides contextual information about the event data. The metadata and contextual information of event data is stored in a reference. In this release, the only supported reference type is Oracle Database table.

1.2.3 Exploration

An exploration allows you to define business criteria for managing data (filters, summaries, group by, or correlations). The exploration is a visual representation of streaming data, expressions, and business rules. It lets you see how the business criteria apply and manage the data. You can add or attach a target to an exploration. But the target must be already created and configured.

1.2.4 Topology Viewer

Topology is a graphical representation of the connected entities. The topology illustrates the dependencies and connections between the entities.

The Topology Viewer helps you in identifying the dependencies that a selected entity has on other entities. Understanding the dependencies helps you in being cautious while deleting or undeploying an entity. Oracle Stream Analytics supports 2 contexts for the topology — Immediate Family and Extended Family.

You can launch the Topology viewer in any of the following ways:

Click the Show Topology icon at the top-right corner of the editor to open the topology viewer. Topology is the graphical representation of dependencies and connections between entities. By default, the topology of the entity from which you launch the Topology Viewer is displayed. The context of this topology is Immediate Family, which indicates that only the immediate dependencies and connections between the entity and other entities are shown. You can switch the context of the topology to display the full topology of the entity from which you have launched the Topology Viewer. The topology in an Extended Family context displays all the dependencies and connections in the topology in a hierarchical manner.

Note:

The entity for which the topology is shown has a grey box surrounding it in the Topology Viewer.

Immediate Family

Immediate Family context displays the dependencies between the selected entity and its child or parent.

The following figure illustrates how a topology looks in the Immediate Family.

Figure 1-17 Topology Viewer in Immediate Family

Description of Figure 1-17 follows
Description of "Figure 1-17 Topology Viewer in Immediate Family"

Extended Family

Extended Family context displays the dependencies between the entities in a full context, i.e., if an entity has a child entity and a parent entity, and the parent entity has other dependencies, all the dependencies are shown in the Full context.

The following figure illustrates how a topology looks in the Extended Family.

Figure 1-18 Topology Viewer in Extended Family

Description of Figure 1-18 follows
Description of "Figure 1-18 Topology Viewer in Extended Family"

1.2.5 Pattern

A pattern provides you with a simple way to explore event streams based on common business scenarios.

1.2.6 Map

Map is a collection of geo-fences. A geo-fence is a geographical area, a polygon on a geographical map. In Oracle Stream Analytics, maps are used as underlying references for streaming data containing geographical coordinates, such as GPS data.

This technology has many uses in day-to-day life. For example:
  • In a Mall you can set up a boundary to identify and track if the devices owned by the Mall move out of that area. Such a tracking can help the management in disabling the device or in reporting the device as lost.

  • A store can offer discounts to its customers located in a specific geographic location and send discount coupons. The customers who bring the discount coupon to the store can avail the discounts.

1.2.7 Shape

A shape is a representation of data definition within a stream (that is, an event type).