南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)18 分布对象 Distributed Objects(2)

Distributed Objects 分布对象(2) Institute of Computer Software 2022-2-27 Nanjing University
分布对象(2) Distributed Objects 2022-2-27 Institute of Computer Software Nanjing University 1

&雪扇 摘要 0o2 UNIVER 2 More about RMI 口J2EE/EJB Institute of Computer Software 2022-2-27 Nanjing University
摘要 More about RMI J2EE/EJB 2022-2-27 Institute of Computer Software Nanjing University 2

&雪扇 摘要 0o2 UNIVER 3 More about RMI 口J2EE/EJB Institute of Computer Software 2022-2-27 Nanjing University
摘要 More about RMI J2EE/EJB 2022-2-27 Institute of Computer Software Nanjing University 3

&扇 RMI UNIVE 口Java语言之内,充分利用这一点! 口Stub可下载! 口可以传“对象”! ▣Garbage Collection! 口传“引用” java.rmi.Remote (RemoteException) Institute of Computer Software 2022-2-27 Nanjing University
RMI Java语言之内,充分利用这一点! Stub可下载! 可以传“对象”! Garbage Collection! 传“引用” java.rmi.Remote (RemoteException) 2022-2-27 Institute of Computer Software Nanjing University 4

Java RMI Server VM Client VM Client Ref obi ↑ Stub obi Skel obi Transport obi Transport obi Name Server VM Stub obi RMIregistry Transport obi Institute of Computer Software 5 2022-2-27 Nanjing University
2022-2-27 Institute of Computer Software Nanjing University 5

102 Some important parts of RMI 6 Stubs: Each remote object class has an associated stub class,which implements the same remote interfaces.An instance of the stub class is needed on each client.Client-side remote invocations are "actually"local invocations on the stub class. Serialization: ▣Arguments and results have to be“marshalled”-converted to a representation that can be sent over the Net.In general this is a non- trivial transformation for Java objects.Serialization is also used for distributing stubs. The Server-side "Run-time System": This is responsible for listening for invocating requests on suitable IP ports,and dispatching them to the proper,local resident,remote object. Institute of Computer Software 2022-2-27 Nanjing University
Some important parts of RMI Stubs: Each remote object class has an associated stub class, which implements the same remote interfaces. An instance of the stub class is needed on each client. Client-side remote invocations are “actually” local invocations on the stub class. Serialization: Arguments and results have to be “marshalled”—converted to a representation that can be sent over the Net. In general this is a nontrivial transformation for Java objects. Serialization is also used for distributing stubs. The Server-side “Run-time System”: This is responsible for listening for invocating requests on suitable IP ports, and dispatching them to the proper, local resident, remote object. 2022-2-27 Institute of Computer Software Nanjing University 6

&扇 RMI Architecture overview RMI Layers Stub/skeleton layer Application Application objects used by client and server RMI Clent RMI Server applications 多 意 Remote reference layer Stubs Skeleton creation/management of remote 意 Remote Remote references Reference Virtual layer connection Reference layer distributed garbage collection 多 多 Transport protocol layer Transport Network Transport layer connection layer ▣binary data protocol By using a layered architecture each layer could be enhanced or replaced without affecting the rest of the system:-transport layer: UDP/IP layer or secure sockets(SSL). Institute of Computer Software 2022-2-27 Nanjing University
RMI Architecture overview RMI Layers Stub/skeleton layer objects used by client and server applications Remote reference layer creation/management of remote references distributed garbage collection Transport protocol layer binary data protocol 2022-2-27 Institute of Computer Software Nanjing University 7 By using a layered architecture each layer could be enhanced or replaced without affecting the rest of the system: → transport layer: UDP/IP layer or secure sockets (SSL)

Remote Reference Layer 8 ▣RemoteRef Interprets and manages references to remote objects. The stub objects use the invoke()method in RemoteRef to forward the method call.The RemoteRef object understands the invocation semantics for remote services. aLeasing for distributed garbage collection Naming/Registry Service--rmiregistry Institute of Computer Software 2022-2-27 Nanjing University
Remote Reference Layer RemoteRef Interprets and manages references to remote objects. The stub objects use the invoke() method in RemoteRef to forward the method call. The RemoteRef object understands the invocation semantics for remote services. Leasing for distributed garbage collection Naming/Registry Service -- rmiregistry 2022-2-27 Institute of Computer Software Nanjing University 8

&扇 Remote Reference Layer 102 UNIVE 9 Invocation Semantics v1.1:unicast point-to-point. v1.2:support for activation of dormant remote service objects: Remote Object Activation RMI will instantiate a dormant object and restore its state from disk. As now:No multicast semantics. Institute of Computer Software 2022-2-27 Nanjing University
2022-2-27 Institute of Computer Software Nanjing University 9 Remote Reference Layer Invocation Semantics v1.1: unicast / point-to-point. v1.2: support for activation of dormant remote service objects: Remote Object Activation RMI will instantiate a dormant object and restore its state from disk. As now: No multicast semantics

&扇 Using RMI 1902 10 1.Define interfaces for remote classes 2.Create and compile implementation of the remote classes 3.Create stub and skeleton classes using the rmic compiler No longer necessary in Java 1.5 because Java 1.5 adds support for the dynamic generation of stub classes at runtime. rmic must still be used to pre-generate stub classes for remote objects that need to support clients running on Java versions 1.4. Institute of Computer Software 2022-2-27 Nanjing University
Using RMI 1. Define interfaces for remote classes 2. Create and compile implementation of the remote classes 3. Create stub and skeleton classes using the rmic compiler No longer necessary in Java 1.5 because Java 1.5 adds support for the dynamic generation of stub classes at runtime. rmic must still be used to pre-generate stub classes for remote objects that need to support clients running on Java versions ≤ 1.4. 2022-2-27 Institute of Computer Software Nanjing University 10
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)17 分布对象 Distributed Objects(1).ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)16 构件化软件 Component Software.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)15 面向方面的编程 Aspect Oriented Programming(AOP).ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)14 模式和框架 Pattern and Framework.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)13 设计模式 Design Patterns(3).ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)12 设计模式 Design Patterns(2).ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)11 设计模式 Design Patterns(1).ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)10 敏捷软件开发 Agile Software Development.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)09 面向对象的分析与设计简介 OOA & OOD:An introduction.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)08 对象序列化和持久化 Serialization and Persistence.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)07 Java并发编程 Concurrent Programming in Java.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)06 并发对象 Concurrent Objects.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)05 异常处理 Exception Handling.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)04 契约式设计 Design by Contract.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)03 类和对象 Class and Object.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)02 抽象数据类型 Abstract Data Types.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)01 Introduction(主讲:余萍).ppt
- 西安石油大学计算机学院:《信息系统分析与设计 Information System Analysis and Design》课程教学资源(PPT课件)第16讲 信息系统应用.ppt
- 西安石油大学计算机学院:《信息系统分析与设计 Information System Analysis and Design》课程教学资源(PPT课件)第15讲 信息系统管理.ppt
- 西安石油大学计算机学院:《信息系统分析与设计 Information System Analysis and Design》课程教学资源(PPT课件)第14讲 实现与测试.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)19 复习和总结 Object-Oriented Technology:Review and Conclusion Remarks.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)实习项目概述.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(实习指南)医院预约挂号系统.docx
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)OOT实习指南.pptx
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)33 O-O programming and Ada.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)06 Abstract data types.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)27 Object-oriented analysis.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)E Bibliography.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)07 The static structure:classes.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)30 Concurrency, distribution, client-server and the Internet.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)11 Design by Contract:building reliable software.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)02 Criteria of object orientation.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)34 Emulating object technology in non-O-O environments.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)36 An object-oriented environment.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)Epilogue, In Full Frankness Exposing the Language.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)12 When the contract is broken:exception handling.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)22 How to find the classes.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)10 Genericity.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)B Genericity versus inheritance.pdf
- 南京大学:《面向对象技术 OOT》课程教学资源(教材电子版)D A glossary of object technology.pdf