Vote for the best protocol for the given scenario

后端 未结 9 2184
时光取名叫无心
时光取名叫无心 2021-02-08 22:04

I have a design decision to make. I need your advice.

Requirements:

  • A server and a client. client is typically a mobile phone.
  • Connected through t
相关标签:
9条回答
  • 2021-02-08 22:40

    Hessian is a lightwieght binary protocol over http. There are a lot of different Hessian implementations so you could serve a number of different clients.

    Since you're concerned with efficiency, you can find some metrics on different Java remoting protocols here: http://daniel.gredler.net/2008/01/07/java-remoting-protocol-benchmarks/

    0 讨论(0)
  • 2021-02-08 22:47

    Use option 1, use ASN.1 as protocol! (Sometimes called binary XML.) This results in small, structured messages that can be understood by others. It's a popular standard and when you're reading this message, you've just used it. :-)

    ASN.1 is part of several Internet protocols.

    0 讨论(0)
  • 2021-02-08 22:52

    Go for option 1 and use Google Protocol Buffers to autogenerate your code from the protocol definition (i.e. it gives you some consistency / standardisation whilst still being efficient).

    0 讨论(0)
提交回复
热议问题