Mac OS X(可可)上的CORBA [英] CORBA on Mac OS X (Cocoa)

查看:104
本文介绍了Mac OS X(可可)上的CORBA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在一个最初关注Mac OS X(使用Cocoa)的项目中,正在研究支持分布式模型对象(即,在多台不同计算机上运行的计算模型)的不同方法。据我所知,有可能在 NSProxy 周围使用类集群。但是似乎还存在带有Objective-C支持的CORBA实现。

I am currently looking into different ways to support distributed model objects (that is, a computational model that runs on several different computers) in a project that initially focuses on Mac OS X (using Cocoa). As far as I know there is the possibility to use the class cluster around NSProxy. But there also seem to be implementations of CORBA around with Objective-C support.

稍后,可能还需要支持/包括Windows计算机。在这种情况下,我将需要在Windows端使用类似Gnustep的工具(如果运行良好,则可以选择),或者同时使用两种技术。或手动编写一些内容(当然,这是最不希望的选择)。

At a later time there may be the need to also support/include Windows machines. In that case I would need to use something like Gnustep on the Windows side (which may be an option, if it works well) or come up with a combination of both technologies. Or write something manually (which is, of course, the least desirable option).

我的问题是:


  1. 如果您对两种技术都有经验(可可本机基础结构与CORBA),您能否指出这两种方法的一些关键特性/问题? (编辑:正如我已经在此线程远程方法。另一方面,在任何一个平台上都可以使用CORBA实现,例如 AdORB-适用于Mac OS X和iPhone OS的CORBA ORB 。)

  1. If you have experience with both technologies (Cocoa native infrastructure vs. CORBA) can you point out some key features/issues of either approach? ( As I had already pointed out in this thread remote methods are unavailable for the iPhone and the iPad so far. On the other hand, there are CORBA implementations that work on either platform, e.g. "AdORB - CORBA ORB for Mac OS X and iPhone OS".)

可以按上述方式将Gnustep与可可一起使用吗?
[编辑::根据 Gnustep常见问题解答条目1.1.5 这是不可能的,因此使用可可的本机基础设施使我无法使用该技术。]

Is it possible to use Gnustep with Cocoa in the way explained above? [ According to the Gnustep FAQ entry 1.1.5 this is not possible, so using Cocoa's native infrastructure locks me into this technology.]

是吗?使用Cocoa的技术在所有Mac OS客户端之间进行通信以及通过CORBA与Windows客户端进行通信的可能性(合理可行,即比手动编写网络层更简单)? [编辑:从我现在了解到的情况来看,这是可能的,但肯定不可行。消息必须以两种方式转发,即,一个需要代理才能将消息从一个系统转发到另一个系统,反之亦然。从本质上讲,这等效于手动编写网络层,而没有从 NSProxy 类群集或CORBA中获得任何实际好处。]

Is it possible (and reasonably feasible, that is, simpler than writing a network layer manually) to communicate among all Mac OS clients using Cocoa's technology and with Windows clients through CORBA? [ From what I have learned now this is possible, but certainly not feasible. Messages would have to get forwarded both ways, i.e., one needs a "proxy" for forwarding messages from one system to the other and vice versa. This is essentially equivalent to writing a network layer manually with no practical benefit from either the NSProxy class cluster nor CORBA.]

更新:当考虑灵活性和可扩展性时,CORBA似乎确实是更好的选择。缺点是,学习和最初使用起来似乎更加复杂,请参见此线程(链接由克里斯托弗·约翰逊(Kristopher Johnson)提供,感谢您对实用方面的不同看法。只要通信模式足够简单,Web服务就是一个可行的选择,请参见此线程以获取在iOS上运行良好的选项。我已经在本文中 进行了总结。

UPDATE: CORBA seems to really be a better match when flexibility and extensibility is a concern. The downside is that it seems to be more complex to learn and also use initially, see this thread (link provided by Kristopher Johnson – thanks!) for different perspectives on the practical aspects. Webservices are a viable option as long as the communication pattern is simple enough, see this thread for options that work well on iOS. I have summarized my findings in this article.

推荐答案

在Cocoa中实现分布式对象的最简单方法是分布式对象(或在Mountain Lion上, XPC )。这确实是获得RMI的非常简单的方法(这里是DO的完整示例)。但是,这些协议是专有协议,不能在非Apple平台上使用;虽然GNUstep确实使用DO,并且我已经在跨平台项目中成功使用了它们的实现,但是它们的协议与Apple的协议不兼容。因此,您必须在Mac OS X的 gnu-gnu-gnu 库组合中使用GNUstep而不是Cocoa(我不建议这样做),或者选择不同的方法。

The easiest way to implement distributed objects in Cocoa is with, well, Distributed Objects (or on Mountain Lion, XPC). This really is a very straightforward way to get RMI (here's a full example of DO). However these protocols are proprietary and can't be used with non-Apple platforms; while GNUstep does use DO and I've used their implementation successfully on cross-platform projects, their protocol is not compatible with Apple's. So you'd either have to use GNUstep in its gnu-gnu-gnu library combo on Mac OS X instead of Cocoa (which is not something I'd recommend), or choose a different approach.

CORBA就是这样一种不同的方法。 CORBA和DO之间的主要区别是:

CORBA is one such "different approach". The main differences between CORBA and DO are:


  • 在CORBA中,您使用IDL定义了消息传递接口,该IDL用于生成ObjC。使用DO,您可以直接使用Objective-C。

  • CORBA不支持鸭子输入;它是强类型的,因此在IDL中必须指定要远程使用的每种方法 。这也意味着您使用的任何方法都可以保证在另一端实现(当然,在任何RMI实现中也不能保证另一端可用)。

  • 大多数CORBA的用户群不是基于ObjC(Java和C ++更常见)。

  • CORBA具有更广泛的平台支持。

  • CORBA实现不需要在ObjC中。

  • in CORBA, you define the messaging interface using IDL which is used to generate ObjC. With DO, you use Objective-C directly.
  • CORBA doesn't support "duck typing"; it's strongly typed, so every method you intend to use remotely must be specified in the IDL. This also means that any method you do use is guaranteed to be implemented at the other end (of course the other end isn't guaranteed to be available in any RMI implementation).
  • most of CORBA's user base isn't on ObjC (Java and C++ are more common).
  • CORBA has wider platform support.
  • CORBA implementations don't need to be in ObjC.

这篇关于Mac OS X(可可)上的CORBA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆