Crystal clear message brokering - balancing high performance and elegant code

We are thrilled with Crystal here at LavinMQ, and we want to share our enthusiasm with you! Let us show why Crystal was the perfect choice for us!

Performance has been the utmost priority since day one of the LavinMQ journey. This focus resulted in the decision to use Crystal as the programming language for our backend development; its elegance in syntax and remarkable documentation make it an extremely appealing option.

Elegant syntax

Crystal’s syntax is very similar to Ruby’s and offers the same advantages: Simplicity, expressiveness, and productivity. We have always loved Ruby for its elegance, and now we get to work with another beautiful language like Crystal. However, Crystal has important features that distinguish it from Ruby and make it more interesting for us in this case.

Opting for peak performance

LLVM (Low Level Virtual Machine) is a backend framework that compiles code written in various programming languages into machine-readable bytecode. Crystal, being a compiled language, uses LLVM to convert its code into native machine code, which results in improved performance compared to interpreted languages. By using LLVM, Crystal is able to provide the benefits of a compiled language while maintaining the expressiveness and simplicity of a language like Ruby. This allows the LavinMQ team to achieve their goal of balancing high performance with elegant code.

If you want to compare the performance of Crystal to your favorite language, check out this benchmarking page.

Great Documentation

Another important aspect of Crystal is that its standard library is written entirely in Crystal. This means that it is easy for developers to understand the performance characteristics of different methods and functions, as well as to improve and contribute back any improvements. This is particularly beneficial for the LavinMQ team as they are focused on optimizing the performance of their platform. The well-documented standard library, coupled with the powerful performance of Crystal, makes it an ideal choice for their backend development.

If you are interested in Crystal, you can read more about it here, or if you want to try it out, have a look at the installation instructions here.