A Company’s Story Crystallized: Red Panthers

P. S. Harisankar is the founder, CEO, and CTI of Red Panthers,[20] which is a Ruby on Rails development studio that builds web and mobile applications. It is based in Cochin, India and Wyoming, USA.

Ivo:

What production projects do you use Crystal for?

P. S. Harisankar:

We have a POS (Point Of Sale) system that reads RFID tags from a reader and displays them on a web page. Then the user commits this data to our cloud server, which marks the sale. The cloud app is built in Ruby on Rails.

Ivo:

Why did you decide to use Crystal for these applications?

P. S. Harisankar:

Our local dashboard for the previous POS system was too slow: delay of seconds during a sale is not acceptable. The client required a better response time at the local readers, so we rewrote it in Crystal and are now able to provide a 10 to 15 micro-second response, a 200,000x improvement!

We are a Ruby on Rails firm, and if Crystal hadn’t existed, our client was leaning toward C++ or Go since we had also worked in Go before. But using Crystal felt more natural for us as we already have parts of the code written in Ruby. It helped us to easily port these to Crystal.

Ivo:

What types of problems does Crystal solve best?

P. S. Harisankar:

Right now, Crystal is our go-to tool when it comes to building an executable application or doing system programming (managing printers, readers, process-monitors, and so on), or when our clients ask for API service with micro-second requirement. Being a Ruby on Rails dev shop also helped us to work in Crystal. I can ask anyone on my team to have a go at a Crystal program and they love it.

Ivo:

What was it like to develop with Crystal?

P. S. Harisankar:

Using the Kemal framework, we were able to build a simple web application, have it compiled down to an executable file, and then run that executable as a service. Our POS system is available on a port, using websockets. All the configurations, can be modified in a config.yml file and then our client/technician only has to restart the service.

Coming from a dynamic language environment to a static language had its cost. I had to care about the datatypes that we were using and how we were using them. It did make me think more ahead of time. Because it’s a pretty new language, we had problems with finding good blog articles on it, but the gitter chat of both Kemal[21] and Crystal[22] helped us a lot.

Ivo:

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

P. S. Harisankar:

Our client told us that he needs to build a system that can be deployed without the help of a programmer to install all the dependencies, and so on. It should be a drop in, or a deb package. Ruby was out of the question as we would need to install the Ruby VM and set up the server. We were able to package all the contents of this project—the JavaScript, HTML, Bootstrap theme, and so on—inside a single executable, needing only a second file for configuration.

Ability to compile down our program to one executable was what sold Crystal to us and then to our client. The program running so fast was also a requirement that Crystal satisfied. Not having an Internet connection is not a deal breaker: the system keeps a local record of the sale and item catalog, and synchronizes with the cloud server when it has Internet.

Ivo:

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

P. S. Harisankar:

The system worked out of the box, and made our POS interface run like silk. We are running Crystal in 18 machines now, and so far we haven’t faced issues.

Ivo:

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

P. S. Harisankar:

Its speed and WebSocket support in Kemal. For now, Crystal is satisfying our requirements very well.

..................Content has been hidden....................

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