Haskell in Production: CentralApp
In the last few years, Haskell has shown up in a multitude of places and fields. If you open Haskell in industry, you see a lot of companies that, by existing, prove that Haskell is indeed ripe for use in industry. To learn more about them, we have decided to start a series that explores the practical aspects of using Haskell for a software project: real benefits, libraries/extensions that people use, and also the disadvantages.
In the first installment, we got the opportunity to interview Ashesh Ambasta from CentralApp, a tool that enables you to manage your company’s visibility on the Internet: website, reviews, social media, and search engines.
Tell us about your company, your team and your own role there.
My name is Ashesh, and I’m a co-founder and the CTO of CentralApp. I work in the backend development team, and my role entails:
- Backend programming and architecture
CentralApp is a SaaS platform aimed at SME’s. Our goal is to ensure people’s online presence is in sync: that is, their information on the social platforms is constantly up to date and their website is up to date (both in terms of their information and in terms of the latest trends in the web space). We also have a third parallel of the product in which we let the customers communicate directly with their customers: either through reviews on social platforms or via their website.
What were the biggest challenges you’ve overcome while working at this project?
CentralApp is a large system: the product in itself is large and complex. It requires multiple sub-systems working together to achieve the product’s functionality as a whole. Besides, having almost 1500 unique websites currently hosted on our platform means we constantly have to deal with a high throughput system where performance is paramount.
In general, the hardest problem we’ve had to solve is to keep our code base clean, maintainable and functional. We’re also a small development team, so we need to ensure we’re effective in keeping the business requirements going and sustaining the product.
How did Haskell help you to solve them?
Haskell has obvious advantages. It is a statically typed, functional and pure programming language that usually results in performant code. Haskell’s advanced type system lets us model complex business requirements in types: thereby removing a large area of friction for developers. The type system works with you.
Besides that, being pure, Haskell lets us isolate effectful code and reduce the chance of transient failures across our code base. That also allows for easy refactoring.
Could you describe your technology stack?
- Haskell and some Scala (legacy)
- JS on the frontend (maintained by a separate team)
- MySQL + PostgreSQL
- Docker + Stack for tooling (we’d like to move to Nix completely)
- Emacs + Dante for editing
What made you switch from Scala to Haskell?
That was more a matter of preference: I was the lone developer back then and I personally liked the syntax of Haskell more. From a more rational perspective: I liked the fact that Haskell was much less verbose than Scala and type inference in Haskell is ages ahead of that of Scala. And moreover, Haskell seems to be at the cutting edge of type-system research which I find appealing: we use libraries like Servant for all of our API’s.
Which Haskell language extensions / libraries do you tend to use most often?
Where is Haskell great to use and where does it fall short in your stack?
- Pretty much all of our business requirements
- Editor integration: the tools available are buggy or need a lot of manual configuration.
Are you satisfied with the result or do you still have some difficulties?
We’re quite satisfied with what we have so far.
Any key takeaways?
- Haskell is amazing for large systems.
- Haskell is very much ready for production and being applied in the industry.
- We’re a web company, we’re not doing anything super-academic with Haskell, as per its reputation goes. And Haskell is helping us run a profitable business with a backend team as small as 2 people working on what could almost be a 200k LOC codebase.
- Haskell’s tooling, given your ability to invest in it, needs some work. But it isn’t as bad as the buzz suggests. The existence of things like Nix etc. helps this further.
If you would like to talk about your own app, service or any other project that uses Haskell, we’d be pleased to hear about it! You are welcome to write to us: firstname.lastname@example.org.