Application of Three-layer Architecture Based on CORBAWeb Technology

xiaoxiao2021-03-06  76

1 The problem is proposed in the application system development process, the Client / Server architecture has been widely used. It is characterized by that application logic is usually distributed at both ends of the client and server, and the client issues a data resource access request, and the server side returns the result to the client. However, there is a lot of architectural problems in the Client / Server structure, such as: When the number of clients surges, the performance of the server is greatly attenuated because the load is overweight; once the application needs changes, the client and server application are all applications. Need to make changes, bring great inconvenience to application maintenance and upgrade; a large number of data transfer adds a network load, and the like. With the gradual maturity of distributed object technology, multi-layer distributed application architecture has been applied more and more applications. The application system only has to solve the problem of the Client / Server structure in the application. Under the multilayer architecture, the application can be distributed on different system platforms, and communication with inter-heterogeneous platforms can be implemented by distributed technology. Integrate application systems over distributed systems, which greatly improves system scalability. In multi-layer distributed applications, a layer or multi-layer application service program is added between the client and the server, which is called "Application Server". Developers can put the application's business logic on the intermediate layer application server, separate the application's business logic to the user interface. Provide a simple interface to the user with the premise of ensuring the client function. This means that if you need to modify the application code, you only need to modify the intermediate layer application server without modifying thousands of client applications. This allows developers to focus on the analysis, design and development of application system core business logic, simplifying the development, update, and upgrade of application systems. 2 CORBA Introduction CORBA is an abbreviation for Common Object Request Broker Architecture. It is the result of the development of computer technology. CORBA technology has successfully believes that in addition to solving the "island" problem brought by heterogeneous on multiple system levels. In theory and technology expanded the mode of the client / server, the system has good scalability, making it easy for the development and upgrade of the system to protect the investment. The main contents of the CORBA system include the following parts, (1) object request proxy ORB (Object Request Broker): Responsible for transparency transceiver requests and responses in the distribution environment, which is a constructing distributed object application, in heterogeneous or group environment The basis for realizing inter-application interoperability. (2) Object Services: These services should be independent of the application domain. The main CORBA services include: Naming Service, Event Service, Lifecycle Service, Relationship Service (Transaction Service), etc. These services almost include all aspects of the distribution system and object-oriented systems, each component is very complicated. (3) CommON Facilitites: Provide a set of shared service interfaces to end users, such as system management, combined documents, and email. (4) Application Interfaces: Products that can control their interfaces, corresponding to traditional application layers, the highest layer in the reference model. (5) Domain interfaces: Interfaces provided for application areas. For example, the OMG organization is a specification established by the PDM system.

Corba has its own specific background, which is in the object-oriented technology, and the customer / server mode is generally applied. To shield communication and implementation requirements, inherit existing systems, eliminate "Island" phenomenon of. He makes up for the shortcomings of traditional distribution systems (such as RPC, etc.), with many new features: (1) Introducing agent (Broker) concept. The agent acts as follows: Complete mapping of abstract service requests for the client; automatically discover and find the server; automatically set the route, implement the execution of the server program. (2) The client program is completely separated from the service program. It is very different from traditional customer / server methods, and customers will no longer have direct contacts with the server, but only need to contact the agent, and the customer and server side can easily upgrade. (3) Provide "software bus" mechanism. Any application system can easily integrate into the CORBA system as long as you provide a set of interface specifications defined by the CORBA system. This interface specification is independent of any language and environment. In this way, the customer is applied to the service object to be transparently interacting, and the application software "plug and play" on the "Software Bus". (4) The layered design principles and methods are implemented. The underlying core of the CORBA system is a refined system, various complex systems and applications can be extended and extended by cores. CORBA technology is the result of advanced technology development. It combines object-oriented concepts into distributed calculations, making the CORBA specification into industrial standards for open, customer / server mode, object-oriented distribution calculations. 3 CORBA combined with WWW quickly developed, it is no longer just a browsing tool for hypermedia information to gradually become a front end of transaction processing. Due to the computational technology of distribution objects, in particular CORBA technology, it is unparalleled for improving web computing capabilities, and CORBA is rapidly integrated with WWW technology to generate attractive technical prospects. CORBA is combined with WWW to architectural three-layer architecture. This three-layer architecture is based on distribution object technology, increasing the application layer, separating the client layer and the resource layer, reducing the load of the web server, avoiding the performance of the web server on the entire performance. And have functions such as connection buffer, load balancing, safety management, thereby improving the overall flexibility, scalability, scalability of the web application. In this configuration, the CORBA client program is downloaded from the web server, communicating with the CORBA application object on the application server, calls its specified operation. The CORBA application object first authenticates and interprets the customer's request, according to the content of the customer request, or directly accesses the resource layer database, or interacts with other CORBA objects on the network, complete the customer request. The CORBA-Web System compared to ActiveX, Java RMI (Remote Method Invocation) has obvious advantages. In the combination of CORBA and Web, Java is a good entry point of CORBA combined with Web. The CORBA specification defines the IDL / Java mapping, and the CORBA product provider has developed Java ORB based on the specification. Java ORB not only develops distributed Java applications, but more importantly, it can develop Web's CORBA applications.

Java ORB is the center of CORBA-based Java applications, Java customers, including Applet and Application, issued a request to the local Java ORB through the Pile (STUB) code, local ORB re-uses the server side's Java Orb for IIOP communication, service party orb The requested content calls related skeleton code is implemented by the specified object to complete the request, and returns the request results to the customer according to the original road. As the bridge of the information intermediary, Java ORB is responsible for the generation, encoding, transmission, etc. of the remote object request. 4 Java's CORBA / Web App Implementation Overview When you develop a Java-based CORBA / web application system, first create an IDL description file, and then compile the IDL description file through IDL / Java, generate the corresponding pile and skeleton file. Next, Java implements server side and client program, and then connects the server square program and client program to the skeleton file and the pile, and embed the client program into the HTML page, so that by browser Browse this page, you can call the server partner to apply the object implemented. 5 JBUILDER 4 Enterprise Development CORBA / Web Application Instance Instance Ideas This instance will create a bank account query program. Create an IDL file, execute the IDL2JAVA compiler, generate the skeleton of the server and the corresponding client's pile, then create a server-side Java program and an HTML client program based on the above-generated framework. Example Development Tools Borland JBuilder 4 Enterprise (1) Select the File | New Project menu, create a new project in JBuilder. (2) Modify Project Name to BankTutorial, modify the root path is C: / Sample, click Finish. (3) Select File | New, select Sample Idl on the Enterprise page. (4) Enter BankTutorial.IDL in the File Name box, click OK, will create an example IDL file. Enter the following code in the IDL file: module bank {interface account (); {float balance ();}; interface accountmanger {account open (in string name);};}; (5) right-click BankTutorial in the Project column. IDL file. Select Make to execute the IDL2JAVA compiler. (6) Create a server-side program: Select File | New, select Corba Server Application from Enterprise Pages. (7) Select C: / Sample / BankTutorial / SCR / BankTutorial / BankTutorial.IDL in the IDL File box. Select Generate Visible Application With Monitor to create a monitor interface for the server program. Click OK. The server program is named BankServerApp.java. (8) In specific project development, the CORBA interface server is implemented, and can be added to the BankTutorial.Bank.Server in the Project column. This example does not add any user code. (9) Create a CORBA's HTML client program, select File | New, select HTML CORBA Client from Enterprise Pages.

转载请注明原文地址:https://www.9cbs.com/read-121461.html

New Post(0)