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

后端 未结 8 2068
一生所求
一生所求 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:31

    One of the things near the top of my "to-do" list for PBs is to port Google's internal Protocol Buffer performance benchmark - it's mostly a case of taking confidential message formats and turning them into entirely bland ones, and then doing the same for the data.

    When that's been done, I'd imagine you could build the same messages in Thrift and then compare the performance.

    In other words, I don't have the data for you yet - but hopefully in the next couple of weeks...

    0 讨论(0)
  • 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).

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