【发布时间】:2014-05-15 04:16:15
【问题描述】:
我尝试“http://thrift-tutorial.readthedocs.org/en/latest/usage-example.html”中的示例。这个例子只是计算两个数字的乘积。服务器:Java,客户端:Python。
如果我尝试通过 thrift 获得产品 3000 次,则经过的时间约为 4.8 秒。 如果我在 python 中创建一个简单的函数(乘法)并直接调用它 3000 次,则经过的时间约为 0.007 秒(快 686 倍)。
那么我该如何提高性能呢?我想构建一个应用程序并将其分成一些子应用程序。它们可以用多种语言实现,并且它们将通过 thrift 相互通信,但是由于性能如此糟糕,我应该考虑将它们组合到单独的应用程序中吗?
App-A (Java) App-B (Python)
| |
|------------ App-C (C++) --------|
或
App-A+C (Java) App-B+C (Python)
(implement C in Java) (implement C in Python)
【问题讨论】:
标签: performance architecture thrift thrift-protocol