Communication Between Microservices

烈酒焚心 提交于 2019-12-04 07:26:37

Also, I have been doing some reading on how Apache Thrift and RPC's can help with this. Can anyone elaborate on that as well?

The goal of an RPC framework like Apache Thrift is

  • to significantly reduce the manual programming overhead
  • to provide efficient serialization and transport mechanisms
  • across all kinds of programming languages and platforms

In other words, this allows you to send your data as a very compactly written and compressed packet over the wire, while most of the efforts required to achieve this are provided by the framework.

Apache Thrift provides you with a pluggable transport/protocol stack that can quickly be adapted by plugging in different

  • transports (Sockets, HTTP, pipes, streams, ...)
  • protocols (binary, compact, JSON, ...)
  • layers (framed, multiplex, gzip, ...)

Additionally, depending on the target language, you get some infrastructure for the server-side end, such as TNonBlocking or ThreadPool servers, etc.

So coming back to your initial question, such a framework can help to make communication easier and more efficient. But it cannot magically remove latency from other parts of the OSI stack.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!