A Company’s Story Crystallized: Diploid—Part 2

Peter Schols is the CEO of Diploid,[45] a company based in Leuven, Belgium. Diploid provides services and software to hospitals and labs for diagnosing rare diseases using clinical genome analysis.

Ivo:

What was it like to develop with Crystal?

Peter Schols:

When coming from Ruby, working in Crystal feels like coming home. Syntactically, Crystal is highly similar: the only major difference is the static typing. While this takes a bit to get used to, the transition was really smooth and easy. Many lines of code can literally be copied from a Ruby project and pasted into a Crystal project and they will just work. Some lines do need additional type annotations, however. Apart from that, the only major difference is that the rubygems (Ruby libraries) ecosystem is very expansive. Crystal has its own version of gems, called shards. While the number of shards has grown exponentially in the past few months, it’s still way behind the rubygems ecosystem, or the Go ecosystem for that matter.

Ivo:

Are there any aspects of Crystal that specifically benefit customer satisfaction?

Peter Schols:

The Crystal code we use in production was not ported from Ruby; it was written from scratch in Crystal. However, in order to test the difference in performance—and also out of pure curiosity—we ported the code from Crystal to Ruby. For this particular project, we noticed that the Crystal version was 4.4x-6.1x faster.

This made a big difference in user experience. It means that for smaller data sets, Moon can present results in near real time (about 540 ms), which feels instant to the user. The corresponding Ruby program takes 2.5 seconds for the same task. When analyzing larger data sets, the difference was even bigger: on average 27 seconds for Crystal compared to 2 minutes and 50 seconds for almost exactly the same Ruby code, a more than 6x speedup! When analyzing hundreds of samples, these time differences become even more important.

Ivo:

What advantages or disadvantages have you experienced from deploying a Crystal application in production?

Peter Schols:

As mentioned, the speed increase is really significant. In addition, the ability to create a binary is convenient, as it allows for easy deployment.

Compiling a binary also allows us to easily share software with our internal users and testers. With Ruby, we need to set up rvm or rbenv, install the latest Ruby version, install rubygems, and install all required gems. With Crystal, it’s as easy as copying one file.

Ivo:

What do you like the most about Crystal, compared to other languages?

Peter Schols:

Performance, the ability to create real binaries, and the Ruby-like syntax are the most important Crystal selling points for me.

Another advantage is that Crystal makes it very easy to create bindings to a C library—no need to write C code.

Last but not least, Crystal has an amazing community of friendly and skilled developers. It started with Ary, Juan, and Brian at Manas, creating the language and helping the Crystal newbies. In the meantime, it seems like the entire community has copied their attitude of providing help and pointers to everyone who’s interested in this very promising language.

More info about Moon is available here.[46]

Shown is an image of the Moon software in action.

images/managing_projects/diploid.png
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset