Distributed Application in Java (i) Distributed introduction

Source: Internet
Author: User
Tags unique id
Distributed Concepts

To understand a distributed system, the main need to understand the 2 aspects:

1. A distributed system must be a system composed of multiple nodes.
Among them, the node refers to the computer server, and these nodes are generally not isolated, but interoperability.
2. These connected nodes have our nodes deployed, and there is synergy between the operations.

Distributed systems for users, they are faced with a server that provides the services that a user needs, and in fact these services are a distributed system made up of numerous servers behind them, so the distributed system looks like a supercomputer.

For example, Taobao, usually everyone will use, it itself is a distributed system, we access Taobao station through the browser, the request behind is a huge distributed system in providing services for us, the whole system is responsible for the request processing, and some responsible for storage, and some are responsible for the calculation, Eventually they coordinate to return and present the final results to the user.


Distributed Database AccessWith the Web site more and more traffic, the data volume is more and more, the system to the various operations of the database more and more frequent, resulting in a single database server more and more slowly, the database pressure is increasing, then the need for the database layer optimization, at present can be done from several aspects: 1. Optimization See if there is any undue pressure on the database (application optimization).      This decompression effect is relatively small. 2. To see if there is a cache, search engine and other middleware to test the database.     This has a great effect on local data decompression, but it does not have much effect on the whole. 3. The final idea is to transfer the database data and access to multiple databases, separate support, which is also the best way to reduce stress, the following is mainly introduced this way:
1.2 ways to divide data and the impactA. Vertical split vertical split is to divide the data of different business units in a database into different databases. For example, the user-related information into a library, order first off the data into another library, the cost-related information into another database and so on, this by dividing the different library is the way the data vertical division. Impact: (1) The assurance of the transaction acid characteristics of a single machine is broken. Data to multiple machines, the original in a single machine through the transaction of the processing logic will receive a great impact. The choice we face is either to abandon the original stand-alone transaction and modify the implementation.      Or you can introduce a distributed transaction mechanism.      (2) Some of the table operations will become more difficult, because the data may be in different databases, so it is not easy to use the database itself join, need to apply or other ways to solve. (3) Depending on the foreign key to the constraint of the scene will be affected.
B. Horizontal split horizontal splitting is the separation of data from the same business unit into multiple databases according to certain rules. That is, for example, an order-related library is deployed to multiple servers, the table structure of the order library in each server is exactly the same, but the data in the order library in different servers holds different order-related data.      Impact: 1. Also has three kinds of effects with vertical partitioning.      2. Generating a unique ID for a self-added sequence of dependent libraries is affected.      3. Queries against tables in a single logical sense are queried across the library. All in all, these 2 ways are to split the data in the original database into a different database, so the original stand-alone database can support features that are not now supported. And the impact of the database split on the application is still more obvious, here is just a few parts, such as stored procedures, triggers, etc. need to rewrite to complete the corresponding work. 2. The impact of data splitting and corresponding solutions......












Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.