Skip to content

Production-ready C++ Asynchronous Framework with rich functionality

License

Notifications You must be signed in to change notification settings

userver-framework/userver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cb6b796 · Feb 25, 2024
Feb 8, 2024
Feb 9, 2024
Feb 22, 2024
Dec 26, 2023
Feb 25, 2024
Feb 8, 2024
Feb 22, 2024
Feb 2, 2024
Jan 4, 2024
Feb 19, 2024
Dec 7, 2023
Feb 20, 2024
Feb 4, 2024
Feb 22, 2024
Feb 25, 2024
Feb 14, 2024
Feb 15, 2024
Feb 22, 2024
Nov 13, 2020
Dec 12, 2023
Sep 7, 2023
Oct 25, 2023
Jan 29, 2024
Feb 22, 2024
Feb 2, 2024
Feb 19, 2024
Feb 8, 2024
Oct 4, 2023
May 26, 2022
Nov 8, 2021
Dec 19, 2023
Sep 20, 2023
Feb 21, 2023
Aug 21, 2023
Dec 26, 2023
Jan 29, 2024
Feb 6, 2023

Repository files navigation

userver

Service Templates Develop / Green Trunk v1.0
Core: CI Docker build [➚]
PostgreSQL: CI Docker build [➚]
gRPC+PostgreSQL: CI Docker build [➚]

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:

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 (English) or Habr (Russian).

Other Features

  • Efficient asynchronous drivers for databases (MongoDB, PostgreSQL, Redis, ClickHouse, MySQL/MariaDB (experimental) ...) and data transfer protocols (HTTP, gRPC, AMQP 0-9-1 (experimental), 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.