In this series, I will walk you through the steps to activate Oracle NoSQL Database Cloud Service for event-driven applications.

This debut blog shows how to configure Oracle Events and Notifications services to work with Oracle NoSQL Database Cloud Service. My next blog will show how a resource change in Oracle NoSQL Database Cloud Service kick-starts the event and notification process.

Introduction

Business moves fast. Enterprise stakeholders and processes need to be notified immediately when events occur that require swift actions: seizing a sales opportunity, gathering a metric, resolving an issue, or initiating a business workflow. Increasingly, businesses embrace event-driven solutions that are built for the cloud, where an ecosystem of cloud services is readily available for integration.

In the following use case, a business owner identifies a new opportunity that requires new customer analysis information to be stored in a new Oracle NoSQL Database table. The addition of a new JSON based table to the service resource automatically triggers an event and sends notifications to the stakeholders. The company sales team is notified to start monitoring the new incoming data and engaging customers with new marketing campaigns.   

Service Overview

Before we dive into configuring the services, let’s have a quick overview.

  • Oracle Events service enables users to create automation based on the state changes of resources in their tenancies, e.g., a state change in the NoSQL Database resource. Users subscribe to these changes and react to them using Oracle Functions, Notifications, or Streaming services.
  • Oracle Notifications service broadcasts messages to distributed components through a publish-subscribe pattern, delivering secure, highly reliable, low latency and durable messages for applications hosted on Oracle Cloud Infrastructure and externally.
  • Oracle NoSQL Database Cloud Service is a serverless, fully managed NoSQL data store that delivers predictable single-digit millisecond response times at massive scale. Applications built with this service can scale on demand based on the workload. It  supports document, fixed schema, and key-value data models. Developers can focus on application development without worrying about managing the underlying servers, storage, cluster deployments, software installation, or backup.

 

Service Configurations

Let’s start with creating a Topic in Oracle Notifications service, which will be used in Oracle Events service later.

Notifications Service Configuration

1: Click on Application Integration from the OCI console, then select Notifications.

2: In the left navigation you will see a section called Topics. The list will be empty if this is the first time you use the service. Click Create Topic in the main panel to create a topic for a subscription.

3: Provide a topic name and click Create. Other fields are optional. You will be brought back to the list of topics console after the create topic process finishes.

4: It takes a few seconds to create a new topic. Make sure your Topic is created correctly.

5: Click on the Topic you created. You should see the Topic and the Create Subscription section’s details.

6: Click on Create Subscription to configure your subscription to this Topic. Under Protocol, click on the arrows on the right to see a list of protocols, such as Email, Function, HTTPS, and others. Let’s select Email to configure a simple notification using your email.

7: Provide your email address and click Create.

Make sure to check your email and confirm the subscription. Once confirmed, your email will be used to notify you when a new event occurs.

Following these simple steps, you have completed the configuration in the Notifications service. Next is to create an event in the Oracle Events service to detect a status change in Oracle NoSQL Database Cloud Service and subscribe to this notification topic.

Events Service Configuration

1: Click on Application Integration from the OCI console, then select Events Service.

2: You will see a section with event rules. The list will be empty if this is the first time you use the service. Click Create Rule to create a new event rule.

3: Provide a rule display name and description (optional). In the Rule Conditions section, type in NoSQL for the service name.

Click on the arrows on the right in Event Type. You will see a list of event types for the NoSQL Database. Let’s select Table – Create Begin to track any event when a new NoSQL table is created.

You should see the following configuration. Next, let’s configure the action for this event.

4:  In the Actions section, click on the arrows on the right to list all action types, such as Notifications, Streaming, and Functions. Select Notifications.

5: Next, select the Topic you created in the Notifications configuration section. Click on the right arrows in Topic box to show a list of topics. Select NoSQLcreatetableTopic.

Click on Create Rule to complete the configuration. You will be brought back to the list of event rules console.

6: It takes a few seconds to create a new event rule. Make sure your event rule configuration is created correctly.

Following these simple steps, you have completed the configuration in Oracle Events service.

Summary

This blog goes through a series of steps to create an event that tracks resource changes in Oracle NoSQL Database Cloud Service and sends an email notification when new NoSQL events happen.

My next blog will demonstrate how creating a new NoSQL table will kick-start an event that sends an email notification to me through Oracle Events and Notifications services.

Stay tuned !