Detailed Distributed Systems (b) - basic knowledge (Introduction)

  I. Introduction

        Since the introduction of online distributed systems did not have much to explain, so here I want to write a distributed system Detailed, combined springboot the future to build a distributed system is constructed in detail. Willing to keep on writing, addressed himself to share to you, I hope you can put forward valuable suggestions, grow together. Haha. . The first article, but a beginning.

Second, distributed definitions.

  Distributed them to understand it, by the way also introduce clusters, these two concepts and examples on here, so that we more clearly understand and know.

(1) Glossary:

       Distributed Systems: it is a hardware or software components located on different network computers, and passes only the coordination system communicates through a message between one another.

       Distributed: different business modules are deployed on different servers or multiple sub-business spin-off with a service module deployed on different servers, to address the high concurrency problems.
       Cluster: the same service deployment on multiple machines, improve system availability.

(2) Example explain:

            

       Pancakes selling pancakes, selling pancakes required three steps: preparation of raw materials, processing and marketing. A master found that such a day too tired, simply overwhelmed, and thus recruit people prepared raw material B, C recruit people to help processing, so the owner can sell A, B and C, it is then distributed to the A ; later, with the increase in sales, B and C are busy, they found a B1 added to the preparation of raw materials, C1 added to the processing team. Such clusters between B and B1 is that the relationship between C and C1 is the cluster relationship. B team and C team belong distributed relational.

(3) illustrates more clearly (online plundered a)

      

 

 

If you still do not know it? Recommended difference you an article distributed to the cluster.

Third, centralized and distributed systems.

  If the above illustration we already know, then distributed and centralized it appropriate to understand.

        Centralized system: refers to a composition of a host computer or central node, this data set is stored in the central node, and all business units throughout the system has been focused on the deployment of the central node, all of the functionality of the system by which centralized treatment. That is, the centralized system, and each terminal or client responsible only input and output data, and storing the data processing control entirely up to the host to complete.

       Traditional centralized processing model increasingly unable to meet people's needs:

(1) If a centralized system to develop large-scale projects, instead mainframes, take a very expensive money, which is not a small expenditure.

(2) centralized systems run on a single host, the host if this fails, we all have to wait to recover this host. For users, nothing to see it.

(3) the security is not high. If attacked, the loss is greatest.

        Distributed Systems: "Distributed Systems Concepts and Design," a book to introduce a standard distributed system in the absence of specific logic of the situation, it shows features:

(1) Distribution of

       Space random distribution. These computers can be located in different rooms, different cities, even different countries.

(2) Reciprocity

       Distributed computer system without the master / slave distinction, the composition of all the nodes of a distributed system are peers. In a distributed system, one of the most common concept is a copy - copy of the data and copy services. Data refers to the persistent copy of the same data on different nodes, when the data stored on one node is lost, you can copy to read from the data, which is a distributed system to solve the problem of data loss the most effective means. Copy of the service, refers to a plurality of nodes to provide the same service, each node has the ability to receive a request from outside and make corresponding treatment.

(3) concurrency

        With multiple nodes of a distributed system may operate concurrently some shared resources, such as databases or distributed storage.

(4) lack of global clock

       Since between each computer is dependent on the exchange of information to communicate with each other, it is difficult to define the order of two events, the lack of global always control sequences.

(5) a failure will always occur

       Computer organization distributed, are likely to suddenly collapse out at some point. The more points the computer, you may collapse are likely to fall a greater. Abnormal failure if we take into account the design of the program, will also increase the probability of failure.

(6) for single point of failure

       Single point SPoF (Single Point of Failure): a role or function in only one computer support, on the failure of this computer is a single point of failure.

Of course, treatment may be the use of the above stated: cluster.

Fourth, how to design a distributed system.

        It means: how to split a reasonable system into multiple subsystems deployed on different machines.

        The system is split into several subsystems, this means that after the split system necessarily need to communicate with each other via a network connection. So communications stability and security is especially important. As the business grew slowly, scalability, reliability, consistency of data need to be considered.

(1) split into sub-systems. The designer needs a good design, a large-scale system will be split into multiple smaller systems, different levels to maintain.

(2) Design of communication between systems. Here we can use the messaging middleware, open source framework to help us solve this problem. The Apache ActiveMQ, RabbitMQ, Apache RocketMQ, Apache Kafka like.

(3) design of distributed computing. Open source framework apReduce, Apache Hadoop, Apache Spark and so on.

(4) large and distributed data storage. There are Apache HBase, Apache Cassandra, Memcached, Redis, MongoDB and so on.

(5) distributed monitoring control. Commonly used techniques include Nagios, Zabbix, Consul, ZooKeeper like.

        The article carried a distributed system for a general explanation, which in the next article, the article will continue to have a distributed more in-depth explanation and analysis, Basics will be talked about a number of threads, communication, consistency understanding fault tolerance, CPA, etc., after other chapter, also spoke of a distributed system architecture, messaging services. Open source framework for distributed storage are mentioned. Article slowly update. . .

Documents from: https: //blog.csdn.net/mcb520wf/article/details/82456456

Guess you like

Origin www.cnblogs.com/JonaLin/p/11582592.html