Cloud computing RPC small framework

Source: Internet
Author: User
Keywords Cloud computing RPC framework

In the past era of Client-Server, RPC framework like CORBA and RMI has many levels, because this kind of technology can extend stand-alone IPC (Inter-process communication) and inter-process communication into communication mode between multiple machines, This is very helpful and valuable for scalability, but for various reasons these RPC frameworks have not been adopted and used extensively in the industry.

In our time, more and more machines were needed for distributed communication. Although simple communication can be done by using the HTTP protocol, if we can make the program based on a convenient and better-use and very professional RPC That's a good framework. This article will introduce you to the current two most popular RPC framework: one is Google's Protocol Buffers; the other is Facebook's Thrift.

Protocol Buffers

Protocol Buffers, a way for Google to use a language-neutral, platform-neutral, and extensible serialized structured data internally, offers implementations based on three languages, Java, C ++, and Python, each of which includes the appropriate language Compiler and library files, and is used in many Google products. It is a binary format, so its speed is about 10 times faster than using XML for data exchange. It is mainly used for two aspects: one is ordinary RPC (Remote Procedure Call) communication, which can be used for distributed applications or heterogeneous environment communication; the other is the data storage, because it Since the description, and compression is very convenient, so can be used to persist the data, such as storing log information, and can be MapReduce program processing.

Thrift

Thrift, an open source RPC framework from Facebook, has now become one of the incubator projects for Apache, a well-known open source organization whose main features are: One is to support a very large number of languages, including PHP, which is commonly used in web development , And commonly used languages ​​such as C ++ / Python / Java in the Web backend. They even include popular Ruby and Erlang recently. The other is to provide a complete RPC framework that can generate communication-related framework code through scripts such as Building a simple service takes only a few minutes, which allows developers to focus on business logic, and third, the performance and availability of many large-scale Internet applications such as Facebook and Last.fm. Overall, its code implementation is excellent, the logic is very clear, it's easy to customize extensions, and it is handy to generate code from the framework and save a lot of communication development and debugging time, and Facebook claims Thrift is speed and Protocol Buffers have certain advantages over them.

Whether it is Protocol Buffers or Thrift are excellent, but still hope that we can in accordance with the application of their own actual situation to make a choice, such as the development of YunTable, due to performance and development costs, I did not choose which of the two RPC framework One, but self-built a simple binary communication framework, and is very easy to use, fast at the same time.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.