Function Compute meets the needs of online programming education and supports our multi-dimensional teaching mode. After students type in their code, FC can immediately return the execution results, achieving interactive learning.

About Lagou

Lagou Education is a sub-brand of Beijing Lagou Network Technology Co., Ltd., one of the largest job-matching platform in China. Lagou Education is dedicated to helping IT professionals improve their communication and technical skills. As a practical university for those working in the Internet industry, Lagou Education provides two learning methods: columns and bootcamps. The courses cover fields such as R&D, product, design, operation, and marketing.

Challenge

Lagou Education offers programming courses as part of its education programs. The programming courses are supplemented with images, text, audio files, and video files. The most attractive feature of the programming courses is interactive learning. This feature allows students to acquire knowledge and master skills through hands-on practices. At the core of the programming courses is a system that can return execution results in real time after students type in code online. In order for this to work, the system must have the following three features:
  • The system must support multiple programming language runtimes. Lagou Education provides courses for a rich variety of programming languages and technical frameworks. Therefore, the system must be able to: first, support the runtime of multiple programming languages, and second, extend the supported runtime languages in a quick and convenient way.
  • The system must support large numbers of concurrent requests. Lagou Education gathers a large number of excellent teachers and students. In each class are tens of thousands of students. Therefore, the online programming system must be able to handle massive concurrent requests.
  • The system must be secure. It must not break down or affect other business areas due to malicious code or poorly written code that might be submitted, such as those that contain endless loops.

Why Alibaba Cloud

Lagou Education chose Function Compute, a serverless service developed by Alibaba Cloud, to address the critical pain points of its system. With FC, students only need to write code in one of the supported programming languages to implement execution logic and upload the code. FC instances can also be triggered by HTTP requests or events to execute the logic and respond to the requests.

What's more, FC is seamlessly interconnected with other Alibaba Cloud services, including Object Storage Service, API Gateway, Log Service, Message Service and Tablestore. This helps Lagou Education quickly build systems.

Architecture

  1. FC supports multiple programming language runtimes, including Java, Python, Node.js, PHP, and .Net Core. It can also build the runtime of other languages by using custom containers, such as custom Go runtime, custom Ruby runtime, and custom PowerShell runtime.
  2. FC provides elastic scaling and high availability. To support high concurrency in systems that are built on traditional servers, the only method is to add more machines. This method is not flexible to address traffic surges or traffic varies over time. FC eliminates the need for cold boot by using reserved instances and the pay-as-you-go billing method. An instance can start within milliseconds. You can also configure only one FC instance to process concurrent requests. The instance can be scaled to handle sudden traffic surges with ease.
  3. FC has a thorough security protection mechanism. For FC, security enjoys the highest priority in every aspect of the service and system design. FC provides the same isolation protection level for programs as Elastic Compute Service. FC runs on virtual machines, not in containers. In addition, FC provides robust protection against DDoS attacks and attacks on the network, data, and code.

Looking Forward

Function Compute meets the needs of online programming education and supports multi-dimensional teaching mode of Lagou Education. After students type in their code, FC can immediately return the execution results, achieving interactive learning. In the future, Lagou Education will continue to explore new opportunities to apply serverless solutions to online programming.

Featured Products

  • Object Storage Service: An encrypted and secure cloud storage service that can store, process, and access massive amounts of data from anywhere in the world.
  • API Gateway: API Gateway provides you with high-performance and highly available API hosting services to deploy and release your APIs on Alibaba Cloud products.
  • Short Message Service: A messaging service that covers the globe, Alibaba SMS provides convenient, efficient, and intelligent communication capabilities that help businesses quickly contact their customers.
  • Tablestore: A fully managed NoSQL cloud database service that enables storage of a massive amount of structured and semi-structured data.
  • Log Service: An all-in-one service for log-type data.
  • Function Compute: A secure and stable, elastically scaled, O&M-free, pay-as-you-go, serverless computing platform.