Book Image

Developing Robust Date and Time Oriented Applications in Oracle Cloud

By : Michal Kvet
Book Image

Developing Robust Date and Time Oriented Applications in Oracle Cloud

By: Michal Kvet

Overview of this book

Proper date and time management is critical for the development and reliability of Oracle Databases and cloud environments, which are among the most rapidly expanding technologies today. This knowledge can be applied to cloud technology, on premises, application development, and integration to emphasize regional settings, UTC coordination, or different time zones. This practical book focuses on code snippets and discusses the existing functionalities and limitations, along with covering data migration to the cloud by emphasizing the importance of proper date and time management. This book helps you understand the historical background and evolution of ANSI standards. You’ll get to grips with data types, constructor principles, and existing functionalities, and focus on the limitations of regional parameters and time zones, which help in expanding business to other parts of the world. You’ll also explore SQL injection threats, temporal database architecture, using Flashback Technology to reconstruct valid database images from the past, time zone management, and UTC synchronization across regions. By the end of this book, you’ll be able to create and manage temporal systems, prevent SQL injection attacks, use existing functionalities and define your own robust solutions for date management, and apply time zone and region rules.
Table of Contents (26 chapters)
1
Part 1: Discovering Oracle Cloud
4
Part 2: Understanding the Roots of Date and Time
7
Part 3: Modeling, Storing, and Managing Date and Time
12
Part 4: Modeling Validity Intervals
17
Part 5: Building Robust and Secure Temporal Solutions
20
Part 6: Expanding a Business Worldwide Using Oracle Cloud

Oracle Cloud terminology

This section will introduce you to the core terms of Oracle Cloud, focusing on regions, availability domains, realms, consoles, tenancies, and compartments. VCNs, instances, and images are also covered. We will look at Object Storage as its form of file storage. The complexity of Oracle Cloud and all its properties are very well summarized in the books listed in the Further reading section at the end of this chapter.

Region

A region is a geographical location from which resources are provided (for example, a VCN).

Availability domains

Each region has at least one availability domain. Each availability domain is independent, isolated from other domains, and fault-tolerant. Thus, configuring multiple availability domains can ensure high availability and failure resistance. Each availability domain contains three fault domains.

Realms

A realm is a logical collection of regions. Each realm is isolated and does not share any data with other realms. A tenancy (which will be explained next) is associated with just one realm and has access to the region belonging to the realm.

Tenancies

A tenancy is a specific cloud repository, usually devoted to an organization or company, and provides secure and isolated storage and processing partitions. You can manage, create, and associate cloud resources and services across a tenancy.

Consoles

The cloud console is a web application providing access and management functions for OCI.

Compartments

A compartment comprises a cloud resource (instances, VCNs, and so on) with specific privileges and quotas. It is a logical unit rather than a physical container. Note that Oracle provides you with a tenancy after registration, which is a root compartment holding and managing all cloud resources provided. Then, you can create a resource categorization tree. Each resource is associated with a compartment by definition. The core principle is based on granting only users the resources necessary for their work and nothing more.

VCNs

A VCN is a virtualized version of a conventional network, including subnets, routers, gateways, and so on. It is located within one region and can spread across multiple availability domains.

Instances

An instance is a compute host running in the cloud. Its main advantage is flexibility. You can utilize sources (physical hardware) on demand to ensure performance, high availability, and robustness and comply with the security rules you have set.

Images

An image is a specific template covering the operating system and other software installed. In addition, Oracle provides you with several virtual hard drives, which can be used in the cloud, such as Oracle Linux, CentOS, Ubuntu, or Windows Server.

Storage management

Storage management is an inevitable part of data processing. Storage is where external database files are present and logs and backups are accessible. A block volume is a virtual hard drive that provides persistent data storage space. It works following similar principles to hard drives in ordinary computers. It is possible to attach or detach them on demand, even to another instance, without any data or application loss.

Object Storage is a storage repository architecture available and accessible from anywhere via a web interface. Physical data files can have any structure and type. Their size is limited to 50 GB per file. Object Storage is a standard repository for backups or large data objects, neither of which are usually changed very often. A bucket is a lower architectural definition. It denotes a logical container within Object Storage. Several buckets can be present in any Object Storage instance. The amount of data (in terms of both size and count) is unlimited.

Before provisioning a database, let’s reflect on the core element of OCI – IAM. This service allows you to create users, groups, and policies to control access to resources. All these resources are managed and set by the created users. During the provisioning, one user is automatically created, followed by granting them administrator privileges. Individual users can be part of a specific group with the same privileges, access options, and permissions. A policy specifies the user’s access to a particular resource. It is typically set for the whole group using a tenancy or compartment. Individual resources are grouped into compartments, forming the fundamental element of OCI, and ensuring segregation, isolation, and proper organization.

The components of technology managed in the cloud, such as compute instances, database instances, block volumes, load balancers, and so on, are called resources.

To ensure the accessibility of individual components and resources, basic knowledge of networking principles is required.

Networking

A network is formed by a set of computer or device nodes, where individual nodes can communicate with each other. Each node is uniquely identifiable by an IP address. The router is the component used for traffic routing within a network. Firewalls are used to secure the resource by blocking packets that break security rules. A VCN is a private network running in one OCI region. A VCN is an important element for the definition and configuration of application servers, databases, load balancers, and other cloud services. The overall aim is to ensure the high availability of a robust and reliable solution by applying scalability and security rules. VCNs can be divided into several subnets. The route table consists of the rules for the traffic out of a VCN. Security lists commonly act as a regular firewall for the subnets. Similarly, network security groups act as firewalls for groups of instances across subnets.

If you have created a VCN, you can define compute instances. The next section will discuss this.

Compute instances

OCI allows you to define and provision compute hosts called compute instances. Each compute instance can be operated and administered independently. OCI offers bare-metal (with dedicated physical server access for the highest performance and strong isolation) and VM instances (sometimes shortened and expressed as VMs) only.

Compute instances are used to run individual applications or installations, such as Apache, Docker, and so on. For compute instances, various operating systems and versions can be used. They can be installed from the available images already present in the cloud repository, or your own images can be used.

Each instance is delimited by the number of CPUs and network resources and the amount of memory. The list of available platform images can be found in the OCI documentation. Oracle provides images for Oracle Autonomous Linux, CentOS, Ubuntu, Windows Server, and so on, so any system can generally be supported and migrated.

We covered a basic overview of the OCI principles, technology, and available resources in this section. As is evident, Oracle Cloud provides you with a robust solution for storing data and application references, ensuring availability, backup strategies, and patching. Oracle technology is the most relevant for complex information system support. Thus, there is no question of why to migrate to Oracle Cloud since the advantages are unambiguous. The only question is how to do it.