开发者

Java COM bridge

I have an ultra-low latency program and n开发者_高级运维eed to interface with a Windows COM component. What would be the fastest way to do this? Using a COM bridge like JACOB or write a native COM library and send out messages using a messaging bus like ZeroMQ?


If you use ZeroMQ, you'll be dealing with two processes. And passing a message from one process to another is more expensive than doing the same within the same process. So using a Java COM bridge will certainly result in a lower latency.

Having said that, it's however only relevant if you're dealing with extermely low latency. If your COM component already has a latency several times higher than inter process message passing (e.g. because it is receiving and forwarding messages over a network or performing expensive computations), then either option will be okay because they both have a marginal effect on the overall latency.

Note that JACOB doesn't support all COM components, only those with a COM automation interface. So you might need to use a different Java COM bridge such as JCom.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜