With the rapid development of the Internet and the popularization of the concept of cloud service, we tend to build more and more distributed system architecture, which has become an important assessment technology for enterprise promotion and salary increase.
The way Java projects are architected
As shown in the figure below,Java projects have generally gone through a process from single application architecture to vertical application architecture to distributed application architecture. Let’s take a closer look at the changes and advances in these three architectures.
1. Traditional architectural thinking -> single application architecture
Single application architecture means that a project is a system. At the beginning of the 21st century, large-scale information electronization in enterprises and public institutions led to the emergence of a large number of internal information management systems, such as OA , financial management software, personnel management system,ERP, etc., but with the increase of the system’s business functions and code volume, it becomes more and more difficult to maintain and expand, and with the increasing number of visits to the system, the performance bottleneck of the system is more and more prominent.
2. Vertical Application Architecture -> A system is broken down into subsystems
Vertical application architecture is simply to separate the original single application architecture system into multiple subsystems.
To a certain extent, the system is difficult to maintain the problem, each team can be responsible for maintaining their own subsystems, reduce maintenance costs, improve the efficiency of development.
It also solves the problem of system expansion. As the service expands, we can solve this problem by adding one subsystem without affecting other subsystems.
It also solves the problem of system access diversion to a certain extent and makes reasonable service deployment planning according to the nature and traffic of different subsystems.
However, some business code (permission verification, logging, caching, system security, system reporting… .). , can not share, easy to create information island, duplicate wheel.
3. Distributed Architecture -> A system is split into multiple services
With the increasing number of subsystem applications of vertical application architecture, in order to avoid repeating the same wheel, we extract the common and core business and provide services as a separate system, so that all subsystems can be reused, thus evolving into a distributed architecture as shown in the figure above.
Architecture A set of large, mature distributed systems, involving many middleware reference and support systems, which are collectively referred to as distributed system infrastructure.
Distributed system infrastructure and architecture
Of course, the basic software infrastructure of distributed system also includes but is not limited to data analysis/offline computing/data warehouse/automated operation and maintenance and other related components and frameworks. These knowledge belong to big data and operation and maintenance and other knowledge, which will not be described here.
Distributed system architecture diagram
Key points to understand about distribution
1. ActivMQ distributed message bus
In a large distributed system, under the premise of following the JMS specification, large-scale asynchronous message communication between systems and centralized common communication mechanism.
In-depth knowledge of JMS specifications and asynchronous communication mechanisms in distributed system architectures.
2. NIO foundation for high concurrency programming
The fundamentals of NIO and the implementation process
Be able to systematically understand the difference between traditional IO and NIO and learn the realization principle of NIO
3. Redis in-memory database
In large distributed system, how to solve some unstructured data fast access solutions under the condition of high concurrency.
Can have a systematic understanding of non-relational database and non-relational database as well as Redis in-memory database basic data types and their application scenarios.
NIO popular framework for high concurrency programming, Netty
NIO framework Netty introduction and Netty application scenarios.
Can use Netty to achieve basic communication between client and server.
5. Lucene full-text retrieval technology
Search solutions for more than a million listings on large e-commerce sites.
Can have a preliminary understanding of full text search technology, as well as Lucene in the site search application of the underlying operation principle.
Duboo Distributed services framework
In distributed system, the application scenario and application mode of Duboo framework.
Understand the basic concepts and principles of Duboo, and the differences between its application and traditional architecture in distributed systems.