分布对象技术要解决的基本问题.

上传人:wm****3 文档编号:47262551 上传时间:2018-07-01 格式:PDF 页数:41 大小:524.82KB
返回 下载 相关 举报
分布对象技术要解决的基本问题._第1页
第1页 / 共41页
分布对象技术要解决的基本问题._第2页
第2页 / 共41页
分布对象技术要解决的基本问题._第3页
第3页 / 共41页
分布对象技术要解决的基本问题._第4页
第4页 / 共41页
分布对象技术要解决的基本问题._第5页
第5页 / 共41页
点击查看更多>>
资源描述

《分布对象技术要解决的基本问题.》由会员分享,可在线阅读,更多相关《分布对象技术要解决的基本问题.(41页珍藏版)》请在金锄头文库上搜索。

1、1?Introduction ?Communication between distributed objects ?Remote procedure call ?Events and notifications ?Java RMI case study ?SummaryChapter 5: Distributed objects and remote invocationN层客户层客户/服务器模型服务器模型.应用程序对象应用程序对象应用程序对象分布对象技术要解决的基本问题分布式系统的客户应用程序对象应用程序对象应用程序对象分布对象技术要解决的基本问题分布式系统的客户/服务器模型服务器模型2分

2、布对象技术要解决的基本问题分布对象技术要解决的基本问题问题案例一:如何综合越来越多的数据库资源,以适应 不断发展的业务逻辑客户OracleSybaseInformix如何加入综合多个数据库的业务逻辑?如何加入综合多个数据库的业务逻辑? 如何集成其它非数据库操作的业务逻辑?如何处理如何集成其它非数据库操作的业务逻辑?如何处理“肥客户肥客户”应用问题?如何处理用户界面风格多样性? 应用问题?如何处理用户界面风格多样性?B机A机就是支持访问异地对象同一地址空间C+编译器完成连接C+Main ProgramC+ Object分布对象技术要解决的问题分布对象技术要解决的基本问题分布对象技术要解决的基本问

3、题3分布对象技术要解决的基本问题分布对象技术要解决的基本问题一个应用逻辑一个应用逻辑A机对象对象对象对象机对象对象对象对象JavaA机机一个应用逻辑一个应用逻辑对象对象对象对象对象对象对象对象 D机机C机机B机机JavaVBC+VB就是支持访问异构对象C+Main ProgramObject AObject AObject AAgent 1Agent 2网 络 计 算 环 境A的代理对象适配器ORB?对象请求代理对象请求代理-支持客户访问异地分布对 象的核心机制称为对象请求代理支持客户访问异地分布对 象的核心机制称为对象请求代理 ORB(Object Request Broker)分布对象技术

4、要解决的基本问题分布对象技术要解决的基本问题4分布对象技术分布对象技术-基本工作原理基本工作原理客户客户应用逻辑应用逻辑分布对象 代理分布对象 代理服务器服务器对象请求分发器对象请求分发器分布对象的实现分布对象的实现对象请求适配器对象请求适配器对象请求感知器对象请求感知器网络传输访问网络传输访问?ORB服务 器构 造构 架服务 器构 造构 架客户 构造 构架客户 构造 构架?相同的接口相同的接口相同的接口相同的接口?分布对象技术要解决的基本问题分布对象技术要解决的基本问题汇编语言单机应用开发环境分布式应用开发环境Socket APIFortran语言OOP语言软构件技术RPC分布对象技术5?R

5、emote procedure call (RPC) ? call procedure in separate process ?Remote method invocation (RMI) ? extension of local method invocation in OO model ? invoke the methods of an object of another process ?Event-based model ? Register interested events of other objects ? Receive notification of the event

6、s at other objectsDistributed programming model?Applies to all of the following: ? networks ?Internet protocols mask the differences between networks ? computer hardware ?e.g. data types such as integers can be represented differently ? operating systems ?e.g. the API to IP differs from one OS to an

7、other ? programming languages ?data structures (arrays, records) can be represented differently ? implementations by different developers ?they need agreed standards so as to be able to interwork ?Middleware provides a programming abstraction and masks the heterogeneity of networks etc.6?Middleware

8、layer ? Software that provides a programming model above the basic building blocks of processes and message passing is called middleware. ?Characteristics of Middleware ? Location transparency ? Communication protocols ? Computer hardware ? Operating systems ? Programming languagesMiddleware?Interfa

9、ce ? The interface of a module specifies accessible procedures and variables that can be accessed from other modules ? Inner alteration wont affect the user of the interface ?Interface in distributed system ? Cant access variables directly ? Input argument and output argument ? Pointers cant be pass

10、ed as arguments or returned resultsInterfaces7?RPCs Service interface ? specification of the procedures of the server, defining the types of the input and output arguments of each procedure ?RMIs Remote interface ? Specification of the methods of an object that are available for objects in other pro

11、cesses, defining the types of them. ? may pass objects or remote object references as arguments or returned resultInterface cases?Interface definition languages ? program language, e.g. Java RMI ? Interface definition languages (IDLs), are designed to allow objects implemented in different languages

12、 to invoke one another. ?e.g. CORBA IDL (n1), DCE IDL and DCOM IDLInterface cases8CORBA IDL example?Remote interface: ?specifies the methods of an object available for remote invocation ?an interface definition language (or IDL) is used to specify remote interfaces. E.g. the above in CORBA IDL. ?Jav

13、a RMI would have a class for Person, but CORBA has a structstruct Person string name; string place; long year; ; interface PersonList readonly attribute string listname; void addPerson(in Person p) ; void getPerson(in string name, out Person p); long number(); ;parameters are in, out or inoutremote

14、interfaceremote interface defines methods for RMICORBA has a struct?Introduction ?Communication between distributed objects ?Remote procedure call ?Events and notifications ?Java RMI case study ?SummaryChapter 5: Distributed objects and remote invocation9?The object model ?Distributed objects ?The d

15、istributed object model ?Design issues ?Implementation ?Distributed garbage collectionCommunication between distributed objects?Object references ?they may, for example, be assigned to variables, passed at arguments and returned as results ?Interfaces ?Actions ?An action is initiated by an object in

16、voking a method in another object. ?Two effects: 1) the state of the receiver may be changed, and 2) further invocations on methods in other objects may take place ?Exceptions ?Garbage collectionThe object model10?The state of an object consists of the values of its instance variables. ? In the object-based paradigm the state of a program is partitioned into separate parts, each of which is associated with an object. ?Ad

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 生活休闲 > 社会民生

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号