zoukankan      html  css  js  c++  java
  • grpc(and socket?)

    In gRPC, a client application can directly call a method on a server application on a different machine as if it were a local object, making it easier for you to create distributed applications and services. As in many RPC systems, gRPC is based around the idea of defining a service, specifying the methods that can be called remotely with their parameters and return types. On the server side, the server implements this interface and runs a gRPC server to handle client calls. On the client side, the client has a stub (referred to as just a client in some languages) that provides the same methods as the server.

     

    gRPC 是基于 HTTP/2 协议的,所以即使他能做到双向通信也会是类似websocket通信。而且grpc本身就是强区分客户端服务端,不为双向通信设计。

    和socket相比:

    gRPC 最大优势是编码使用protobuf,具备语言兼容性。使用 protocol buffers 的好处,包括高效的序列号,简单的 IDL 以及容易进行接口更新。 --不过反过来讲实际只使用protorbuf编码或者json编码同样可具备语言兼容性。

    但是它和socket通信本身就是不同的东西,要解决的问题完全就是不同的。

  • 相关阅读:
    linux内核同步机制相关收集
    【转载】关于终端和控制台的一些解释
    【转】linux内核调试方法总结
    misc汇总
    关于proc的介绍,比较详细
    linux内核启动流程分析
    linux通用中断子系统介绍
    ftrace在mips上的验证
    线程死锁demo
    BeanFactory与FactoryBean
  • 原文地址:https://www.cnblogs.com/dongzhiquan/p/15665698.html
Copyright © 2011-2022 走看看