Re:Reasons to use Phoenix instead of Rails
by merb on Sunday November 26, 2017 @11:53AM
(#15781706)
even for "old databases" (mysql, postgresql) 200ms is huge or to it differently say probably his database is not the bottleneck.
He probably fetches big lists, and even lists with over 100 entries are extremly slow on python/rails, whatever.
on java/c++/go/rust these things are way faster.
[ Parent
| on HN ]
Re:Reasons to use Phoenix instead of Rails
by lettergram on Sunday November 26, 2017 @12:12PM
(#15781834)
The database doesn't need to be an issue - it just currently is. We have a fairly complex query on a several terabyte large PostgreSQL database and didn't want to spend more money. Basically, we just haven't sharded it yet, and don't want to pay for a larger machine. The point is - typically the issue isn't the web app. Almost all web frameworks are designed to be scalable from the start. Just launch another instance.
Also, we do about 99 writes for every 1 read, so query times don't matter as much. For the given app I was using as an example.
Network I/O and large databases are usually the bottlenecks from what I've seen consulting and developing.
Re:Reasons to use Phoenix instead of Rails
by tychver on Sunday November 26, 2017 @05:29PM
(#15783446)
This was probably true 10 years ago, but these days it's basically FUD. Since then Ruby improved performance something like 5-80x from 1.8 to 2.5 and moved from an interpreted language to a VM nearly as fast as LuaJIT. Go only has 3-5x the throughput for tasks like: grab 100 rows from PostgreSQL, serialize to JSON, respond via HTTP. Lots of the hot code in Ruby around fetching rows from the DB, serializing to JSON, and HTTP parsing have also since been implemented as native functions in C, massively improving performance with zero effort required by the developer.
yeah this is cool, until you make a single map...
Re:Reasons to use Phoenix instead of Rails
by tychver on Monday November 27, 2017 @09:44AM
(#15787677)
Do you mean: "take a few thousand rows and map them to a different data structure"? Because I benchmarked that recently and mapping 16,000 rows of GPS points using haversine distance in pure Ruby takes about 12ms, and about 5ms in Go. It's not that much slower. There are tasks where Ruby can be ~100x slower than Go, but a simple map isn't one of them.