java CORBA VS Web 服务
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5802548/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
CORBA VS Webservices
提问by Dead Programmer
Why WebServices took advantage over CORBA ?
为什么 WebServices 优于 CORBA?
采纳答案by Martin Ba
While initially CORBA may have been thought to provide what web services provide today, I think I agree that it seems that for this application CORBA has "lost".
虽然最初 CORBA 可能被认为提供了今天 Web 服务所提供的东西,但我认为我同意对于这个应用程序来说 CORBA 似乎已经“失去”了。
However, as an RPC technology that is supported on a wide array of platforms (embedded), works and is tested well from native (C++), and can be used to implement pretty performant data transfer scenarios, I do think that CORBA still has an important niche. It's just got nothing to to with "the web".
但是,作为一种受多种平台(嵌入式)支持的 RPC 技术,在本机 (C++) 上运行并经过良好测试,并且可用于实现高性能的数据传输场景,我确实认为 CORBA 仍然具有重要的利基市场。它只是与“网络”无关。
To directly refer to the question: I like to think that CORBA "lost" because, unlike WebServices, it is not targeted at The Web as it is used today -- As in: Tunneling everything through port 80, running apps 60% in the browser and 40% in a webserver, etc.
直接参考这个问题:我喜欢认为 CORBA“丢失”了,因为与 WebServices 不同,它不像今天使用的那样针对 Web——如:通过端口 80 隧道传输所有内容,在其中运行 60% 的应用程序浏览器和网络服务器中的 40%,等等。
回答by Audrius Meskauskas
I suspect everything started from the firewall issues: CORBA requests are binary, multiple random ports are required for the normal work so CORBA requests and responses used to be blocked by firewalls when these first appeared. HTTP and FTP also use phantom ports, but these protocols were in much more wider use so immediately was obvious that firewalls must be configured to allow them. As a result, developers cannot rely on possibility to have CORBA connection between the server and end user PC and need to use some more firewall friendly approach.
我怀疑一切都是从防火墙问题开始的:CORBA 请求是二进制的,正常工作需要多个随机端口,因此 CORBA 请求和响应在首次出现时被防火墙阻止。HTTP 和 FTP 也使用幻象端口,但这些协议的使用范围要广泛得多,因此很明显,必须配置防火墙以允许它们。因此,开发人员不能依赖于在服务器和最终用户 PC 之间建立 CORBA 连接的可能性,而需要使用一些更适合防火墙的方法。
Firewalls appear much less an issue in communication between the specialized servers than can use separate networks, IP/MAC filtering, specialized firewalls and the like. I think CORBA, same as JDBC, are still used to communicate data between servers.
防火墙在专用服务器之间的通信中似乎不是问题,而是可以使用单独的网络、IP/MAC 过滤、专用防火墙等。我认为 CORBA 和 JDBC 一样,仍然用于服务器之间的数据通信。
It may also be a factor that CORBA messages use aligned fields (to match boundary alignments as they are used in C/C++ data structures). Derived protocols (like Google Protocol buffers) do not send unnecessary bytes just for alignment. Hence they messages are compact and these protocols may be preferred when binary messages and fast pre-generated message parsers are desired. Protocol buffers that appear for me rather similar to CORBA by design (IDL-like compiler, stubs and servants, binary messages, language interoperability) is really far from decline, being internally used in many Google services.
CORBA 消息使用对齐字段(以匹配边界对齐,因为它们在 C/C++ 数据结构中使用)也可能是一个因素。派生协议(如Google Protocol buffers)不会仅仅为了对齐而发送不必要的字节。因此,它们的消息是紧凑的,当需要二进制消息和快速的预生成消息解析器时,这些协议可能是首选。在我看来,在设计上与 CORBA 相当相似的协议缓冲区(类似 IDL 的编译器、存根和仆人、二进制消息、语言互操作性)确实远未减少,在许多 Google 服务内部使用。
While CORBA framework is complex, a "properly done" web service stack is also not exactly trivial, so I do not think that the complexity of the standard has been an issue. Similarly, while the original OMG specification documents may appear horrible, the similar SOAP/WDSL specifications are equally complex, probably it is difficult to document a standard in an easy to read way.
虽然 CORBA 框架很复杂,但“正确完成”的 Web 服务堆栈也不是微不足道的,所以我认为标准的复杂性不是问题。同样,虽然原始的 OMG 规范文档可能看起来很糟糕,但类似的 SOAP/WDSL 规范同样复杂,可能很难以易于阅读的方式记录标准。
CORBA protocols are not proprietary, they have been implemented in Free software many times, including JacORBand also GNU/Classpathimplementations (well, now OpenJDK is also Free).
CORBA 协议不是专有的,它们已经在自由软件中多次实现,包括JacORB和GNU/Classpath实现(好吧,现在 OpenJDK 也是免费的)。
回答by duffymo
I don't think it's a stretch to say that web services have won out in the marketplace. CORBA is a niche at best, and a small one at that.
我认为说 Web 服务在市场上胜出并不夸张。CORBA 充其量只是一个利基市场,而且规模很小。
Web services:
网页服务:
- Simpler, although WS-* can add weight and complexity
- Use HTTP as wire protocol instead of proprietary
- Can tunnel through port 80 in firewall
- Services aren't as complete
- 更简单,虽然 WS-* 会增加重量和复杂性
- 使用 HTTP 作为有线协议而不是专有协议
- 可以通过防火墙中的端口 80 隧道
- 服务不完整
CORBA:
科尔巴:
- Requires ORB to operate
- Proprietary vendors or open source
- May use HTTP, but also use proprietary protocols
- Provide services like naming, directory, transaction, security, etc.
- 需要 ORB 才能运行
- 专有供应商或开源
- 可以使用 HTTP,但也可以使用专有协议
- 提供命名、目录、事务、安全等服务。
回答by Asim Ghaffar
CORBA lost primarily because of two things:
CORBA 的失败主要是因为两件事:
1) lack of good development/testing tools or IDE-plugins 2) See (1) again
1) 缺乏好的开发/测试工具或 IDE 插件 2) 再看 (1)