Microservices Architecture: Simplified

What is Microservices ?

Microservices (MS) is an architectural style for constructing applications. Its collection of small, loosely coupled collaborating services that works independently.

Lets understand by example: You are using a social media platform with features as Profile, News feed, Chat, Login, Share/broadcast etc. In Microservice style architecture, every services will be designed and developed separately irrespective of development language preference and technology stack. So here News feed will be a service may be developed in C++, Chat will be another service may be developed in another language Scala or Share/broadcast will be another services may be developed in Go or other languages. It gives flexibility to design and develop based on programming language of own preference. Every services will have their own sets of Database and controlled and managed separately but interact with each other to fulfil service requirement.

The Services communicate using either synchronous protocols such as HTTP/REST, WebSockets or asynchronous protocols such as AMQP.

As the every microservices will have their own sets of Databases and they may have to interact to fulfill service requirement, the data consistency between services is maintained using the Saga Pattern.

The advantage of using microservice based architecture are;

1- Every services will run and managed independently, hence if once services will be down then other services will remain active. This will turn outages of entire applications.

2- The maintenance, deployment and upgrade of each microservices will be independent and no dependency on another team/process.

3- Loosely coupled, highly maintainable and testable that enables rapid and frequent development and deployment (CI/CD).

Challenges with Microservices based architecture

1- Developers must deal with the additional complexity of distributed system:

Lets say, You have to get profile info of person using their profile ID then (i) in monolithic architecture developer will usually call a function similar like and pass on explicitly: getProfile (int profileID) and parse through single codebase.

In case datatype of profileID changed from int to string or char due to some business requirement then all the respective services which is using profileID as integer must change at a time of compilation otherwise it will throw compilation error.

However in Microservice based architecture, as all services are independent and you made changes of datatypes for profileID in only profile services then at the time of execution the service chain due to inter communication will break.

2– Increased memory consumption to to multiple service functions

How to Design Microservices based Architecture : Building blocks ?

1- Define Clients : Every microservices has its own clients or contracts. Lets say if profile microservice has to interact with News feed microservices to get news feed information about respective profile then it will interact with client of news feed and construct the object to get relevant news feed.

2– Define Mechanism for Routing the request : Here we can deploy load balancer or Service Registry (SR) to route the service request for subsequent microservices.

3– Define Continuous Integration and Continuous Deployment (CI/CD) process. As the deployment of each microservices are independent, we should have a automated CI/CD process. Using Jenkin or similar tools we can achieve this.

4– Define Service to Service communication establishment : Every microservices may have different way to interact between each other or with client. Lets say some microservices can be communicated with Message queue, some may be request-response based etc.

5- Define Distributed Logging : Each microservices have their own way to serving request and generating logs. In distributed system tracking of logs at every place will be challenging while troubleshooting for issues as services are interconnected. We should have distributed logging platform such as Elasticstack to capture all types of logs from different sets of microservices.

Blockchain- Future of Telecom industry

In today’s flat world the major backbone is communication. The need for CONNECTED SOCIETY with the evolution of 5G/IOT technology has increased the data flow exponentially. This has draw a new line of business and technical challenges for Communication Service Provider (CSP) on;

(i) Secure and Trustworthy communication
(ii) Cross Border Jurisdiction process
(iii) Global fraud
(iv) Revenue leakage e.g. with loss of data
(v) Delay in multi party Settlement
(iv) Involvement of third party to ensure data integrity
(v) Real time tracking of events and Service Level Agreement

These aforesaid concerns challenged the business leaders on their existing business model and force them to think beyond to foster a new “TRULY GLOBAL” business model for operators to create new revenue stream supporting transactions in any currencies.

Here we can leverage Blockchain technology using Smart Contracts (SC). Blockchain facilitates the decentralized approach for CSP so that there will not be a single authority in between to ensure data integrity and security. 

In nutshell Blockchain technology;

  • Is a shared, replicated, permissioned ledger technology
  • Can open business networks by taking out cost, improving efficiencies and increase accessibility and revenue stream
  • Is Immutable, Data in Append mode only and can’t be altered.

Smart contracts are self-executable, verified and signed contracts encoded in programming language over blockchain network. This SC shall be self executed after fulfilling the predefined criteria of executions between the parties. Smart Contracts can be created using several popular SDK’s such as Ethereum, Hyperledger etc.

The Current Vs Blockchain business model for all types of inter operators transactions shall be;

In this above scenarios, the existing business model is “CENTRALISED” and Telecos have dependency to rely on third party (Middleman) to ensure transactions/data authenticity/integrity routed to their another partner Telecos.

It clearly shows lack of trust between partner Teleco operators and they are buying trust from third party to authenticate.

The Blockchain- Smart Contract will enable DECENTRALISED business model and both the partner telecom operators can mutually define there rules and transact in real time directly. This will create trust with partners and reduces their huge OPEX cost.

The typical service flow of Blockchain smart contract technology will be;

The current implementation challenges with Blockchain are;

  • No Industry standard for blockchain adaptation unlike ETSI
  • No Regulation Guidelines while dealing with Third Party Information
  • No Pricing standardization (Pricing guidelines)

Network function virtualization (NFV)

NFV was introduced to reduce the number of hardware platform and create flexibility in network and IT domain. NFV aims to leverage IT standard virtualization technology to consolidate network applications into  telecommunication standard service switches and storage and to create openness towards application layer.

NFV is to create virtualization layer between the software and hardware. The decoupling of hardware and software removes challenges that operators today have in regard to dependencies of the two like upgrades, expansions, new functions  and all activities in network that impact the individual nodes and create  long lead time. With the decoupling of software and hardware all of these mismanages will be removed. Additionally to this since the hardware base is  not application dependent, it gives the operators possibility to allow other  users to utilize the network, creating a new revenue stream and important  part is all this can be managed in cloud. Meaning that cloud shall orchestrate the virtualization layer that it in turns automatically administrate the cloud resources at hand.

NFV is implementation of network functions as software only entities that run over the NFV infrastructure (NFVi).

NFV has 3 main working domains

1- Virtual network functions (VNF) – as the software implementation of network function which are capable to running over NFVi. A VNF is virtualization of network functions in a legacy non virtualized network. E.g.:  NF is 3GPP evolved packet core EPC network management, such as mobility management entities (MME), serving gateway (SGW), and Packet data network gateway (PGW), Residential gateway (RGW), dynamic host configuration protocol (DHCP) servers, firewall etc.

A VNF can be composed of multiple internal components. E.g. one VNF can be deployed over multiple virtual machines (VM) or each VM host a single component of VNF. In other cases whole VNF can be deployed on single VM also.

2- NFVi– including the diversity of physical resources and how these can be virtualized. NFVi supports the execution of VNF.

3- NFV management and orchestration– which covers orchestration and  life cycle management of physical and software resources that supports the infrastructure virtualization and life cycle management of VNF’s. Focus on all virtualization specific management tasks necessary in the NFV framework.

NFV framework.

The NFV framework enables dynamic construction and management of VNF instances and relationship between them regarding data, control, management and dependencies and other attributes.

NFV architectural framework identifies the main functional blocks and main reference point between such blocks like VNF, EMS (element management system), NFVI (including HW and virtualized resources) and virtualization layers.

NFV benefits.

Reduce CAPEX, OPEX, power consumption, time to implement the new network services, Improve ROI. Greater flexibility of scaling.