• 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通信本身就是不同的东西,要解决的问题完全就是不同的。

  • 相关阅读:
    elasticsearch head插件安装
    ELK部署配置使用记录
    windows 安装mysql
    vs2017创建dotnetcore web项目,并部署到centos7上
    CentOS 7 安装jdk
    CentOS 7 配置网络
    Surging 记录
    记录一下地址
    net core 依懒注入 中间件
    Elasticsearch 配置文件
  • 原文地址:https://www.cnblogs.com/dongzhiquan/p/15665698.html
Copyright © 2020-2023  润新知