Yandex opened the userver framework code for creating high-load applications

Yandex has published the source code for the Userver framework, which allows you to create highly loaded C++ applications that work in asynchronous mode. The framework has been tested on Yandex-level loads and is used in services such as Yandex Go, Lavka, Delivery, Market, and fintech projects. The Userver code is written in C++ and is licensed under the Apache 2.0 license.

Userver is best suited for developing applications with a microservice architecture. Initially, the framework was developed for Yandex Taxi, with its help the team switched from a monolithic application to an architecture that allows you to develop separate independent components (microservices) and use them in different applications. Microservices are autonomous, so an application based on such an architecture is easy to update and add new features to it. So, the driver search microservice for orders in Taxi can be used for a similar task - for example, searching for a courier to fulfill Yandex Delivery orders. The same can be done with the calculation of the arrival time of the driver or courier and many other tasks.

The framework was originally created with an emphasis on reliability and convenience, and inside it provides everything you need for development, diagnostics, monitoring, debugging and experimentation. For example, userver suggests how to fix errors at the compilation stage, knows how to work with different databases, change parameters on the fly, and so on. Declared support for Ubuntu, Debian, Fedora, Arch, Gentoo, macOS systems, x86, x86_64, AArch64, Arm architectures, GCC 8+ and Clang 9+ compilers, C++17, C++20, C++23 standards.

The composition includes drivers for asynchronous work with DBMS (MongoDB, PostgreSQL, Redis, ClickHouse, MySQL), asynchronously working clients and servers for various protocols (HTTP, HTTPS, GRPC, TCP, UDP, TLS), low-level primitives for managing synchronization and access to the capabilities of the operating system, as well as high-level components for working with the cache, tasks, distributed locks, tracing, metrics, statistics, and data in JSON/YAML/BSON formats. It is supported to change the configuration of the service on the fly, without stopping it.

Earlier, Yandex also converted its other key technologies into open source projects, such as the YDB distributed database management system capable of processing millions of requests per second, as well as the CatBoost machine learning library, which Yandex uses in Search and other services.

Source: opennet.ru

Add a comment