"It was never recommended to decompose a system into microservices while it is not mature enough. While small, a business has to be flexible and react quickly to the opportunities in the market. This is not an ideal environment for building microservices, and more benefits can be achieved by having a monolith instead. PHP with its ecosystem perfectly fits into this strategy."
Java, Python, and even Ruby [1] can get you under 10ms for service responses that actually hit a database, in my experience. But why improve performance by switching to a language that's well suited to the task at hand when you can do it by switching to a language that's hip?
[1] My company ran into a problem where one of our Ruby service responses was taking something about 100ms. We ruled out the database, and the ruby code, and finally discovered that the problem was jumping back and forth between Ruby and C while generating the JSON response from model classes with customized `to_json` behavior. We solved it by traversing the structure in Ruby and turning it into Arrays and Hashes. Back down under 10ms!
With some work you can write some Java that will easily take a message, parse it, do logic, and reply in under .1ms. Not that useful for a webapp though, databases are kinda cool.
> But why improve performance by switching to a language that's well suited to the task at hand when you can do it by switching to a language that's hip?
11 comments
[ 3.4 ms ] story [ 31.1 ms ] thread[1] My company ran into a problem where one of our Ruby service responses was taking something about 100ms. We ruled out the database, and the ruby code, and finally discovered that the problem was jumping back and forth between Ruby and C while generating the JSON response from model classes with customized `to_json` behavior. We solved it by traversing the structure in Ruby and turning it into Arrays and Hashes. Back down under 10ms!
https://www.lmax.com/execution-performance
Because your question is loaded?
list(a, b) = [b, a]
Multiple return values:
[a, b] = function(){ return ["one value", "another"];};