2017년 6월 5일 월요일

Technology enabling CNA

In the previous article (What is cloud native applications?), I learned about the necessity and characteristics of CNA (Cloud Native Application).

This time, let's look at the technology to enable such a CNA.
To implement a CNA, you need six technologies as shown in the figure below.





  • Microservices

As you can see from the name, it is a function to divide into functions and to develop the service.
This structure is called the Micro Service Architecture (MSA).
The opposite of the MSA is the Monolithic Architecture.


The monolithic architecture is to make all the features a bunch.
So if you develop a monolithic architecture, you can guarantee optimal efficiency, but problems arising from one function will affect the entire system.
For this reason, it is a structure suitable for a simple structure application, but it is a structure which degrades stability for an application having a complicated function.
On the other hand, the MSA separates services by function, preventing errors in one service from affecting other services.
Instead, the amount of data communication between each service is increased, so that more resources are consumed and additional code development is required to match the consistency of the shared data.


12-Factors App
The 12-Factors App definition is defined in the header of the 12factor.net site.

In the modern era, software is commonly delivered as a service: called web apps, or software-as-a-service. The twelve-factor app is a methodology for building software-as-a-service apps that: 
Use declarative formats for setup automation, to minimize time and cost for new developers joining the project;
Have a clean contract with the underlying operating system, offering maximum portability between execution environments;
Are suitable for deployment on modern cloud platforms, obviating the need for servers and systems administration;
Minimize divergence between development and production, enabling continuous deployment for maximum agility;
And can scale up without significant changes to tooling, architecture, or development practices.


For more information on the 12 Factors, please visit the 12factor.net site.


  • Multi-tenancy

Multi-tenancy is an architecture with multiple users (tenant).
If you compare it to a house, it is an apartment.



We are already accustomed to this kind of service environment.
For example, let's look at the webmail service.
The webmail service is a web application, but several users are using it in their own environment.
Their mail boxes can not be separated and can not be viewed by others. You can also use your own personalized UI by creating your own screens or mailboxes.
As described above, the storage space and the setting contents are managed independently for each user in one service.
The advantage of this architecture is that it can save money because one system is shared by multiple users.
It is also advantageous that data integration is easy because it has a schema internally that looks different from user to user.
However, in order to show different users, it is necessary to develop the service precisely, and there is also a disadvantage that if a bug occurs, it can affect the entire system.
In addition, data is integrated and managed, making it vulnerable to security.


  • Container

Container technology is compared with virtualization technology.
These two seemingly similar sides are always comparable.
But strictly speaking, container technology and virtualization technology are completely different.



Virtualization technology is virtualization of the entire OS, and container technology isolates the environment on the OS.
So, container technology is no booting process during instance creation, and it is fast because it shares OS resources.
Container technology keeps each operating environment in a container and isolates them from each other.
It is a built-in feature of Linux, and it is a technology that will support future Windows operating systems.


  • API

API (Application Programming Interface) is an interface technology between programs.
A UI (User Interface) is required for one program to communicate with a user.
Similarly, APIs are required for different applications to interact.
The API has a structure for requesting and responding to a service in accordance with previously promised rules.
In recent years, REST APIs have been mainly developed and data types are being developed mainly using JSON format.



The initial API was defined as a packet, and the data was developed as a binary.
The packet type API is defined by the developer as a packet structure.
Therefore, the structure of the packet is all different, so much learning was needed for the API usage.
Also, since the data format is binary, the contents can not be known without the packet definition document.
So, Simple Object Access Protocol (SOAP) has emerged.
SOAP was introduced to standardize packet types, and it was able to serialize and transmit objects.
This means that it is possible to represent hierarchical data that was difficult to generate in a packet-type protocol.
Distributing WSDL that defines SOAP in XML format also makes protocol sharing much easier.
However, there are disadvantages of data corruption when interworking with other languages, which requires much effort to be developed.
The REST API was easy to integrate regardless of the platform, development language, or device type using the Web protocol, and the readability of the data was enhanced by using the JSON format.
The JSON format provides a compact size compared to XML and is the most recently developed API type.


  • PaaS

CNA is an application for the SaaS model. So it works on the foundation of PaaS technology.
For more information on PaaS, see "What is cloud computing?".

2017년 6월 2일 금요일

What is cloud native application?

In the previous article, I understood the concept of cloud computing.

Then there will be some questions.
Cloud computing will evolve as a SaaS model. But is that easy?
It has evolved from IaaS to PaaS through virtualization technology.
So, what other skills do you need to develop from PaaS to SaaS?

To solve these questions, you first need to understand the Cloud Native Application.

The figure below shows the type of application and the stage of development.




  • Native Application

With the introduction of personal computers, all programs had to run on a PC.
So the applications that were initially created were packaged and distributed to fit the PC environment.
Therefore, the same application is classified as Linux for Window.
In addition, the same Window application was packaged and distributed differently to Window7, Window10, and so on.
The application that was packaged and deployed is Native Application.


  • Web Application

Web applications appeared in the PC environment with the introduction of the Internet.
The web application is installed and running on a remote server,
PC is a type of service provided from server through internet.
Therefore, it was not necessary to distribute the application according to the environment of the PC.
And upgrading the application was easy.
However, there is a disadvantage in that it can not be used when the Internet can not be used and the execution speed becomes slow when the Internet speed is slow.
The application user receives the service of the server unilaterally.
It is more passive than Native Application.


  • Cloud Native Application

Cloud Native Application is the emerging form of cloud computing environment.
Cloud-native applications are applications that run in the SaaS model environment.
So it is similar to web application in that it is served over the Internet.
However, Cloud Native Application can be installed by users themselves.
You can also control the service.



You can see that the three types of applications above have emerged around the world in almost every 20 years.
It is understandable that the current process is changing from web application to CNA (Cloud Native Applcation).

The current business environment has increased uncertainty.
To drive business success in this uncertain environment, applications must also meet the following requirements:




  • Speed

I think the quickest way to overcome business uncertainty is to deploy and recall services.
In addition, damage due to incorrect distribution can be minimized by immediate release of the new version.


  • Safety

A failure occurring in one service should not be transferred to another service.
Also, faults must be quickly restored.
So users should not be aware of the failure.


  • Scalability

Do not waste resources by overestimating service usage.
Also, quality of service should not be made with poor usage prediction.
To this end, it should be possible to expand the service horizontally.
It should also be able to dynamically apply this.


  • Diversity

Users should be provided with access to various channels.
As many users as possible should be given service opportunities.



Let's see what characteristics a CNA should have to have the elements for such a business success.




  • Services

Each service is loosely coupled to one another and is run and managed through the Web API.


  • Handling Failures

You should be able to control if a failure occurs.


  • Horizontal Scalability

It should be designed to be horizontally expandable.


  • Asynchronous Processing

Service requests must be processed asynchronously, and queues must be used to separate functions.


  • Stateless Model

All data must be separate from the application code and be available to multiple users at the same time.


  • Minimize Human Intervention

Rapid and repetitive deployment (Deploy) requires minimal user intervention.
If a fault occurs, the fault must be detected.
You should be able to remove the lost instance and quickly create a new instance.