Focus on Caduceus software architecture: Modular vs monolithic

Caduceus
6 min readFeb 3, 2022

--

DeFi, Metaverse, GameFi, Web3.0 were the buzzwords of 2021, and right now, Web3.0 is arguably the biggest talking point. Built on blockchain technology, Web3.0 represents the next generation of the internet. It will incorporate the semantic web, artificial intelligence and the internet of things to offer a more user-specific, decentralised version of the internet in which users have more privacy, improved security, and more control over their data.

The distributed storage, asymmetric encryption technology and decentralisation values that blockchain represents are consistent with the vision for Web 3.0. New blockchain-based business models are continually coming to the fore, which necessitates the evolution of blockchain technology. In fact, blockchain’s recent development offers a parallel to that of the software and internet shift from single towards modular.

So, as far as blockchain is concerned, what’s the significance of monolithic architecture, modularity (modular) and microservice architecture? Why does Caduceus adopt a microservice architecture? What core advantages will microservices bring to the public chain ecosystem?

Features of Monolithic

An archive (which can be a JAR, WAR, EAR or other formats) that contains all the functionality of an application is often referred to as a monolith. The methodology of building one is the monolithic application architecture. This integrates a single complete system — front-end page and back-end interface services, business logic and data operations. A single application includes all business modules.

When the scale of users increases, monolithic applications can be handled by clusters. Such as through DNS, Nginx or hardware F5 distribution of servers in the cluster to provide services.

Monolithic disadvantages

1. Low development efficiency and poor maintenance stability

2. Difficult to maintain, refactor, and deploy code

3. Stability, availability (downtime maintenance), and low scalability

4. Teamwork is difficult; not customisable; cost is an issue

5. Poor scalability, poor cross-language level, difficult iteration

Features of Modularity

Modularity is a way of dealing with the decomposition of complex systems into better manageable modules. In simple terms, modularisation is to decompose the system into multiple module components, each of which is a blockchain, and they are responsible for different functions (such as execution layer, consensus security layer, data availability layer, and application chains for DEX, stability coin, NFT and derivatives etc). These modules can be stripped out at will or recombined together. The significance of modularity lies in maximizing design reuse, and meeting more personalised needs more quickly with the fewest modules and components. Its advantages are as follows:

1. Decoupling

After the business is divided into modules, in order to decouple the business modules, each is an independent module, and there is no dependency between them.

2. Reuse

Each module is responsible for different functions, different business logic, and business decoupling between modules. The function of the module is relatively simple and can be used in multiple projects

3. Avoid variable pollution

It can avoid naming conflicts and solve the general phenomenon of global variables

4. Can be compiled separately

Each module is actually a complete project, which can be compiled and debugged separately

5. Improve efficiency

Mature class libraries can be referenced to shorten development time and improve development efficiency

6. Parallel development and testing

Each team is responsible for different modules to improve development and testing efficiency

A useful analogy to illustrate the differences between monolithic architecture and modularity is laptops versus desktop computers. For example, notebook computers represent a monolithic architecture. Although it is easy to develop, test, manage, and deploy in a centralised manner, a laptop is less efficient in terms of component stability, availability and scalability, and peer-to-peer networking can be a challenge.

The modularity represented by the desktop computer, meanwhile, means flexible architecture between each module facilitating the combination and decomposition of modules, as well as the function debugging and upgrade of a single module. Peer-to-peer networking is not a challenge.

Modularity disadvantages

1. Modular granularity is higher

2. The modular system is layered, and the call chain will be very long

3. Communication between modules drains power

4. Unable to manage module dependencies

Microservice architecture advantages

Microservice architecture is becoming more prevalent. It offers tangible benefits including improved scalability and flexibility. Tech giants such as Netflix, Google and Amazon have successfully switched from monolithic architecture to microservices. Other mainstream microservice architectures on the market currently include SpringCloud and Go-micro. Microservices architecture has many important advantages over modularity.

First, it solves the problem of complexity. It decomposes a monolithic application into a set of services. While the total amount of functionality remains the same, the application has been broken down into manageable modules or services. These services define explicit RPC or message-driven API boundaries. Microservices architecture enforces a level of application modularity that is difficult to achieve with a monolithic codebase. As a result, microservices are much faster to develop and easier to understand and maintain.

Second, this architecture allows each service to be developed independently by a team dedicated to that service. Developers are free to choose the development technology as long as it conforms to the service API contract. This means that developers can write or refactor services using new technologies, and since the services are relatively small, this doesn’t have much of an impact on the overall application.

Third, the scalability and reliability are relatively enhanced, and the cross-language level has become more flexible; at the same time, in terms of high team collaboration, the efficiency is also greatly improved, and the system iteration is relatively easy.

Finally, a microservice architecture enables each microservice to be deployed independently. Developers do not need to coordinate the deployment of service upgrades or changes. These changes can be deployed as soon as the tests pass. So the microservice architecture also makes CI/CD possible.

Why does Caduceus adopt a microservice architecture?

Caduceus is a metaverse and Web3.0 underlying infrastructure with high modularity, high scalability, high security and high-performance parallel computing capabilities.

First of all, Caduceus is a chain with high TPS. The physical server of each blockchain node transaction can no longer meet its computing requirements. Instead, multiple servers are required to complete node computing. For example, the verification process requires a lot of computing power. Adopting a microservice architecture effectively solves this problem. In terms of blockchain and state database storage, for example, Caduceus has 10,000 transactions per second, 1.7 megabytes per second, 100GB per day, and 36.5T of data per year. If the virtual machine cannot carry it, the microservice architecture can carry more computing power.

From the perspective of transaction execution, Caduceus can be independently deployed, run, and upgraded. Not only that, but this system architecture also allows microservices and microservices to be ‘loosely coupled’ in structure, and functionally as a unified overall.

From the perspective of function expansion, Caduceus can better combine massive distributed IPFS storage, GPU cloud rendering, and SWAN custom network to provide decentralised cloud computing support for Metaverse through the microservice architecture, and change the user participation experience from the traditional one. of network users to the blockchain world.

In terms of the underlying architecture, more virtual machines can be developed at the bottom of Caduceus, and microservices are more conducive to the integration of traditional Internet developers. At the same time it helps to minimise barriers to adoption of new technologies, which also makes Caduceus more developer friendly.

In addition, Caduceus provides everyone with a secure, highly private user identification system to be able to enjoy new social media, chat, online shopping and gaming. In the future, the functional expansion of Caduceus will not be limited to the limitations of Ethereum’s transfers and virtual machines. In addition to Ethereum transfers, Caduceus is compatible with more virtual machines. More importantly, Caduceus will also build the function of the metaverse world. Caduceus provides a thriving device ecology for the metaverse world, lowers hardware thresholds, and increases device penetration. Developers can quickly build Metaverse applications through the Caduceus microservice architecture, which will quickly achieve new goals.

Summary

These are exciting times. The application and development of the underlying blockchain architecture is underway, while microservice architecture is changing the world as we know it. From a technology development perspective, microservice architecture is critical to the future of blockchain. It brings developers extreme ease of use and superiority in system performance, and it will become an important infrastructure for daily users of dApps interacting with blockchain technology. The new infrastructure platform that Caduceus brings meanwhile, will play an important role in expanding the possibilities of microservice blockchain in the future.

For more information: caduceus.foundation/ info@caduceus.foundation

Discord: discord.com/invite/ztygXMtr3d

Twitter: twitter.com/Caduceus_CMP

Telegram: t.me/CaduceusMetaverseProtocol

Facebook: facebook.com/CaduceusMetaverseProtocol/

Medium: caduceusmetaverseprotocol.medium.com

--

--

Caduceus
Caduceus

Written by Caduceus

Caduceus Metaverse Protocol — Providing an open blockchain platform for Metaverse development. Join the community — https://linktr.ee/caduceus_cad

No responses yet