Research on multi-layer distributed system based on middleware technology

Source: Internet
Author: User

1 Introduction

The information processing of distributed systems is distributed on many computers rather than on a single machine. At present, the general type of distributed system architecture can be divided into two kinds. One is the client/server (c/s) architecture, which provides the user interface to the client, runs the logic processing application, and the server accepts the client SQL statements and queries the database, then returns the query results. c/S structure has brought a lot of convenience to people, but as the business process for the system to put forward higher requirements, it also gradually exposed its client gradually large and server overload of the shortcomings, such as flexible and scalable workflow customization, to ensure data transmission in the network stability and accuracy, The C/s structure is difficult to meet the requirements of high load processing and balance load of peak data.

2 multi-layer distributed architecture

In order to solve the problem of the two-layer C/s distributed architecture, a three-tier or multilayer distributed object architecture is proposed, in which the business logic is separated from the client and moved to the middle tier. As a result, the business logic layer or other application services layer is added between the server and the client. The system becomes a three-tier or multi-tier architecture with a client-side presentation layer, intermediate business logic layer, and database server, as shown in Figure 1: A general model of a multi-tier distributed system architecture. Multi-tier architecture separates customers from resources, reduces server load, avoids the impact of server performance flaws on overall system performance, and multiple tiers of variable structure distributed application processing on more than one server are more scalable and scalable than the two-tier architecture.

In a multi-tier distributed system, different components may be implemented in different languages, and these components may run on different types of processors. Data models, information representations, and communication protocols may be different. Therefore, a multi-tier distributed system requires some kind of software to manage these different parts to ensure that they can communicate and exchange data. Middleware is a software that sits between different distributed components of the system.

Middleware can make application system independent of computer software and hardware platform, set up a standard platform for large distributed application, combine enterprise dispersed system technology, and realize integration of enterprise application software system. Middleware has standard program interfaces and protocols to enable data sharing and interoperability of distributed applications on different hardware and operating system platforms. Middleware in the operating system, the network and the database, the application software, the overall role is to be at their top of the application software to provide a running and development environment, to help users flexible and efficient development and integration of complex application software.

With the combination of distributed technology and object-oriented technology, a large number of models based on distributed object middleware are produced. At present, the main technical standards of distributed system Middleware are: Microsoft com/dcom technology, SUN EJB technology and OMG (Object Management Group) CORBA (Common Object Request Agent architecture) technology represented three kinds of distributed model framework based on middleware technology.

3 EJB Technical Specification

EJB (Enterprise Java Beans) is one of the core technologies of Java EE, and it is the standard for building java-based server-side components. EJB is a component based framework, where each part is a distributed object, can be extended, can also be adapted to use in different applications, greatly facilitate the enterprise application development. EJB is a reusable, highly portable component, not limited to a particular operating system, nor to any particular organization, server solution, middleware, or communication protocol. The EJB component model includes EJB server, container, home interface, Remote interface, etc.

An EJB server is a high-end process or application that manages the EJB container and provides access to system services. The EJB server is actually a collection of various services that support EJB installation, including distributed transaction management, distributed object management, and distributed invocation of these objects, as well as low-level system services.

An EJB container is an abstraction that manages one or more EJB classes and instances. It enables the EJB class to access the required services through the interface defined by the specification. The EJB container manages the lifecycle of Enterprise Bean objects, coordinates distributed transactions, and implements object security.

The remote Interface (Interface) lists the business methods in the EJB class. Ejbobject implements the remote interface, and the method through which the client accesses the EJB instance. The EJB class developer defines the remote interface, and the container developer provides a way to produce the corresponding ejbobject. The client cannot get a reference to the EJB instance and can only get a reference to its Ejbobject instance. When the client invokes a method, Ejbobject receives the request and passes it to the EJB instance, providing the necessary wrapper functionality in the process. The client application uses the Home object to locate, create, and delete instances of the EJB class, invoking the business method in the instance through Ejbobject.

The home interface lists the methods that are defined as, creating, and deleting instances of an EJB class. The home object is the implementation of the home interface. The EJB class developer must define the home interface. The container manufacturer should provide an implementation method that produces a home object from the home interface.

The EJB2.0 specification defines three different enterprise beans, namely session beans, entity beans, and message-driven beans. Session beans are primarily responsible for simulating business processes, implementing business logic, and dealing with business rules and workflows. The session bean is divided into two subclasses, stateless session beans, and stateful session beans. Entity beans represent persistent data and are modeled for commercial data. by persistence, entity beans can be divided into self managed persistent entity beans and container-managed persistence entity beans. Message-driven beans and session beans are similar and carry out business logic in the sense that they can only be invoked by sending messages to these beans, and the asynchronous processing mechanism is implemented. From the point of view of distributed computing, EJB provides the basis of distributed technology and provides the means of communication between objects.

Features of EJB technology: ① portability. Because the EJB specification promulgates a set of explicit contracts between EJB containers and EJB components, this ensures that EJB components are portable on different EJB servers. ② platform Independence. The EJB architecture is completely independent of any particular platform, protocol, and middleware infrastructure. Applications developed on one platform can be ported to another platform without modification, fully realizing the purpose of "writing and running everywhere". ③ simplifies the development, deployment, and access of distributed objects. Developers of EJB distributed objects simply implement the contracts and protocols that are built by the Enterprise Java Bean. This makes the whole development and management simple, greatly reduce the cost of system construction, reduce the development cycle.

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.