[Notes for Distributed Computing Environment] 1 Basic Concepts and Development History

Source: Internet
Author: User

Author: gnuhpc
Source: http://www.cnblogs.com/gnuhpc/

1. Distributed System Basics

A. Concept: develop, deploy, manage, and maintain a distributed application system with resource sharing and collaboration as the main application target.

B. features:

  • Contains any number of system processes and user processes
  • Modular architecture, which consists of a variable number of processing components
  • Communication is performed through message transmission in the shared communication structure. There is a delay in message transmission between processes and the delay time is variable.
  • Implement a system-wide control to provide dynamic inter-process cooperation and runtime Management
  • Different systems have different levels of control

C. features:

  • Resource Sharing: once authorized, you can access any resources in the environment, such as hardware, software, and data. Related Technologies such as: provide a naming mechanism.
  • Openness: New shared resources are added and used by various customer programs, supporting the addition and use of heterogeneous resources. Related Technologies: provides a unified communication mechanism, releases interfaces for accessing shared resources, and Virtualization Technologies.
  • Concurrency: Each component can be executed in a concurrent process, and each process can access and update shared resources concurrently. Related Technologies: concurrency control.
  • Scalability: when resources and users increase, the system performance remains the same. As resources and users grow, the system performance remains the same.
  • Fault Tolerance: the ability of the system to continue working when an error occurs. Related Technologies: recovery-rollback and redundancy.
  • Transparency: the network environment should be a whole for users and applications, rather than a simple set of components for mutual collaboration.

D. Advantages:

  • Connect different organizations or groups
  • Improve system collaboration through interconnection and interoperability
  • Improve system performance through parallel processing and load balancing
  • Improve system reliability and availability through replication technology
  • Improve system scalability through Modular Technology
  • Improve system scalability through dynamic configuration and Reconfiguration
  • Improve system performance and price ratio through Resource Sharing

E. (potential) problems:

  • Software requirements: suitable operating systems, distributed computing environments, programming languages, and Application Design Methods
  • Communication Network: information loss, recovery, network overload...
  • Security Questions: Data Sharing vs data confidentiality

 

2. Distributed Computing Basics

A. Concept: Distributed Computing shares information and works collaboratively with two or more software. These software can run on the same computer or on several different machines connected over the network. There are two typical application approaches: one is to regard distributed software systems as a direct reflection of the distribution in the real world, and the other is to improve the running performance of some applications. Distributed computing technology is the basis for building Distributed Systems

B. Differences from parallel computing:

The biggest difference is that the purpose of parallel computing is to use a variety of computing resources to solve computing problems at the same time, the main purpose is to be able to complete the task faster, this requires that multiple subtasks run at the same time, supporting technologies such as task division, load balancing, simple lightweight communication protocols, zero copy, high-speed communication devices, parallel file systems, parallel algorithms, and so on. Distributed computing applications are different. For example, applications are distributed in nature (banking systems, remote monitoring ...) The requirements for traffic, computing, time, and security are different from those for parallel computing.

  • Parallel Computing highlights the synchronization of time: simultaneous computing
  • Distributed Computing highlights the spatial distribution: computing is performed in different locations.
  • Distributed Computing is also parallel computing in many cases: parallel computing is performed at the same time in different locations of the network, and there is a crossover technology between the two, such as a single system image, fault tolerance, and network technology .... Distributed systems can also be used for coarse-grained parallel computing.

C. Basic Mode:

C-S mode and P2P mode.

Two-tier CS mode Vs three-tier CS Mode

Advantages of Layer 3:

  • More reasonable assignment of tasks, clear layers, simple management and maintenance.
  • Turn "Fat customers" into "thin" customers. The client only needs to focus on human-machine interfaces. Ghost's browser is purely "thin" customer, also called the B/S mode.
  • The intermediate business logic layer contains a large number of business logic rules (shared by users) that can be called by client programs, which can be changed as the specific business changes, greatly improving the scalability of the system, the business logic processing of the middle layer is closely integrated with the business data of the data layer, which can improve the system performance.
  • The data service layer provides a variety of database operations to improve system security.
  • A large number of Middle-layer middleware Platforms provide a wide range of system-level services, allowing developers to develop more complex, reliable, and efficient software systems with less workload.

Multi-layer structure:

Multi-layer architecture requires more complex infrastructure for cross-network communication. The corresponding distributed computing environment is supported.

D. Technical basis:

  • Network Application Programming Interface (socket ):

Provides the basic mechanism for communication between two processes on different computers. Connection-oriented and connectionless.

  • Remote Procedure Call (RPC)

Basic concepts:Speaking of something familiar, NFS, which I used for Embedded Development earlier, is based on rpc. We use the following two figures for remote and local comparison:

On the left side is the local process calling LPC: a traditional program consists of one or more processes. They are usually arranged according to a call level.

On the right side is Remote Procedure Call RPC: it uses the same abstraction as the traditional process, but it allows the boundaries of a process to span two computers. It uses the same abstraction as a traditional process, but it allows the boundaries of a process to span two computers.

Basic mechanism:

Client:

1) send a message (in the form of a message package) to the remote server;

2) wait until the server receives a response to the request;

3) once the execution result is returned from the server, the subsequent program will be executed.

Server:

1) Listening status, waiting for the client to send a process call message;

2) Once a process call message is received, the server extracts and analyzes the parameter and then executes the requested process;

3) Send the execution result back to the client in the form of a message package.

The role of stub is described as follows:

1) The caller calls a process in the local stub (starts a remote process call request ).

2) In this stub process, relevant parameters are assembled into a message package or a group of message packages to form a message. the IP address of the remote site that runs the execution process and the ID of the process that executes the process are also included in this message.

3) send the message to the corresponding RPC Runtime subroutine, which sends the message to a remote site.

4) when this message is received, the server-side RPC Runtime subroutine references a sub-program in stub corresponding to the caller and asks it to process the message.

5) the subprogram in stub corresponding to the caller unloads the message, parses related parameters, and executes the specified process in local call mode.

6) return the call result. The caller's Stub subprogram executes the Return Statement and returns it to the user. The entire RPC process ends.

Problems to be Solved during design:When you call a remote process, a common method to locate a remote location is to manage a table by the system. The table item content is the node address + the name of the remote process running on the node. Second, the two related sites must be able to work collaboratively. All these work is transparent to users and will be executed in sequence.

  • Object-oriented Remote Method Invocation (RMI ):

Basic concepts:RMI is a group of Java APIs that support the development of distributed applications. To put it simply, the method calls of the original program in the same operating system become the method calls of programs between different operating systems. RMI defines remote objects using Java interfaces. It integrates Java serialization and Java remote method protocol, which greatly enhances Java's ability to develop distributed applications, the object-oriented technology can be fully, thoroughly, and conveniently implemented in a heterogeneous network environment, effectively controlling the complexity of system development, management, and maintenance.

Basic Ideas:To raise the programming level from process calling to object calling, it essentially imitates RPC technology, but it does not have the concept of object reference. Core Concept: Distribution transparency.

Architecture and working principles:

  • The client initiates a request and transfers the request to the stub class of the RMI client;
  • Stub class serializes the requested interfaces, methods, parameters, and other information;
  • Transmits serialized streams to the server based on socket;
  • The server receives the stream and forwards it to the corresponding Skelton class;
  • The Skelton class deserializes request information and calls the actual processing class;
  • After processing, the processing class returns the result to the Skelton class;
  • The Skelton class serializes the result and sends it to the stub of the client through socket;
  • Stub deserializes the received stream and returns the deserialized Java object to the caller.

 

Composition:

  • Remote Service Interface Definition
  • Implementation of remote service interfaces
  • Pile (stub) and frame (skeleton) files
  • A server running remote services
  • An RMI naming service that allows the client to discover this remote service
  • File provider (an HTTP or FTP Server)
  • A client program that requires this remote service

Typical Example:

  • CORBA: Common Object Request Broker Architecture
  • DCOM: Distributed Component Object Model
  • EJB: Enterprise Java Bean

 

3. Distributed Computing Environment

A. concept: the distributed computing environment is actually a distributed system. It is an effective means of sharing and interoperability resources between different software and hardware platforms in the network environment, making distributed computing easier to implement, this allows the distributed system to be easily designed, implemented, deployed, and maintained.

B. Technical Route evolution:

The ideal technical route (a common goal pursued by academic circles in 1980s): attempts to deploy a new distributed operating system on the interconnected computer hardware to comprehensively manage the independent computers in the system, presents a Single System View to users.

Realistic technical route (a common line in the industry in 1990s): deploy a distributed computing environment on the network computing platform, provide development tools and public services, and support distributed applications, resource sharing, and collaborative work.

A hot research topic at present: Based on Virtualization Technology

Virtual resources: computers, storage, data and information, equipment, applications and services-grid computing, virtual computing environment ivce, cloud computing ......

C. Common services:

  • Naming Service (naming): In a distributed system, Naming Service provides a mechanism for locating distributed objects.
  • Monitoring: The Monitoring Service can not only monitor the running status of the system, but also issue a warning when the operator is required to participate.
  • License: The License Service is used to confirm that users of the distributed system have purchased an appropriate license.
  • Persistence: the persistence service provides a unified mechanism for distributed objects to save, update, and restore their statuses through persistent data storage.
  • Security: The Security Service ensures that communication between distributed objects is secure, and confirms that users have appropriate permissions.
  • Transaction: the transaction service can ensure that a transaction is completely completed or abandoned. In an enterprise system, Transactions define atomic units that work. Distributed Transaction processing is a single unit of work that spans multiple computers.
  • Messaging: The Message Processing Service provides an asynchronous programming mode. Asynchronous mode is required in many applications.
  • Distributed garbage collection: when a program no longer uses distributed objects, the distributed garbage collection service automatically releases the storage units occupied by distributed objects.
  • Resource Management: In general, resource managers manage distributed objects in a way that maximizes scalability. This allows a large number of client programs to interact with distributed objects in a short time.

 

Author: gnuhpc
Source: http://www.cnblogs.com/gnuhpc/

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.