Current location - Education and Training Encyclopedia - Graduation thesis - Ask for a paper about JAVA
Ask for a paper about JAVA
Label: graduation thesis computer calls RMI method based on remote object.

Which buddy has a computer graduation thesis? It's based on java, it's urgent, thank you! Using RMI to develop Java-based enterprise distributed applications, our station also provides more free computer papers, but the free papers are for reference only, and users are advised not to use them easily after downloading. Because Java has extensive and powerful functions such as cross-platform, code portability, security and high efficiency, we can use our own mechanism to realize distributed computing when developing network distributed applications, and a remote method call (RMI) based on Java provides an effective solution for us to develop enterprise-level distributed applications.

Keywords Java RMI enterprise distributed application

1 overview

With the deepening and development of information construction in electric power enterprises, the exchange of information and data within and between enterprises has greatly increased, and these information and data need to be transmitted and exchanged between different computer networks more and more. At the same time, because the existing computer network hardware equipment and operating systems of various units and departments are very different, the application level is also uneven. Therefore, it is particularly important to develop cross-platform, portable, efficient and secure network distributed applications to serve power enterprises.

In today's programming terminology, distributed computing has become a very common word. It distributes the business data and programs of enterprises in different physical locations on the network, and exerts the function of remote data calling by mobilizing the processing power of multiple computers on the network.

Remote method call (RMI) can realize object-to-object communication between different Java virtual machines (JVMs). The JVM can be located on the same or different computers. Among multiple JVMs, one JVM can call methods of objects stored in other JVMs.

This paper mainly introduces the characteristics of RMI, analyzes the principle of applying RMI to enterprise distributed computing, and the concrete steps of realizing enterprise distributed application based on Java by using RMI. 2 the characteristics of remote method call (RMI)

2. Disadvantages of1TCP programming

Since the Java programming language was designed to be object-oriented and support the network from the beginning, the object-based RMI mechanism was built into the Java platform.

We often use TCP/IP programming in network development, so Socket programming will naturally involve it. However, programming with Socket requires a lot of repeated coding, which is very troublesome and error-prone in complex distributed operations. Therefore, how to conduct network distributed computing quickly, efficiently, safely and expansively is the theme that developers have been pursuing and advocating. It was not until the appearance of RMI that this complicated and inefficient development situation was greatly improved. 2.2 the characteristics of RMI programming

When we use object serialization to distribute objects on the network, RMI provides a unique and powerful e-commerce database that is unmatched by non-Java platforms. In the large-scale distributed computing model of %267'$#7'455, RMI mainly has the following characteristics:

A client can call a method on a remote server just like a local method;

The client/server programming contract can be specified according to the interface;

You can automatically generate the transfer/anti-transfer code from the default binary file of the server object;

Extending the Java programming model to machine boundaries (beyond the boundaries of the Java Virtual Machine (JVM)) does not require any special syntax;

Behavior (code) can also be transmitted simultaneously with data in remote method calls.

Although RMI is not the only enterprise-level remote object access scheme, it is the easiest to implement. 2.3 RMI and CORBA

As a specification of distributed application framework, COBRA bears the brunt, which was developed by object management group (OMG). Different from CORBA, CORBA can use different programming languages (such as C/C++, Basic, etc. ) to develop and implement distributed applications, and RMI is a pure Java solution. In RMI, all parts of the program are written in Java language, so the program developed in this way fully conforms to the Java specification and is convenient for cross-platform access, expansion and transplantation. According to the situation of Northwest Electric Power Construction Group Company where the author works, the server operating systems mainly include Linux and Windows2000 Server, which exist in the company and departments respectively and are different system platforms. At the same time, the engineering project departments under the company are far away, ranging from tens of kilometers to thousands of kilometers or even located abroad, so cross-platform and remote access must be considered when developing enterprise application systems, and RMI can meet the programming requirements with its own characteristics. Brief introduction of 3 RMI basic architecture

RMI uses Socket internally through TCP/IP. As the name implies, Socket can help us find and execute methods of remote objects. The purpose of RMI is to make objects located in different JVMs look and behave like local objects.

Usually, we call the JVM that calls this remote object the client; The JVM that contains such remote objects is called a server.

Although references to remote objects are different from references to local objects, we can use remote objects as local objects. The application does not know whether the object is remote or local. In fact, methods called on remote objects have the same syntax structure as methods called on local objects.

As the bottom layer of RMI (including complex socket operations), it will automatically intercept method calls, find remote objects, and then handle remote requests. The author believes that the importance of RMI design lies not only in realizing the remote access function in the design, but also in realizing the transparency of the design.

The basic architecture of RMI consists of three abstract layers: 3. 1 stub/skeleton layer.