您可以使用Thrift作为Cloud Foundry中应用之间的通信方式吗? [英] Can you use Thrift as a method of communication between apps in Cloud Foundry?

查看:80
本文介绍了您可以使用Thrift作为Cloud Foundry中应用之间的通信方式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Cloud Foundry是否支持Thrift在应用之间进行通话?我对此一无所获,似乎REST / HTTP或消息传递是应用程序间通信的首选机制。

Does Cloud Foundry support Thrift for talking between apps? I can't find anything about this and it seems REST/HTTP or messaging are the preferred mechanisms for inter-app communication.

有人尝试使用Thrift提供服务吗?在CF中?是否有充分的理由不支持Thrift;还是有任何计划来支持它?与Thrift相比,我更喜欢Thrift来进行跨语言通信,因为Thrift可以轻松生成API调用中使用的所有客户端类。加上它支持二进制数据传输,因此可能比REST更快。另外,我们已经有了Thrift API:)。

Has anyone tried to offer a service using Thrift in CF? Is there any good reason why Thrift is not supported; or are there any plans to support it? I prefer Thrift to REST for cross-language communication because it's easy in Thrift to generate all the client-side classes used in the API calls. Plus it supports binary data transfer and so is potentially faster than REST. Plus we already have a Thrift API:).

我猜-从理论上讲,一个客户端应用程序可以直接与另一个运行Thrift服务的CF应用程序实例进行对话;但随后您将失去CF当前为HTTP或消息传递提供的负载平衡优势。

I'm guessing that - in theory - a client app could talk directly to another CF app instance running a Thrift service; but then you'd be losing the load-balancing advantages that CF currently provides for HTTP or messaging.

推荐答案

Cloud Foundry < href = http://docs.cloudfoundry.org/concepts/architecture/#routing rel = nofollow>路由器当前仅支持HTTP / HTTPS请求的路由。目前正在努力创建一个TCP路由器,以处理将非HTTP流量路由到在CF上运行的应用程序的问题。

The Cloud Foundry Router currently supports routing of HTTP/HTTPS requests only. There is an effort underway to create a TCP Router to handle routing of non-HTTP traffic to apps running on CF.

有一个视频预览了TCP路由器将提供的一些功能,以及正在孵化的版本如果要通过BOSH部署自己的CF,则包括TCP路由器。

There is a video that previews some of the capabilities the TCP Router will provide, and an incubating release that includes the TCP Router if you are deploying your own CF via BOSH.

cf-dev邮件列表是询问此问题的好地方。

The cf-dev mailing list would be a good place to ask additional questions about this.


从理论上讲,我猜一个客户端应用程序可以直接与另一个运行Thrift服务的CF应用程序实例进行对话

I'm guessing that - in theory - a client app could talk directly to another CF app instance running a Thrift service

这是正确的-在CF上运行的应用程序可以使用任何协议相互通信,只要配置的安全组已打开正确的端口。

This is correct - apps running on CF can talk to each other using any protocol as long as the configured security groups have the proper ports open.

这篇关于您可以使用Thrift作为Cloud Foundry中应用之间的通信方式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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