Hacker News new | ask | show | jobs
by sdogruyol 3202 days ago
Great post! I'd be happy to hear about some numbers about performance and resources.
1 comments

Speed was never a real concern of ours. Node is more than quick enough. The big issues for us are code clarity, runtime errors and memory usage.

We like to run our sites inside docker containers so they're easy to reproduce from dev to live environments. A compiled language like crystal, with it's own standard library and tiny memory footprint means we can, with low traffic sites host more together on a server and keep our clients hosting costs low. With higher traffic sites we can use that saved memory for in-memory caches for high use resources.

As mentioned in the article the cms typically uses < 5mb of Ram. In our development environment that really helps. Running lots of sites locally isn't a problem. Node_modules folder for the node version of our cms is 430mb, vs our crystal shards of 773kb. So disk space isn't an issue either.

Type checking has helped reduce runtime errors, it's hard to compare with the node version as the number of errors is often related to code complexity. But anyone who uses typescript will know that moving from a dynamic to a statically typed language is a real eye opener for how many errors we make as programmers. Unlike Typescript, crystal isn't just pretending to have types so there is no `:any` to cheat the system.

If there are any specific metrics you'd like I'll see what I can come up with. But hopefully that gives you an idea of our motivation and the benefits we get.