# userver **Repository Path**: c--open-source-collection/userver ## Basic Information - **Project Name**: userver - **Description**: userver 是一个开源的异步框架,具有丰富的抽象集,用于快速和舒适地创建 C++ 微服务、服务和实用工具 - **Primary Language**: C/C++ - **License**: Apache-2.0 - **Default Branch**: develop - **Homepage**: https://www.oschina.net/p/userver - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2023-06-05 - **Last Updated**: 2023-06-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # userver [](https://userver.tech/) | Service Templates | Status | |------------------------|-----| | [Core](https://github.com/userver-framework/service_template) | [![CI](https://github.com/userver-framework/service_template/actions/workflows/ci.yml/badge.svg)](https://github.com/userver-framework/service_template/actions/workflows/ci.yml) [![Docker build](https://github.com/userver-framework/service_template/actions/workflows/docker.yaml/badge.svg)](https://github.com/userver-framework/service_template/actions/workflows/docker.yaml) | | [PostgreSQL](https://github.com/userver-framework/pg_service_template) | [![CI](https://github.com/userver-framework/pg_service_template/actions/workflows/ci.yml/badge.svg)](https://github.com/userver-framework/pg_service_template/actions/workflows/ci.yml) [![Docker build](https://github.com/userver-framework/pg_service_template/actions/workflows/docker.yaml/badge.svg)](https://github.com/userver-framework/pg_service_template/actions/workflows/docker.yaml) | | [gRPC+PostgreSQL](https://github.com/userver-framework/pg_grpc_service_template) | [![CI](https://github.com/userver-framework/pg_grpc_service_template/actions/workflows/ci.yml/badge.svg)](https://github.com/userver-framework/pg_grpc_service_template/actions/workflows/ci.yml) [![Docker build](https://github.com/userver-framework/pg_grpc_service_template/actions/workflows/docker.yaml/badge.svg)](https://github.com/userver-framework/pg_grpc_service_template/actions/workflows/docker.yaml) | **userver** is an open source asynchronous framework with a rich set of abstractions for fast and comfortable creation of C++ microservices, services and utilities. The framework solves the problem of efficient I/O interactions transparently for the developers. Operations that would typically suspend the thread of execution do not suspend it. Instead of that, the thread processes other requests and tasks and returns to the handling of the operation only when it is guaranteed to execute immediately: ```cpp std::size_t Ins(storages::postgres::Transaction& tr, std::string_view key) { // Asynchronous execution of the SQL query in transaction. Current thread // handles other requests while the response from the DB is being received: auto res = tr.Execute("INSERT INTO keys VALUES ($1)", key); return res.RowsAffected(); } ``` As a result, with the framework you get straightforward source code, avoid CPU-consuming context switches from OS, efficiently utilize the CPU with a small amount of execution threads. You can learn more about history and key features of userver from our articles on [Medium](https://medium.com/p/d5d9c4204dc2) (English) or [Habr](https://habr.com/post/674902) (Russian). ## Other Features * Efficient asynchronous drivers for databases (MongoDB, PostgreSQL, Redis, ClickHouse, ...) and data transfer protocols (HTTP, GRPC, AMQP 0-9-1 (EXPERIMENTAL), TCP, ...), tasks construction and cancellation. * Rich set of high-level components for caches, tasks, distributed locking, logging, tracing, statistics, metrics, JSON/YAML/BSON. * Functionality to change the service configuration on-the-fly. * On-the-fly configurable drivers, options of the deadline propagation, timeouts, congestion-control. * Comprehensive set of asynchronous low-level synchronization primitives and OS abstractions. [See the docs for more info](https://userver.tech/d6/d2f/md_en_index.html).