• >
  • >
  • >
  • >
  • >
Lightbend > Case Studies > Lucid Software Leverages Typesafe Platform for Enhanced Scalability and Performance of Lucidchart

Lucid Software Leverages Typesafe Platform for Enhanced Scalability and Performance of Lucidchart

Lightbend Logo
Customer Company Size
Mid-size Company
Region
  • America
Country
  • United States
Product
  • Lucidchart
  • Typesafe Platform
  • Play Web Framework
Tech Stack
  • Scala
  • Akka
  • Java Virtual Machine (JVM)
  • Play Framework
Implementation Scale
  • Enterprise-wide Deployment
Impact Metrics
  • Customer Satisfaction
  • Productivity Improvements
Technology Category
  • Platform as a Service (PaaS) - Application Development Platforms
  • Application Infrastructure & Middleware - API Integration & Management
Applicable Industries
  • Software
Applicable Functions
  • Product Research & Development
  • Business Operation
Use Cases
  • Process Control & Optimization
  • Remote Collaboration
Services
  • Software Design & Engineering Services
  • System Integration
About The Customer
Lucid Software is a software development company whose enterprise-level online diagramming tool, Lucidchart, provides a graphical web application in the browser that is on par with, if not better than, desktop software. Lucidchart enables companies to visually communicate processes and ideas in real-time across an entire organization. Lucidchart has a variety of shape libraries, which allow users to create diagrams like org charts, mind maps, UML schemas, ER diagrams, network diagrams, and more. Lucidchart’s support of Visio file types allows for import and export in Visio format; it also gives users the option to import Visio stencils to create custom shape libraries for specialized use cases.
The Challenge
Dealing with healthy growth in product usage is a problem that every company wants, but it can be challenging to provide an efficient and consistent experience for every user. The Lucid engineering team could see that their monolithic server architecture had too much overhead and some limitations that would make it difficult to scale in a cost-effective way. They realized that they needed to make a marked shift in technologies to ensure that the company could meet its performance, scalability, and reliability goals. Lucidchart’s growing pains were due to both architectural realities and to the limitations of certain technologies. For example, Lucidchart’s monolithic application was not easily partitioned and distributed, and CakePHP introduced a lot of overhead per request, resulting in the minimum response times being too high under load. As it became clear that a significant portion of the code base needed to be rewritten, Brian Pugh, VP of Engineering, pushed for a complete survey of existing solutions to find the best tools to meet both current and future technical requirements. The team determined that scaling up in a cost-effective way would be best achieved by adopting a Service Oriented Architecture (SOA) and making significant use of parallel processing to handle compute-intensive operations. Building such an architecture from the ground up is a significant task, so they wanted to leverage existing technologies and frameworks that were purposefully built for the task. The Lucid team narrowed in on PHP, Java, and the Typesafe Platform as possible technologies on which to base their future development.
The Solution
While the team enjoyed the productivity of PHP, they found the visibility into the runtime environment to be limited. On the other hand, the Java Virtual Machine (JVM) has many monitoring tools available with well-documented APIs (e.g. VisualVM, JMX, jmap, jstat). Another important factor the team considered was support for parallel processing, an area where PHP was lacking. While Java does provide the benefits of the JVM runtime and concurrency support, it can be difficult to utilize when massive scale and concurrency are required. That left one option: The Typesafe Platform, consisting of Scala, Akka and Play Web Framework. Scala is a general purpose programming language inspired by the long tradition of functional programming, which makes it easy to avoid shared state. Scala ensures the ready distribution of computation across cores on a multicore server, and across servers in a datacenter. This makes Scala an especially good match for modern multicore CPUs and distributed cloud-computing workloads that require concurrency and parallelism. Play Web Framework is a framework based on a lightweight, stateless, web-friendly architecture that features predictable and minimal resource consumption (CPU, memory, threads) for highly scalable applications. Akka is a toolkit and runtime for building highly concurrent, distributed, and fault tolerant event-driven applications on the JVM. Akka vastly simplifies the concurrency problem by providing developers with a higher level of abstraction in its Actor-based model. By utilizing Actors, developers can focus on writing business logic, instead of worrying about low-level tasks like state management, memory locking and thread management. Since these technologies run within the JVM, the Lucid operations team had access to the monitoring tools they needed, while developers were able to take advantage of the numerous libraries available in the Java ecosystem. Furthermore, the engineering team continued to enjoy the highly product
Operational Impact
  • Lucid Software's developers are split into two teams. One team handles the client-side, and the other manages the server-side. The client team manages over 150,000 lines of JavaScript to provide Lucidchart’s users with a uniquely rich and fluid SaaS experience. Those lines remained largely unaffected by the change in platform. The server-side team embraced the new toolset and invested the time needed to get up to speed. Scala and the Play Framework furnished better tools for re-architecting to the SOA model, provided a variety of options for parallel processing, and pushed developers to write high quality code.
  • Scala has allowed Lucidchart to essentially create a DSL for PDF generation, since it lends itself so well to a translation of Lucidchart’s hierarchical data model for representing a diagram. The result is a proprietary format transformed into accurately rendered images.
  • When migrating a large application, a key tactic is to introduce small changes early and often. Today, Lucidchart still has PHP code on the server side, but is constantly migrating services to make light work of an otherwise gargantuan task. A poster child for this strategy is the image generation service, which creates a PDF, PNG or JPEG image of a Lucidchart diagram; it is used extensively in the application and seemed like an ideal target on which to practice. Rewriting this service in Scala, leveraging Akka and Play, has resulted in marked performance and stability gains. The improvements were primarily the result of moving from the single threaded, sequential approach that Lucidchart had in PHP, to a parallel processing approach using Akka’s Futures and Actors. Now, multiple threads are used to handle a single image or PDF generation.
Quantitative Benefit
  • Average response time decreased by 53%
  • Median response time decreased by 37%
  • Overall failure rate decreased by 85%

Case Study missing?

Start adding your own!

Register with your work email and create a new case study profile for your business.

Add New Record

Related Case Studies.

Contact us

Let's talk!
* Required
* Required
* Required
* Invalid email address
By submitting this form, you agree that AGP may contact you with insights and marketing messaging.
No thanks, I don't want to receive any marketing emails from AGP.
Submit

Thank you for your message!
We will contact you soon.