I. Research on distributed application system
1. Reasons for comprehensive analysis of the target system
Our developers must master their tools when they are developing system development, including related conceptual theory and actual programming tools. More and more advanced mechanisms of operating systems can be used by our use of multi-threaded and explicit dynamic calls; while simultaneous object-oriented methods, language, mode, and middleware technology are also more extensive applications, all of which are We re-examine and correct the traditional methods and techniques we used in distributed network application development.
The system analysis and development implementation is a progressive process, and the process of continuous feedback, it can systematically examine a application area to discover some key challenges in system development and design, which can get a time-tested solution . Usually an application requires consideration of user graphical interface GUI, relational database, network management, operating system, and a variety of different types of object-oriented intermediates. The complete analysis of a field to be developed can bring the following benefits:
1. He can help distinguish and accurately define key abstract object spaces in this field, thereby enabling system developers to communicate and communicate more efficiently. In practice, a clear understanding of problem space (Problem Space can greatly simplify the mapping from problem space to the appropriate mode, mode language, and middleware. "Solution Space).
2. It allows us to consider the considering of general issues and specific considerations for specific applications. Putting attention focuses on the design issues in the system in the field helps to help programmers see the app and develop a reusable class.
2. Distributed application system analysis includes five aspects: protocol and service, communication, server architecture, concurrency, and configurability. Detailed over the details:
Agreement and service
Definition: The protocol is a series of rules that specify control and data information between communication entities. These communication entities may include one or more clients, the server, or interaction between peer entities in a network operating environment. Service, provided by the server, define good service capabilities.
Relationship: The interaction of network services is based on the protocol, and the protocol is the application shielded underlying communication details. The service protocol can be used by one or more services, while they are based on a lower layer of service protocol.
The agreements and services based on our defined agreements and services will bring different impacts to our application development. In a distributed application, developers can consider and select the following protocols and services: this part includes five aspects:
l No connection, connection and request / response protocol
No connection protocol:
Features: Provides a message-oriented service where each message can be sent independently.
No connection protocols are based on the "most effort" principle, whether the message reaches the destination address or whether all arrival destination addresses is not guaranteed.
Example: User DataGram Protocol and IP (Internet Protocol) are typical for connectionless protocols.
Application Principles: These agreements are generally applied to applications that need to be able tolerate a certain degree of message loss, such as Voice-Over-IP and stream video.
Connection agreement:
Features: Provides a reliable, sequential, no replicated service. In order to enhance performance and ensure reliable, the connection protocol exchanges and holds status information between the transmitting end and the receiving end.
Example: Transmission Control Protocol is TCP is a connection-oriented protocol that constitutes the basis of the entire Internet. TCP provides retransmission mechanisms to ensure more reliable data transmission over connectionless IP protocols.
Application Principle: These agreements are particularly suitable for applications that cannot tolerate data loss.
Request / Response Agreement
A reliable, transaction-oriented service is provided, which is processed in the form of single-step lock protection. Request / Response Protocol is typically used to interact with short-term length messages in low-delay environments such as high speed LAN.
l When short-term service short-term service is very short and relatively fixed.
Usually adopted a request response protocol Request / Response protocol or connection protocol such as UDP.
The execution time of the long-term service is longer and it changes. Examples of long-term services include transmitting a large file via FTP or HTTP, accessing remote host resources via Telnet. In order to provide efficiency and reliability, these services are usually implemented based on the connection protocol.
It should be noted that when each customer request, especially frequently frequent requests, the system (time) overhead will make the system (time) overhead and the type of service should be used.
l internal and external services
Internal service: Perform the same address space when the server receives the request
The external service is executed in different processes address space. For example, a primary service distributor process monitors a series of communication ports. When a connection request arrives at the primary server from the client, this distribution process receives the connection and then distributes the new process to handle the request service.
It should be noted that internal services will bring potential instability to the application system. Multiple service functions in a process have not been protected because the system's related shared resources are easy to receive should not be destroyed.
l State service stateless service
There is a status service caches some identified information, such as task status, authentication key, authentication, and I / O handle. These help reduce communication and calculation overhead at the server.
The stateless service does not retain status information for each connection on the server.
It should be noted that there is a state service and stateless service to find a compromise between efficiency and reliability, a good choice depends on many factors such as the possibility of host and network failure. Some universal network applications, such as FTP and Telnet, do not need to keep permanent status information between continuous service calls. These stateless services are usually configured and heavy and reliable. Instead, some services, such as CORBA's Naming Service, manage some bindings that must reserve status information, even if these binding servers have already collapsed.
l Layered / modular service with centralized services
The hierarchical / modular service decomposes the service into a series of services related to hierarchy, exchange control and data messages between layers.
The centralized service is tightly inclusive, and he can separate each service module as a hierarchy, but most of the data is set by sharing and global variables. This system is difficult to understand, maintain and expand. Centralized service is more suitable for prototype systems for those short life cycles.
Selecting two service distribution systems to construct your network application to compromise in efficiency, scalability, and modularization. Select hierarchical / modular design for your service, with the following advantages:
1. The layering enhances the reusability of system components. Because higher levels of application components can share services that use these lower levels
2. Hierarchical services enhance the application to enhance or increase system service functions.
3. The layered / modular architecture is convenient to obtain the performance of the macroscopic level by selecting a choice to remove non-service.
4. Modular design effectively improves the development of network applications, testing, and maintenance efficiency.
At the same time, there are also some shortcomings when applied to web applications:
1. The module-changing modularization is larger than the additional overhead of the system. For example, mismatch in each layer of interactive interface buffer will reduce the efficiency of the system, and may result in additional decomposition assembly or communication delay.
2. Each inter-layer communication must be designed to be reasonably implemented, otherwise it is easy to identify errors.
Related information from each layer makes it very difficult to locate and manage resources in real-time systems and fault-tolerant systems.