A simple VS. between Sinatra and Martini
Sinatra VS. Martini
There are already many comparison data available online, but nothing is as reliable as doing it yourself. So, I set up two “Hello World” applications, one using Sinatra and the other using Martini, on a VPS. I used Siege, a testing tool for Linux, to compare their performance.
Performance
Sinatra
1 | siege -q -c 1000 -r 30 -f sinatra.url |
1 | Transactions: 29332 hits |
Martini
1 | siege -q -c 1000 -r 30 -f martini.url |
1 | Transactions: 29988 hits |
Code Amount
Of course, when developing, it is not only about focusing on server performance. “Peopleware” has long emphasized that, compared to machines, the speed of programmers should be given the highest priority.
As it is only a simple “hello world” print, it is not possible to make a further detailed comparison of the amount of code (feel free to leave comments).
Most of Go’s libraries are downloaded from GitHub. Is the code quality guaranteed? On the other hand, Ruby is already quite mature (it seems like a few years ago when Python was compared to Ruby).
Conclusion
So, if the daily page views are below tens of millions, Ruby is absolutely fine.
Also, in the book “Programmer’s World” by Yukihiro Matsumoto, it mentions that Ruby’s design philosophy is: development efficiency is greater than runtime efficiency, making it a “user-friendly” language.
Most importantly, writing in Ruby is really enjoyable, isn’t it?
Lastly, may I ask if you are happy?
Translated by gpt-3.5-turbo