senecajs / seneca

A microservices toolkit for Node.js.
http://senecajs.org
MIT License
3.95k stars 314 forks source link

About molecular vs sensca? #893

Open ching2018 opened 2 years ago

ching2018 commented 2 years ago

https://moleculer.services/zh/docs/0.14/benchmark.html

Is it true? Can Seneca continue to improve? I use Seneca all the time.

wzrdtales commented 2 years ago

molecular's benchmarks are full of lies... . They compare in process communication with over network communication. And they did not apply the same standards they applied to themself in the configuration of the competitors.

wzrdtales commented 2 years ago

further, molecular does no transient tracking of transactions. If you deactivate certain features in seneca you will reach similar numbers that they proclaim for themself. For example { history: false } will increase the speed at least by 4x, but you have no guarantee anymore that the same request might not be executed twice.

wzrdtales commented 2 years ago

just look at the source code of their benchmarks and you immediately see they're bullshit:

https://github.com/icebob/microservices-benchmark/blob/1308943967a5cde353ed0d32886c4da2d5ca27db/suites/remote.js#L85-L87

they compare direct TCP on molecular vs seneca with nats...

wzrdtales commented 2 years ago

I modified the benchmarks back then simply by using TCP for seneca, and adding history: false

the result I just searched out for you:

benchmark_remote  | 
benchmark_remote  | Suite: Call remote actions
benchmark_remote  | ✔ Moleculer*           13,509 rps
benchmark_remote  | ✔ Hemera*              12,948 rps
benchmark_remote  | ✔ Cote*                38,126 rps
benchmark_remote  | ✔ Seneca*               9,599 rps
benchmark_remote  | 
benchmark_remote  |    Moleculer*      -64.57%         (13,509 rps)   (avg: 74μs)
benchmark_remote  |    Hemera*         -66.04%         (12,948 rps)   (avg: 77μs)
benchmark_remote  |    Cote*                0%         (38,126 rps)   (avg: 26μs)
benchmark_remote  |    Seneca*         -74.82%          (9,599 rps)   (avg: 104μs)

seneca is slower, but not as much as they represented it. And I could have possibly deactivated even more features.

ching2018 commented 2 years ago

thanks a lot~

rjrodger commented 2 years ago

🤣 thanks guys! looks like our history code could do with a little love in any case!