gpt4 book ai didi

corba - 仆人和对象 - 关系

转载 作者:行者123 更新时间:2023-12-01 10:21:57 31 4
gpt4 key购买 nike

我读了很多关于 ICE 或 Corba 等技术中使用的仆人和对象的文章。有很多资源我可以读到这样的东西:

一个仆人可以处理多个对象(为了节省资源)。
一个对象可以由多个仆人处理(为了可靠性)。

有人可以告诉我这两个陈述的真实例子吗?

最佳答案

如果我没记错的话,这个术语是 Douglas Schmidt 在他描述通用对象请求架构的论文中创造的。

这是几个定义的直接引用:

  • 注意:为清楚起见,请参见下图

  • Object -- This is a CORBA programming entity that consists of an identity, an interface, and an implementation, which is known as a Servant.

    Servant -- This is an implementation programming language entity that defines the operations that support a CORBA IDL interface. Servants can be written in a variety of languages, including C, C++, Java, Smalltalk, and Ada.

    CORBA IDL stubs and skeletons -- CORBA IDL stubs and skeletons serve as the ``glue'' between the client and server applications, respectively, and the ORB

    ORB Interface -- An ORB is a logical entity that may be implemented in various ways (such as one or more processes or a set of libraries). To decouple applications from implementation details, the CORBA specification defines an abstract interface for an ORB. This interface provides various helper functions such as converting object references to strings and vice versa, and creating argument lists for requests made through the dynamic invocation interface described below.



    CORBA

    The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms. CORBA enables collaboration between systems on different operating systems, programming languages, and computing hardware



    因此,有客户端、服务器、客户端和服务器代理以及 ORB 核心。客户端和服务器使用代理通过 ORB 核心进行通信,它提供了一种将客户端请求透明地传送到目标对象实现的机制。从客户端的角度来看,这使得对远程对象的调用看起来像是在本地地址空间中的对象,因此简化了分布式环境中客户端的设计。

    综上所述,Servant 是一种实现,它是远程客户端调用的调用目标,并且正在抽象作为实际目标的远程对象。

    至于您的问题,一个仆人可以处理对由仆人封装的多个分布式对象的调用。请注意,客户端不会直接访问这些对象,而是通过 Servant 访问。

    enter image description here

    关于corba - 仆人和对象 - 关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31173392/

    31 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com