Developing Data-Driven AI Apps: Making Calls to AI Services Directly from the Database

As AI services and the data they consume and create become more important and prevalent in various applications and processes, so do the platforms and architectures they are built upon. As usual, there is no “one size fits all.” However, what is briefly presented here is an optimized approach to such data-driven AI application architectures. All of the source code mentioned and more can be found here and a free “Develop with Oracle AI and Database Services: Gen, Vision, Speech, Language, and OML” workshop (where all of the use cases are based on the U.N.’s 17 Sustainable Development Goals) giving many more examples can be found here.

Often multiple network calls must be made in a given AI app, entailing calls to the AI services as well as calls to retrieve and persist the content (whether it be text, audio, images, video, etc.) that is the input or output. The persistent information is then often processed and analyzed further, and additional calls, AI or otherwise, are made in reaction.

Develop XR With Oracle, Ep. 6: AI Summarizer + Generator

In this sixth article of the series, we describe and provide the full source for a mixed reality app that takes any visual and audio input from a user's surroundings, processes it with various AI, and returns output of summaries, results of generative AI, etc.

This is the sixth piece in a series on developing XR applications and experiences using Oracle and focuses on visual and audio input from a user's surroundings, processing it with various AI, and returning output of summaries, results of generative AI, etc. Find the links to the first five articles below: 

How To Call Hugging Face AI From Within an Oracle Database Using JavaScript

In this article, I will show you how to quickly create an entirely free app using a JavaScript program that runs within the free Oracle database and calls Hugging Face AI, the results of which are stored in the database and can then be accessed using SQL, JSON, REST, or any other language. All of the source code is available here.
Hugging Face, JS, and Oracle logos

A common flow of applications in general and AI applications specifically involves an app calling an AI service and then storing the information in the database where it may be retrieved and processed (e.g., using OML) further and/or analyzed and queried later.

Develop a Geocaching Multiplayer Game Using Flutter, Spring Boot, Oracle Database Free Spatial, and OpenStreetMap

In this blog, I will show you how to quickly create a full-stack app using an extremely powerful, versatile, popular, and entirely free software stack consisting of Flutter, Spring Boot, Oracle Database with Spatial (SQL, JSON, and blockchain), and OpenStreetMap. All of the source is of course available here.

As a use case, I will create a multi-player game based on geocaching. (Fun fact, there are now more than 3.1 million active geocaches in 196 different countries and even space.)

Develop a Mobile Multiplayer Game in Minutes With Unity and Oracle Backend for Parse

Here, in just a few simple steps, we'll develop a mobile multiplayer game using Unity and Oracle's Backend for Parse.

A Brief Introduction of Unity and Parse Platform

Unity is a cross-platform game engine developed by Unity Technologies, first announced and released in June 2005 at Apple Worldwide Developers Conference as a Mac OS X game engine. The engine has since been gradually extended to support a variety of desktop, mobile, console, and virtual reality platforms. The Parse Platform is a back-end for mobile developers, open-sourced by Facebook/Meta in 2016, that helps to store data in the cloud, manage identity log-ins, handle push notifications, and run custom code in the cloud. Oracle has created an adapter to take advantage of all the features of the Oracle converged database while using Parse APIs.

Developing Saga Participant Code for Compensating Transactions

The saga pattern is used to provide data integrity between multiple services and to do so for potentially long-running transactions. There are many, cursory as they tend to be, blogs written on sagas and long-running transactions. In this piece, I will not go into detail comparing the advantages and disadvantages of sagas with XA two-phase commit (2PC), distributed locking, etc., and will simply state that XA and 2PC require distributed locks (con) which manage ACID properties such that the user can simply execute rollback or commit (pro) whereas sagas use local transactions only and so do not require distributed locks (pro) but require the user to implement compensation, etc. logic (con). As Teddy Roosevelt said, “Nothing worth having comes easy.”

What I will do is show a full code example of a microservices application involving a saga, including participant compensation logic, which can be found at this repo.   

Develop XR With Oracle, Ep. 5: Healthcare, Vision AI, Training/Collaboration, and Messaging

This is the fifth piece in a series on developing XR applications and experiences using Oracle and focuses on XR applications of healthcare, vision AI, training and collaboration, and messaging, including other topics such as multi-platform development, etc. Find the links to the first four articles below: 

Develop XR With Oracle, Ep 1: Spatial, AI/ML, Kubernetes, and OpenTelemetry
Develop XR With Oracle, Ep 2: Property Graphs and Data Visualization
Develop XR With Oracle, Ep 3: Computer Vision AI, and ML
Develop XR With Oracle, Ep 4: Digital Twins and Observability

Develop XR With Oracle, Ep 4: Health, Digital Twins, Observability, and Metaverse

This is the fourth piece in a series on developing XR applications and experiences using Oracle and focuses on XR applications of computer vision AI and ML and its related use in the metaverse.  Find the links to the first three articles below: 

As with the previous posts, here I will again specifically show applications developed with Oracle database and cloud technologies, HoloLens 2, Mixed Reality Toolkit, and Unity platform.

Unified Observability Exporters: Metrics, Logs, and Tracing

This is the second in a series of blogs discussing unified observability with microservices and the Oracle database. The first piece went into the fundamentals and basic use cases. This second blog will take a deeper dive into the Metrics, Logs, and Tracing exporters (which can be found at https://github.com/oracle/oracle-db-appdev-monitoring), describing them and showing how to configure them, Grafana, alerts, etc.  I will also refer the reader to the latest version of the Unified Observability in Grafana Workshop that has just been published which demonstrates the principles, provides code and configuration examples, etc.  All of the code for the workshop can also be found at the https://github.com/oracle/microservices-datadriven repos (specifically in the observability directory). 

Particularly with the dawn of microservices, robust observability is an absolute requirement, and the better the tools and techniques used in the space, the more effective and enjoyable observability is for the (DevOps) user and thus the focus on this key area.

Develop With Oracle Transactional Event Queues

This article provides a quick tour of Oracle's Transactional Event Queues (TEQ) and so attempts to cover as much as possible at a high-level while giving quick, low-level, and code examples at the same time. There is quite a bit of material, and there are multiple workshops related to TEQ and its use in modern application development and microservices that can be found at the end of this piece.

This article corresponds to a 12-minute video that can be found here...

Oracle Transactional Event Queues (previously known as Advanced Queueing) has been around and widely used for decades (long before Kafka) and is well-harden technology. Here is a timeline to give an idea.

Timeline of Oracle AQ and transactional event queues.

Develop XR With Oracle, Ep 3: Computer Vision AI, ML, and Metaverse

This is the third piece in a series on developing XR applications and experiences using Oracle and focuses on XR applications of computer vision AI and ML and its related use in the metaverse.  Find the links to the first two articles below: 

As with the previous posts, here I will again specifically show applications developed with Oracle database and cloud technologies HoloLens 2, Mixed Reality Toolkit, and Unity platform.

Simplify Microservice Transactions With Oracle Database Sagas

The Saga Pattern

The saga pattern is used to provide data integrity across multiple distributed, isolated services involved in potentially long-lived activities (sometimes referred to as business activities or business transactions to disambiguate).  The classic example, and the one I use here and in the corresponding workshop, is a travel booking consisting of flight, hotel, and car reservations. 

The original paper was published in 1987 and alludes to the advantages of an implementation that runs and stores data within a database and that is precisely what is being done in the Oracle database, making it a perfect fit for microservices and modern applications development for a number of reasons.  

Develop XR with Oracle Cloud, Database on HoloLens, Ep 1: Spatial, AI/ML, Kubernetes, and OpenTelemetry

This is the first piece in a series on developing XR applications and experiences using Oracle.  Specifically, I will show applications running with the following:

  • Oracle database and cloud technologies
  • Hololens 2 (Microsoft Mixed Reality Headset)
  • MRTK (Mixed Reality Toolkit) APIs (v2.7.2)
  • Unity (v2021.1.20f) platform (leading software for creating and operating interactive, real-time 3D content)

Throughout the blog, I will reference a corresponding workshop video found at https://youtu.be/MBaQ8ohI80E.

How to Vaults and Wallets for Simple, Secure Connectivity

This is the third in a series of blogs on data-driven microservices design mechanisms and transaction patterns with the Oracle converged database. The first blog illustrated how to connect to an Oracle database in Java, JavaScript, Python, .NET, and Go as succinctly as possible. The second blog illustrated how to use that connection to receive and send messages with Oracle AQ (Advanced Queueing) queues and topics and conduct an update and read from the database using all of these same languages.  The goal of this third blog is to provide details on how to secure connections in these same languages as well as convenience integration features that are provided by microservice frameworks, specifically Helidon and Micronaut.

When making secure connections to Oracle databases there are two items to consider, the wallet and the password. We will discuss and provide examples of both in this blog.

Developing Event-Driven Microservices

This is the second in a series of blogs on data-driven microservices design mechanisms and transaction patterns with the Oracle converged database. The first blog illustrated how to connect to an Oracle database in Java, JavaScript, Python, .NET, and Go as succinctly as possible. The goal of this second blog is to use that connection to receive and send messages with Oracle AQ (Advanced Queueing) queues and topics and conduct an update and read from the database using all of these same languages.

Advanced Queuing (AQ) is a messaging system that is part of every Oracle database edition and was first released in 2002. AQ sharded queues introduced partitioning in release 12c and is now called Transaction Event Queues (TEQ).

Apache Kafka vs. Oracle Transactional Event Queues as Microservices Event Mesh

This blog focuses on transactional and message delivery behavior, particularly as it relates to microservice architectures.  There are of course numerous areas to compare MongoDB, PostgresSQL, and Kafka with the converged Oracle DB and Oracle Transactional Event Queues/AQ that are beyond the scope of this blog.

The Oracle database itself was first released in 1979 (PostgresSQL was released in 1997 and MongoDB in 2009).  Oracle Advanced Queuing (AQ) is a messaging system that is part of every Oracle database edition and was first released in 2002 (Kafka was open-sourced by LinkedIn in 2011 and Confluent was founded in 2014).