Object Request Broker(对象请求代理):Ice, WCF and Java RMI

文本内容是节选自
Choosing Middleware: Why Performance and Scalability do (and do not) Matter
by Michi Henning, Chief Scientist, ZeroC, Inc.
文章的作者也是<基于C++ CORBA高级编程(Advanced CORBA(R) Programming with C++)>的作者



测试环境
Dual-core 2.2GHz Athlon with 2GB of memory running Windows XP Professional SP3.
Dual-core 2.0GHz Mac Mini with 2GB of memory running Windows Vista Ultimate SP1.

 

编译器
C++ Visual Studio 2008
C# Visual Studio 2008,.NET version 3.5
Java 1.6.0 JDK

编译使用速度优化,对于vista 生成64位代码。ICE 版本 3.30


Latency
延迟是评估中间件的一个重要的因素, 他被定义为由客户端调用服务器,然后接受到结果的时间。最小延迟被定义为函数o(没有输入参数,没有返回值)的调用返回时间。

source code

ICE
interface Latency{
 void o(); // Shortest possible operation name
};

WCF
[System.ServiceModel.ServiceContract]
interface Latency {
 [System.ServiceModel.OperationContract] void o();
}


RMI
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface Latency extends Remote {
 void o() throws RemoteException;
}

 

测试结果

Requests/second

 

Ice for .NET

Ice for Java

Ice for C++

WCF binary

WCF SOAP

RMI

Loopback

6,900

8,000

10,500

~6,900

~2,300

10,600

Gigabit network

2,300

2,300

2,300

~2,190

~560

2,220

 

Throughput
评估中间件的另一个重要因素是throughput,他是指中间件每秒能传输多少数据。

source code

ICE
sequence<byte> ByteSeq;
interface Throughput {
 void sendByteSeq(ByteSeq b);
 ByteSeq recvByteSeq();
};

 

WCF
[ServiceContract]
interface Test {
 [OperationContract]
 void sendByteSeq(byte[] seq);

 [OperationContract]
 byte[] recvByteSeq();
}


RMI
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface Throughput extends Remote {
 int ByteSeqSize = 500000;
 
 void sendByteSeq(byte[] seq) throws RemoteException;
 byte[] recvByteSeq() throws RemoteException;
}

 

测试结果 

Throughput  loopback

Ice for .NET

Ice for Java

Ice for C++

WCF binary

WCF SOAP

RMI

Byte seq (send)

630Mbit/s

800Mbit/s

1,200Mbit/s

515Mbit/s

144Mbit/s

825Mbit/s

Byte seq (recv)

610Mbit/s

720Mbit/s

960Mbit/s

550Mbit/s

165Mbit/s

800Mbit/s

 

Throughput  Gigabit network

Ice for .NET

Ice for Java

Ice for C++

WCF binary

WCF SOAP

RMI

Byte seq (send)

520Mbit/s

660Mbit/s

740Mbit/s

425Mbit/s

140Mbit/s

283Mbit/s

Byte seq (recv)

410Mbit/s

590Mbit/s

655Mbit/s

370Mbit/s

130Mbit/s

280Mbit/s

 

转载于:https://www.cnblogs.com/slime/archive/2009/11/11/1600604.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值