What is the communication method between different Cloud native applications services?
What Is Cloud Native?
Cloud native technologies are characterized by the use of containers, microservices, serverless functions, development pipelines, infrastructure expressed as code, event-driven applications, and Application Programming Interfaces (APIs). Cloud native enables faster software development and the ability to build applications that are resilient, manageable, observable, and dynamically scalable to global enterprise levels.
When constructing a cloud-native application, you'll want to be sensitive to how back-end services communicate with each other. Ideally, the less inter-service communication, the better. However, avoidance isn't always possible as back-end services often rely on one another to complete an operation.
While direct HTTP calls between microservices are relatively simple to implement, care should be taken to minimize this practice. To start, these calls are alwayssynchronousand will block the operation until a result is returned or the request times outs. What were once self-contained, independent services, able to evolve independently and deploy frequently, now become coupled to each other. As coupling among microservices increase, their architectural benefits diminish.
Executing an infrequent request that makes a single direct HTTP call to another microservice might be acceptable for some systems. However, high-volume calls that invoke direct HTTP calls to multiple microservices aren't advisable. They can increase latency and negatively impact the performance, scalability, and availability of your system. Even worse, along series of direct HTTP communication can lead to deep and complex chains of synchronous microservices calls,shown in Figure 4-9:
A message queue is an intermediary construct through which a producer and consumer pass a message. Queuesimplement an asynchronous, point-to-point messaging pattern.
Message queuingis an effective way to implement communication where a producer canasynchronouslysend a consumer a message.
You need to execute a script on a remote instance through Oracle Cloud Infrastructure Resource Manager. Which option can you use?
Using Remote Exec
With Resource Manager, you can useTerraform's remote exec functionalityto execute scripts or commands on a remote computer. You can also use this technique for other provisioners that require access to the remote resource.
You are building a container image and pushing it to the Oracle Cloud Infrastructure Registry (OCIR). You need to make sure that these get deleted from the repository.
Which action should you take?
Deleting an Image
When you no longer need an old image or you simply want to clean up the list of image tags in a repository, you can delete images from Oracle Cloud Infrastructure Registry.
Your permissions control the images in Oracle Cloud Infrastructure Registry that you can delete. You can delete images from repositories you've created, and from repositories that the groups to which you belong have been granted access by identity policies. If you belong to the Administrators group, you can delete images from any repository in the tenancy.
Note that as well deleting individual images ,you can set up image retention policies to delete images automatically based on selection criteria you specify
In each region in a tenancy,there's a global image retention policy. The global image retention policy's default selection criteria retain all images so that no images are automatically deleted. However, you canchangethe global image retention policy so that images are deleted if they meet the criteria you specify. A region's global image retention policy applies to all repositories in the region, unless it is explicitly overridden by one or more custom image retention policies.
You canset upcustom image retention policiesto override the global image retention policy with different criteria for specific repositories in a region. Having created a custom image retention policy, you apply the custom retention policy to a repository by adding the repository to the policy. The global image retention policy no longer applies to repositories that you add to a custom retention policy.
Which concepthe following steps reference Console instructionsCloud Infrastructure Resource Manager?
Following are brief descriptions of key concepts and the main components of Resource Manager.
Information to codify your infrastructure. A Terraform configuration can be either a solution or a file that you write and upload.
Instructions to perform the actions defined in your configuration. Only one job at a time can run on a given stack; further, you can have only one set of Oracle Cloud Infrastructure resources on a given stack. To provision a different set of resources, you must create a separate stack and use a different configuration.
Resource Manager provides the following job types:
Plan: Parses your Terraform configuration and creates an execution plan for the associated stack. The execution plan lists the sequence of specific actions planned to provision your Oracle Cloud Infrastructure resources. The execution plan is handed off to the apply job, which then executes the instructions.
Apply. Applies the execution plan to the associated stack to create (or modify) your Oracle Cloud Infrastructure resources. Depending on the number and type of resources specified, a given apply job can take some time. You can check status while the job runs.
Destroy. Releases resources associated with a stack. Released resources are not deleted. For example, terminates a Compute instance controlled by a stack. The stack's job history and state remain after running a destroy job. You can monitor the status and review the results of a destroy job by inspecting the stack's log files.
Import State. Sets the provided Terraform state file as the current state of the stack. Use this job to migrate local Terraform environments to Resource Manager.
The collection of Oracle Cloud Infrastructure resources corresponding to a givenTerraform configuration. Each stack resides in the compartment you specify, in a single region; however, resources on a given stack can be deployed across multiple regions. AnOCIDis assigned to each stack.
the following steps reference Console instructions
Create a Terraform configuration.
Create a stack.
Run a plan job, which produces an execution plan.
Review the execution plan.
If changes are needed in the execution plan, update the configuration and run a plan job again.
Run an apply job to provision resources.
Review state file and log files, as needed.
You can optionally reapply your configuration, with or without making changes, by running an apply job again.
Optionally, to release the resources running on a stack, run a destroy job.
You are working on a cloud native e-commerce application on Oracle Cloud Infrastructure (OCI). Your application architecture has multiple OCI services, including Oracle Functions. You need to trigger these functions directly from other OCI services, without having to run custom code.
Which OCI service cannot trigger your functions directly?
Overview of Functions:
Oracle Functions is a fully managed, multi-tenant, highly scalable, on-demand, Functions-as-a-Service platform. It is built on enterprise-grade Oracle Cloud Infrastructure and powered by the Fn Project open source engine. Use Oracle Functions (sometimes abbreviated to just Functions) when you want to focus on writing code to meet business needs.
The serverless and elastic architecture of Oracle Functions means there's no infrastructure administration or software administration for you to perform. You don't provision or maintain compute instances, and operating system software patches and upgrades are applied automatically. Oracle Functions simply ensures your app is highly-available, scalable, secure, and monitored. With Oracle Functions, you can write code in Java, Python, Node, Go, and Ruby (and for advanced use cases, bring your own Dockerfile, and Graal VM).
You can invoke a function that you've deployed to Oracle Functions from:
- The Fn Project CLI.
- The Oracle Cloud Infrastructure SDKs.
- Signed HTTP requests to the function's invoke endpoint. Every function has an invoke endpoint.
- Other Oracle Cloud services (for example, triggered by an event in the Events service) or from external services.
so You can then deploy your code, call it directly or trigger it in response to events, and get billed only for the resources consumed during the execution.
Invoking Oracle Functions from Other Oracle Cloud Infrastructure Services:
You can invoke functions in Oracle Functions from other Oracle Cloud Infrastructure services. Typically, you'llwant an event in another service to trigger a request to invoke a functiondefined in Oracle Functions.
This functionality is currently available in:
4.The Oracle Integration service,using the OCI Signature Version 1 security policy. For more information, seeConfigure Oracle Integration to Call Oracle Cloud Infrastructure Functions with the REST AdapterinUsing the REST Adapter with Oracle Integration.
so OCI Registry services cannot trigger your functions directly