Anyone have production experience with Crystal? I know it's not 1.0 yet, but there are some fairly mature web frameworks available that make the language look pretty attractive.
I've build the backend of Base API, and the Mint programming language in it.
Base API runs on Heroku and it's memory consumption is really low (around 20Mb on average) also it's slug size is 3.3MB.
I think it's a really good language, the syntax is way more clearer then any of the other similar languages (Go, Rust, Nim).
It has two problems currently as far as I can tell:
- Windows support - when it hits there is no reason for me to use anything else, I'll be able to write desktop applications in it with a Webview or CLI apps
- Lack of mature libraries - in time I think this will remedy itself
At my previous job there was a need for a microservice that would compute a PhotoDNA hash of images and then compare that to a list of "known bad" material. Since this was very CPU-intensive we opted for Crystal instead of the usual Ruby that was used for almost everything else there. When I left it was churning away at ~500 images per second (over many cores, obv).
Development was pretty smooth and it was pretty easy to get new people onboarded since it look so much like Ruby. Some caveats though:
- If you want every last bit of performance, type signatures are very needed. Otherwise the compiler will still have to determine at runtime if the argument to a function is a uint32 or a uint64 for example.
- Library support is definitely lacking compared to Ruby. For example, AWS has an official SDK for Ruby with support for everything you can think of. Crystal has a 3rd party library with support for a few services. It's just not comparable.
not production yet, but if you are looking to make simple apis, you can just go with the stdlib. Like golang, the Crystal http stdlib module is good enough for use in your project. Here is my half done repo where I have used it for a repo https://github.com/rishavs/noir, if you are looking for a reference.
The major things you might struggle with;
* Lack of IDE support. The DevEx is not that great compared to the other languages.
* Long compilation times. Specially if you add more libs to your project.
* http/2, postgres pipelining and async drivers. Not a big deal as the Crystal drivers are performant enough.
* lack of community packages. Most stuff will have to be done by hand.
Base API runs on Heroku and it's memory consumption is really low (around 20Mb on average) also it's slug size is 3.3MB.
I think it's a really good language, the syntax is way more clearer then any of the other similar languages (Go, Rust, Nim).
It has two problems currently as far as I can tell: - Windows support - when it hits there is no reason for me to use anything else, I'll be able to write desktop applications in it with a Webview or CLI apps - Lack of mature libraries - in time I think this will remedy itself
Base API: www.base-api.io Mint: www.mint-lang.com