Performance Zone is brought to you in partnership with:

Allen is a published fiction and non-fiction writer working on his second novel. He currently resides in Hanoi, Vietnam where he is traveling around SE Asia. He is an avid reader and lifelong geek interested in fiction, philosophy, and technology. Allen is a DZone Zone Leader and has posted 285 posts at DZone. You can read more from them at their website. View Full User Profile

How One Startup Uses Scala to Handle Exponential Growth

02.21.2013
| 5843 views |
  • submit to reddit

Lucidchart is a startup with an interesting story to tell about migrating from a PHP framework to Scala, and dealing with the growing pains of scaling to manage user growth.  

As a follow-up to our previous Scala post about migrating to Scala from a CakePHP setup, Typesafe reached out to us to put together a case study. We are releasing a portion of the interview transcript below to give more specifics about why we decided to make the switch.


You can read the full transcript of the interview here. Following are some highlights:

 

Performance and Scalability

I’m not a PHP basher. It’s not my favorite language, but I do think we could have scaled the system with PHP. Core to this decision was that we needed to re-architect the system no matter what language was used. Scala and Play gave us better tools to re-architect to a service-oriented architecture and provided great support for parallel processing which was important to us. It gave us the tools we needed to make the architectural changes we wanted more effectively than I felt we could have done in Java or PHP.


Parallel Processing

PHP does not give you much help with parallel processing. You don’t have any notion of threads. You have no notion of Futures or Actors. I mean, you don’t have threads so you can’t even think about any of these higher level abstractions like executor services, Futures or Actors. Java obviously supports concurrency, but Scala with Akka gives us additional approaches to choose from when designing for concurrency like Actors and Futures.


R.O.I.

I can provide some concrete metrics related to the increases we saw in both reliability and performance for image and pdf generation. This is a big part of our system because every time someone goes to their list of diagrams, we generate a thumbnail. So it’s something that’s happening all the time. We do check a cache, but we still end up doing a lot of image generation for thumbnails as people are making changes to diagrams all the time.


Reference: https://www.lucidchart.com/techblog/2013/02/13/using-scala-to-handle-exponential-growth-at-a-startup-part-2