V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
pancl

为啥 go rpc 要这种形式(不知道用啥词原生?)

  •  
  •   pancl · Apr 1, 2021 via Android · 3864 views
    This topic created in 1862 days ago, the information mentioned may be changed or developed.
    func (t *T) MethodDemo(arg T1,reply T2) error
    感觉就像写 restful 那种。
    Supplement 1  ·  Apr 1, 2021
    你们摸鱼都那么严谨么🌝
    Supplement 2  ·  Apr 1, 2021
    rpc 不是应该屏蔽底层,让看起来像调用本地方法 /函数么?
    7 replies    2021-04-01 16:30:50 +08:00
    tikazyq
        1
    tikazyq  
       Apr 1, 2021   ❤️ 1
    在鱼塘边,搬个板凳,优雅赏鱼
    Mohanson
        2
    Mohanson  
       Apr 1, 2021
    why not?
    GoLand
        3
    GoLand  
       Apr 1, 2021
    建议回小学重造一下语文水平。你觉得不好那么列出你觉得不好的原因、更好的做法。而不是来一句“感觉就像。。”,浪费大家宝贵的摸鱼时间。
    Umenezumi
        4
    Umenezumi  
       Apr 1, 2021
    组织下语言 谢谢
    lesismal
        5
    lesismal  
       Apr 1, 2021
    no1xsyzy
        6
    no1xsyzy  
       Apr 1, 2021
    这是 Remote Procedure Call 而不是 Remote Function/Method Call
    没封装,就是个底层通信设施。

    跟 RESTful 差距挺大的,不知道咋就感觉像了
    abersheeran
        7
    abersheeran  
       Apr 1, 2021
    可能是因为 go 没那么灵活? github.com/abersheeran/rpc.py Python 里的确可以做到你说的,调用远程函数就像一个本地函数一样。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   972 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 19:13 · PVG 03:13 · LAX 12:13 · JFK 15:13
    ♥ Do have faith in what you're doing.