What Is The Primary Purpose Of Oracle Cloud Infrastructure Functions?

Oracle Cloud Infrastructure Functions is a serverless platform that is fully managed, multi-tenant, and highly scalable, allowing functions to run on demand. It is built on top of Oracle’s enterprise-grade cloud infrastructure & uses the open source Fn Project engine under the hood. 

OCI Functions allows you to focus on writing code to meet business needs without worrying about infrastructure or software administration. The serverless & elastic design means there are no compute instances for you to provision or maintain, & the platform handles patching & upgrading the operating system automatically. OCI Functions ensures your applications are highly available, scalable, secure, & monitored. 

You can write functions in Java, Python, Node.js, Go, Ruby, C#, or bring your own Dockerfile & Graal VM for advanced use cases. You simply deploy your code, invoke it directly or trigger it in response to events, & only pay for the resources used during execution.

OCI Functions is based on the open source Fn Project, which is a container-native, serverless platform that can run anywhere. Fn Project makes it easy to develop & test functions locally using the same tooling you would use to deploy them to OCI Functions.

You can access OCI Functions through the console, CLI, & REST API. You can invoke deployed functions using the CLI or signed HTTP requests. 

OCI Functions integrates with Oracle Cloud Infrastructure Identity & Access Management (IAM) for easy authentication using Oracle’s native cloud identity services.

To get started quickly with OCI Functions, check out the QuickStart Guides. There are also many related tutorials, samples, architectures, & other resources available.

What is Oracle Functions?

Oracle Functions is a serverless platform that enables developers to build, execute, & expand applications without the need to handle any infrastructure. These functions are compatible with Oracle Cloud Infrastructure, platform services, & SaaS applications. The platform is built on the open source Fn Project.

Applications developed with Oracle Functions usually have a brief runtime, & customers are billed solely for the resources utilized during the execution of their function.

What languages are supported by Oracle Functions?

Oracle Functions is built on the open source Fn Project, which offers function development kits (FDKs) for Java (including the GraalVM native image), Python, Node, Go, & Ruby. Additionally, it allows you to use your own Dockerfile.

How can I adjust the scale of my function?

You do not need to manually adjust the scale of your function to accommodate the incoming request volume. Oracle Functions will automatically adjust the scale of your function by spinning up new function containers to handle the incoming request volume, & then scaling it down by terminating idle function containers as the incoming request volume decreases.

Do I have to set up compute instances to run Oracle Functions (similar to setting up Oracle Container Engine for Kubernetes)?

You do not need to provision compute instances for Oracle Functions to run on, similar to the Oracle Container Engine for Kubernetes. Oracle Functions automatically provisions all the necessary compute resources within the service tenancy, eliminating the need for you to provision any compute instances.

Is it possible to execute Oracle Functions on my personal computer or within my own data center?

Oracle Functions is a completely managed service that operates on Oracle Cloud Infrastructure. Nevertheless, it is constructed on the open source Fn Project which can be operated in any location – in any cloud or on-premises. The benefit of Functions is that it is genuinely serverless & can function at the scale of the cloud. You have the option to download & set up the open-source distribution of Fn Project, create & test a function locally, & then utilize the same tools to deploy that function to Oracle Functions.

What are the possible uses for this service?

You can utilize this service to create serverless solutions in Oracle Cloud. Functions seamlessly integrates with other services such as API Gateway, Events Service, Notifications, Service Connector Hub, Streaming (Apache Kafka-compatible), Logging, and Oracle Integration.

This enables you to execute code in reaction to events, going beyond basic notifications to implementing actions when there are changes in your cloud environment. With Oracle Functions, you can build serverless event-driven architectures, web & mobile API backends, real-time file & stream processing solutions, DevOps, & enterprise security use cases.

How does Oracle Functions operate?

To use Oracle Functions, you develop your function code using an Fn Project function development kit (FDK), package it as a Docker image using the Fn Project CLI, & then Upload the image to Oracle Cloud Infrastructure Container Registry (OCIR).

Additionally, you have the option to set up event triggers through the Events Service, API Gateway, Notifications, Service Connector Hub (Streaming, Logging), & Oracle Integration. Your function code will execute only when the specified event occurs or when it is directly invoked using the API/SDK/CLI.

How much does Oracle Functions cost?

Oracle Functions charges only for the resources consumed while your function is active, with no fees during idle periods. Please refer to the pricing section on the Oracle Functions page for more information.

How can I begin using Oracle Functions?

To begin using Oracle Functions, please refer to the Oracle Functions Quick Start Guide. After successfully deploying your first function, you can explore additional resources such as Sample Functions, Solution Playbooks, Reference Architectures, & Developer Tutorials.

OCI Functions Concepts

Learn about the fundamental concepts you need to grasp before utilizing OCI Functions.

Functions Developers

Individuals who utilize OCI Functions to create & deploy functions are known as ‘functions developers’. To utilize OCI Functions, functions developers must have Oracle Cloud Infrastructure user accounts. Their user accounts must be part of groups that have been granted access to function-related resources through appropriate policies.

Applications

In OCI Functions, an application is:

  • a logical grouping of functions
  • a means to allocate & configure resources for all functions in the application
  • a shared context for storing configuration variables that are accessible to all functions in the application a method for ensuring function runtime isolation

When defining application in OCI Functions, you specify subnets in which functions in application will run. You also determine whether to enable logging for the functions in the application.

When functions from different applications are invoked simultaneously, OCI Functions ensures that these function executions are isolated from each other.

It is considered best practice to group multiple functions in a single application for improved efficiency & performance.

OCI Functions displays applications & their functions in the Console.

Functions

In OCI Functions, functions are:

  • small yet powerful blocks of code that typically perform a single, simple task
  • organized into applications
  • stored as Docker images in a specified Docker registry
  • invoked in response to a CLI command or a signed HTTP request

When deploying a function to OCI Functions using the Fn Project CLI, the function is built as a Docker image & pushed to a specified Docker registry.

definition of function is stored as metadata in OCI Functions server. The definition outlines how the function is to be executed & includes:

  • Docker image to pull when function is invoked
  • the maximum allowable execution time for the function
  • The function’s maximum allowable memory consumption

OCI Functions displays functions & their associated applications in the Console. 

Invocation

In OCI Functions, a function’s code is executed when the function is called. You can call a function deployed to OCI Functions from the Fn Project CLI, the Oracle Cloud Infrastructure SDKs, or through signed HTTP requests to the function’s invoke endpoint. Additionally, functions can be invoked by other Oracle Cloud services or external services, such as events in the Events service.

When a function is invoked for the first time, OCI Functions pulls the function’s Docker image from the specified Docker registry, runs it as a Docker container, & executes the function. Subsequent requests to the same function are directed to the same container. After a period of inactivity, the Docker container is removed. 

OCI Functions provides information about function invocations through metric charts.

Triggers

A trigger is the result of an action elsewhere in the system that sends a request to invoke a function in OCI Functions. Triggers can be caused by events in the Events service or can send regular requests to invoke a function on a defined schedule.

A function may be associated with one or multiple triggers, or it may not be associated with any triggers at all.

Methods for accessing Oracle Cloud Infrastructure

There are multiple ways to access Oracle Cloud Infrastructure (OCI), including using the Console (a browser-based interface), REST API, or OCI CLI. Instructions for using the Console, API, & CLI can be found throughout this documentation. For a list of available SDKs, refer to the Software Development Kits & Command Line Interface section.

To access the Console, a supported browser must be used. To access the Console sign-in page, open the navigation menu at the top of this page & click on Infrastructure Console. You will then be prompted to enter your cloud tenant, user name, & password.

Developing Automation through Events

Automation can be created using event types, rules, & actions to respond to state changes in Oracle Cloud Infrastructure resources. For more details, refer to the Overview of Events. The following OCI Functions resources generate events:

– applications

– functions

Resource Identifiers

Most types of Oracle Cloud Infrastructure resources are assigned a unique identifier by Oracle, known as an Oracle Cloud ID (OCID). To learn about the format of OCIDs & other methods of identifying resources, refer to Resource Identifiers.

Authentication & Authorization

IAM is integrated with every service in Oracle Cloud Infrastructure for authentication & authorization across all interfaces (such as the Console, SDK or CLI, & REST API).

An administrator within your organization is responsible for setting up groups, compartments, & policies to manage user access to services & resources, as well as the type of access granted. For example, policies control privileges such as creating new users, managing the cloud network, launching instances, creating buckets, & downloading objects. For more information, refer to Getting Started with Policies. For detailed policy writing instructions for each service, see Policy Reference.

If you are a regular user in need of access to Oracle Cloud Infrastructure resources owned by your company, reach out to your administrator to have a user ID set up for you. The administrator can also specify which compartment(s) you should be utilizing.

Read Also: What Is The Primary Function Of A Route Table In The Oracle Cloud Infrastructure Networking Service?

Capabilities & Limits of OCI Functions

OCI Functions service limits control the number of functions & applications you can create in a specific region. The default service limits vary based on your payment method, but you can request an increase if you need more capacity. 

The maximum size of data that can be sent to a function & and returned from a function is 6MB, & these limits cannot be changed. Some other OCI Functions capabilities & limits are also fixed, but there are some that can be adjusted.

Additionally, you must be granted security access in a policy by an administrator to use Oracle Cloud Infrastructure. This access is necessary whether you are using the Console or the REST API with an SDK, CLI, or other tool. If you encounter permission issues, verify with your administrator the type of access you have & the compartment to work in.

.

Leave a Comment