1. Distributed architecture
How does distribution come about? Traditional telecom, banking, when the volume of business after the ordinary server CPU/IO/ network to 100%, the request is too slow how to do? The most straightforward way to do this is to upgrade the hardware, and anyway there is no shortage of money, IBM minicomputers, mainframes, and procurement of heap hardware.
But the Internet can’t do that. The Internet doesn’t have that deep pockets, and there are a lot of startups that can make money. So there is a software solution: distributed system, simply put, is not one server, I use two, 10, 100… This requires software systems to support.
With so many machines, how do I get them to work together, which requires a dispatch center (or registry); Communication between machines is definitely involved, so an efficient RPC framework is needed; A request comes, how to distribute, need a request distribution system (load balancing); Then consider that each role should not be a performance bottleneck; In addition, horizontal expansion should be convenient and single node failure should be considered.
Need a distributed system, concurrency is certainly not low,
So the above is not enough, you need to consider cache, MQ, job, DB, etc. Cache, now the third party cache is also more mature, redis/memcache and so on; Mq, RabbitMQ, Kafka, etc. Job, now there are elasticJob and TBSchedule third-party task frameworks, or you can use Quartz to support distributed tasks, but quartz doesn’t have operations tools. DB, the database had better consider the business split in the early stage of the project, the system split DB corresponding to the vertical split, later can do read and write separation, one master and more slave, or even more master and more slave, the industry has a corresponding solution.
To sum up, we should first understand the principle of distribution, and then find mature products in the industry for each functional area in real time. The Internet industry, basically have open source products for you to choose from.
The following is my summary of distributed technology solutions:
Second, micro-service architecture
The concept of Microservice appeared in 2012, as a way to speed up the development process of Web and mobile applications, began to attract attention from all parties in 2014, and 2015, can be said to be the first year of microservices;
More and more forums, communities, blogs and Internet industry giants began to discuss and practice micro-services, which can be said to further promote the development and innovation of micro-services.
Microservice Architecture is an architectural concept that aims to decouple solutions by decomposing functionality into discrete services. You can think of it as being at the architectural level rather than getting services
A lot of SOLID principles apply to classes. Microservice architecture is an interesting concept. Its main role is to decompose functions into discrete services, thus reducing system coupling and providing more flexible service support.
Concept: Break up a large single application and service into several or even dozens of supporting microservices that extend individual components rather than the entire application stack to meet service level agreements (SLAs).
Definition: Create applications around business domain components that can be developed, managed, and iterated independently. Using cloud architecture and desktop deployment, management, and service capabilities in decentralized components makes product delivery easier.
Essence: To solve bigger, more practical problems with services that are more specific in function and business.
These knowledge points are my years of experience summed up in the industry, are the current most mainstream technology. Friends who want to learn these techniques can add group: 619881427. The group will share these technical knowledge points for everyone to learn free download
Below is my summary of the technical essentials of microservices:
Read the source code and analyze the source code
Programmers work with code every day. After years of basic education and professional training, most programmers can “write” code, or at least copy and modify code. However, can read the code is not in the majority, can read the code and really understand the source code of some big projects, very few. This strange situation, if you really want to pursue it, can be blamed on the programmer community itself – it is caused by two reasons.
All of our education and training in how to write code that doesn’t teach you how to read the code Most of the work scene is a radish, a pit, we only need to know a local system can work, read irrelevant code, seems to be useless I used to write code and writing the analogy, the two have many similarities; But there are many differences in the process of cultivating code and writing. Our ability to write is based on a great deal of basic reading, which has been accumulated since primary school by reading the works of masters of various levels, plus various writing exercises, in addition to learning grammar and grammar. Our ability to write code, after we understand and master the grammar (learning and copying example code is also part of grammar/grammar learning), bypassing the process of reading a lot of famous works, directly developed automatically: After learning the basic syntax and experimenting with a few examples, we rocketed to the point where we could write our own code and beat the crap out of it. There are three disadvantages to skipping through the heavy code reading phase like this:
The foundation for writing code is shaky, and the process of leveling up monsters is slowest. It’s simple — you have to step in every hole you’ve ever been in, every lesson you’ve ever learned, the slowest way possible. It’s easy to get into the habit of writing code driven on stackOverflow — when you don’t know how to write code, find a ready-made solution on the Internet, copy and paste it with a high price, and make it work. When you encounter a problem while writing code, you turn on debug mode, either set countless breakpoints to track it step by step, or print messages everywhere to try to patch the code full of holes, resulting in a whole code writing process of blood and tears. (See my article: Software Development Patterns you Should Avoid.) The best engineer around you is your best. Here are the most important source systems to know as a programmer:
Four, the use of tools
There are now many libraries, utilities, and programs for Java developers to choose from. The tools listed below are essential tools for programmers
Fifth, performance optimization
Performance optimization, in short, is to make the system run faster and complete specific functions in less time without affecting the correct operation of the system. Performance issues are one of the perennial themes, and optimization is more tricky.
These knowledge points are my years of experience summed up in the industry, are the current most mainstream technology. Friends who want to learn these techniques can add group: 619881427. The group will share these technical knowledge points for everyone to learn free download