Skip to content
프로젝트

소개

풍부한 기능을 제공하는 프로덕션급 C++ 비동기 프레임워크

시스템 및 인프라

이 수치를 측정하는 방법

What you can do

  • Efficient asynchronous drivers for databases (MongoDB, PostgreSQL, Valkey, Redis, ClickHouse, MySQL/MariaDB, YDB, SQLite ...) and data transfer protocols (HTTP/{1.1, 2.0}, gRPC, AMQP 0-9-1, Kafka, TCP, TLS, WebSocket ...), 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.

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+7
in 1 month
+14

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

userver

Ubuntu Fedora Debian MacOS Alpine Arch Docker CI Conan CodeQL

Build and publish ubuntu-24.04-userver images Build and publish ubuntu-22.04-userver images Gentoo Systemd with Overlay CI

uservice-dynconf CI uservice-dynconf Docker build urealmedium CI urealmedium Docker build upastebin CI upastebin Docker

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:

#include <userver/easy.hpp>

// schemas::KeyRequest and parsers+serializers generated from JSON schema
#include "schemas/key_value.hpp"

int main(int argc, char* argv[]) {
    using namespace userver;

    easy::HttpWith<easy::PgDep>(argc, argv)
        // Handles multiple HTTP requests to `/kv` URL concurrently
        .Get("/kv", [](schemas::KeyRequest&& request, const easy::PgDep& dep) {
            // Asynchronous execution of the SQL query in transaction. Current thread
            // handles other requests while the response from the DB is being received:
            auto res = dep.pg().Execute(
                storages::postgres::ClusterHostType::kSlave,
                // Query is converted into a prepared statement. Subsequent requests
                // send only parameters in a binary form and meta information is
                // discarded on the DB side, significantly saving network bandwidth.
                "SELECT value FROM key_value_table WHERE key=$1", request.key
            );

            return schemas::KeyValue{
                .key=std::move(request.key),
                .value=res[0][0].As<std::string>(),
            };
        });
}

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 number of execution threads.

You can learn more about history and key features of userver from our publications and videos.

Other Features

  • Efficient asynchronous drivers for databases (MongoDB, PostgreSQL, Valkey, Redis, ClickHouse, MySQL/MariaDB, YDB, SQLite ...) and data transfer protocols (HTTP/{1.1, 2.0}, gRPC, AMQP 0-9-1, Kafka, TCP, TLS, WebSocket ...), 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.

관련 프로젝트 살펴보기

불러오는 중…