This topic uses Shimo Docs as an example and describes the integration between Shimo Docs and Function Compute. The example in this topic shows you how Function Compute enables Shimo Docs to scale out computing resources within milliseconds, reduce costs of servers, and improve work efficiency.

Customer introduction

Shimo Docs is the first enterprise-level online office tool in China. It provides similar features as Google Docs and Quip. Shimo Docs allows different users to work together on the same document at the same time. Since its foundation in 2014, the company has provided a variety of services for more than 200,000 enterprise users. Shimo Docs features rapid synchronization responses within milliseconds. It is an ideal choice for teamwork. Shimo Docs is an impressive technical achievement that is rendered with Chinese aesthetics and ranked among the 2015 Top 50 Internet Innovative Products by GeekPark.

Customer pain points and requirements

To develop real-time collaborative document editing services, the technical team of Shimo Docs has performed in-depth research into the Operational Transformation (OT) algorithm and made several key improvements. This includes the development of a two-dimensional document editing system, on top of the original one-dimensional system. This system eliminates merge conflicts that may occur when multiple users simultaneously edit a piece of text. However, Shimo Docs faces the following challenges:
  • Real-time edits by different users is resource intensive and often overloads the servers.
  • When a user types a word on the keyboard, a server saves the edit within a few milliseconds. However, when a large number of users are editing documents on Shimo Docs at the same time, data may be unevenly distributed within a short period.
Shimo Docs needed a scalable and highly available service to process conflicts that occur during document editing in real time. The service must have the following benefits:
  • The service is cost-efficient.
  • The service can enable Shimo Docs to smoothly process the surging loads that occur during peak hours to ensure synchronization responses within milliseconds.

Solution

Function Compute is a serverless computing platform provided by Alibaba Cloud. Function Compute dynamically allocates runtime environments and schedules computing resources in milliseconds based on the number of requests received. Function Compute minimizes latency when the workload is heavy and maintains high resource utilization when the workload is low. In addition, by using Function Compute, Shimo Docs can save on costs because it needs only to pay for computing resources that are used when the code is running. Based on Function Compute, Shimo Docs uses the Alibaba Cloud serverless architecture to build a real-time document editing service. The logic of real-time document collaboration is implemented as a function. The intelligent scheduling system of Function Compute automatically allocates runtime environments to process the peak load of collaborative document editing. The scalability of Function Compute ensures that applications are stable and reliable during runtime.

Benefits of Function Compute

  • Cost efficiency: Function Compute enables Shimo Docs to scale out computing resources within milliseconds when surging loads occur during peak hours. Compared with deploying physical servers in data centers, Function Compute improves resource utilization by reducing the waste of idle resources, and saves the server cost.
  • Improved efficiency: By using Function Compute, Shimo Docs no longer needed to be concerned about the load balancing of CPU-intensive computing. The pace of project iteration is gradually accelerated, and engineers can focus on working with the product team to continuously expand the business value. Function Compute has helped Shimo Docs improve development efficiency and process stability.