الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

يا عمي حدا بفهم RMI?

مغلق
بدأه ahmad_g في 10 مايو 2005 · 4 رد · 730 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

وين خبراء الجافا؟؟؟؟؟؟؟؟ لليش في منتدى؟

ما حدا عندو فكره عن RMI?

اي حد عندو مقال او كود او اي اشي بخصوص الموضوع!!!!!!!!!!!1

#2

Remote Method Invocation (RMI)

RMI is one of the core Java APIs since version 1.1. It provides a framework for distributed computing. With RMI, separate parts of a single program can exist in multiple Java environments on multiple machines. To the client and server, the program operates much like it is local to their environment and within a single memory space. RMI is one of the fundamental APIs that Enterprise Java Beans are built on.

There are many cases where a distributed environment is beneficial. As applications grow large and complex they are more manageable, more performant, and more robust when they are distributed among multiple machines. Resources can be physically located where they make the most sense. Dedicated machines can be configured optimally to perform specialized operations. Heavy processing can be allocated to the best suited hardware, data processing can be handled by centralized data servers, and web servers can just serve web pages. A large application can distribute the workload and achieve better efficiency and data isolation. RMI is a proven framework to design and implement a distributed application in a Java environment. Due to the multi-platform nature of Java, RMI is probably the best choice of API for this type of application.

The client is defined as the application which uses a remote object, and the server is defined as the machine which hosts the remote object. Communication is two way. Below is the standard simple diagram showing the relationship.

To both the client and server, the application appears to be local even though it is actually distributed among multiple Java environments. This is achieved by implementing interfaces which define the methods which can be invoked. The interfaces define the contract between the objects. What is actually passed back and forth are primitive data types (passed by value), remote references (objects which implement java.Remote), or copies of local objects (objects which implement java.io.Serializable). As one would expect, changes to the remote reference results in changes to the object; changes to the copy do not.

Remote objects are listed in the rmiregistry of the server. A client will qurey the rmiregistry for an object by its handle and will receive a reference to the remote object. The client then invokes methods on the remote object. What actually is happeining is that the client is invoking methods locally on the stub which carries out the interaction. Likewise on the server side, the server interacts with the skeleton. The operations of the Remote Reference Layer and the Transport Layer are hidden from both sides. This allows different implementations of the Java Virtual Machine, which may be on different platforms, to integrate seamlessly.

RMI_Example.zip

تم تعديل هذه المشاركة بواسطة HERO2005 في 11 مايو 2005 في 00:53

#3

السلام عليكم

عندك مشكلة في RMI قولها و أنا أحاول أساعدك

#4

تسلم يا اخي بس اذا عندك كود بسيط لكيفية عمل RMI الرجاء الرد

#5

تسلم مل كنت منتبه انه يوجد كود

مشكور يا اخ

هذا الموضوع مغلق.

مواضيع مشابهة