📋
space
  • SDE Interview
  • Multi-threading
    • Mutex vs Semorphore
    • Thread vs process
  • Design Pattern
  • Java
    • Polymorphism
    • Encapsulation
    • Inheritance
    • Override vs overload
  • MySQL
    • DB transaction
  • Data Structure
    • Design hashset
    • AVL / red black tree
    • LinkedList vs arrayList
    • HashMap vs HashTable
    • Binary Tree
    • Heap
  • System Design
    • Session Cookie
    • GFS / BigTable / MapReduce
    • Zookeeper
    • gRPC vs thrift
    • Amazon RDS vs Oracle
    • Microservices
    • REST vs RPC
    • Database design
    • idempotent in HTTP
    • Optimistic locking / Pessimistic locking
    • Partitioning / Sharding data
    • Consistent Hashing
    • Case Study
      • Design Delay Task scheduler
      • Design View Count
      • Design Twitter
      • Design Web Crawler
      • Design Uber
      • Design Netflix
      • Design Google Doc
      • Design Monitoring System
      • Design Dropbox
      • Distributed Lock
      • Design Instagram
      • Design Yelp
      • Design Amazon
      • Design Google Search
      • Distributed Database System Key Value Store
      • Design Facebook message / Whatsapp
      • Design Logging Systems
      • Design Movie booking system
      • Design Google Autocomplete Feature
      • Design Twitter Search
    • Message Broker
      • Kafka
    • Design Data Intensive Application
      • Chapter 8
    • SQL vs NoSQL
      • Cassandra
      • MongoDB vs Cassandra vs MySQL vs HBase
    • TCP vs UDP
    • Load Balancer
    • Cache
      • Memcached
      • Redis
    • DNS
    • CDN
    • Strong consistency vs eventual consistency
    • Scalability
Powered by GitBook
On this page
  • 区别
  • 如何选择

Was this helpful?

  1. System Design

gRPC vs thrift

PreviousZookeeperNextAmazon RDS vs Oracle

Last updated 4 years ago

Was this helpful?

区别

  • Grpc

    • Grpc 是高性能,通用的开源RPC框架,基于HTTP/2协议标准

    • Grpc 以protobuf作为LDL(接口描述语言),通过protoc来编译框架代码

    • 支持 C, C++, Node.js, Python, Ruby, Objective-C,PHP and C#

  • Thrift

    • Thrift是一种可伸缩的跨语言服务的RPC软件框架。它结合了功能强大的软件堆栈的代码生成引擎,以建设服务,高效、无缝地在多种语言间结合使用

    • Thrift 以thrift 作为LDL

    • 支持C、C++ 、C# 、D 、Delphi 、Erlang 、Go 、Haxe 、Haskell 、Java 、JavaScript 、node.js 、OCaml 、Perl 、PHP 、Python 、Ruby 、SmallTalk

    • 使用Thrift:Hadoop、HBase、Cassandra、Scribe、LastFM、Facebook、 Evernot

如何选择

  • 什么时候应该选择gRPC而不是Thrift

    • 需要良好的文档、示例

    • 喜欢、习惯HTTP/2、ProtoBuf

    • 对网络传输带宽敏感

  • 什么时候应该选择Thrift而不是gRPC

    • 需要在非常多的语言间进行数据交换

    • 对CPU敏感

    • 协议层、传输层有多种控制要求

    • 需要稳定的版本

    • 不需要良好的文档和示例

blockchain
blockchain