Performance comparison of Thrift, Protocol Buffers, JSON, EJB, other?

后端 未结 8 2127
一生所求
一生所求 2020-12-07 08:51

We\'re looking into transport/protocol solutions and were about to do various performance tests, so I thought I\'d check with the community if they\'ve already done this:

8条回答
  •  死守一世寂寞
    2020-12-07 09:34

    I have done a study for spring-boot, mappers (manual, Dozer and MapStruct), Thrift, REST, SOAP and Protocol Buffers integration for my job.

    The server side: https://github.com/vlachenal/webservices-bench

    The client side: https://github.com/vlachenal/webservices-bench-client

    It is not finished and has been run on my personal computers (I have to ask for servers to complete the tests) ... but results can be consulted on:

    • Laptop: https://github.com/vlachenal/webservices-bench/blob/master/results.md
    • Desktop: https://github.com/vlachenal/webservices-bench/blob/master/results-desktop.md

    As conclusion :

    • Thrift offers the best performance and is easy to use
    • RESTful webservice with JSON content type is pretty close to Thrift performance, is "browser ready to use" and is quite elegant (from my point of view)
    • SOAP has very poor performance but offers the best data control
    • Protocol Buffers has good performance ... until 3 simultaneous calls ... and I don't know why. It is very difficult to use: I give up (for now) to make for it work with MapStruct and I don't try with Dozer.

    Projects can be completed through pull requests (either for fixes or other results).

提交回复
热议问题