Over a million developers have joined DZone.
Platinum Partner

How One Startup Uses Scala to Handle Exponential Growth

· Performance Zone

The Performance Zone is brought to you in partnership with AppDynamics. Discover five of the top performance metrics to capture to assess the health of your enterprise Java application.

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


The Performance Zone is brought to you in partnership with AppDynamics.  Learn the essentials of APM and how to implement best practices of application performance, better understand what it means to capture, analyze, and react to performance problems as they arise, and more specifically with .NET applications. 

Topics:

Published at DZone with permission of Allen Coin .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}