How It Works
The problem of efficient I/O interactions is solved transparently for the developers
std::size_t Ins(storages::postgres::Transaction& tr,
std::string_view key) {
auto res = tr.Execute("INSERT INTO keys VALUES ($1)", key);
return res.RowsAffected();
}
template <class OnSuccess>
void Ins(storages::postgres::Transaction& tr,
std::string_view key, OnSuccess&& on_success) {
tr.Execute("INSERT INTO keys VALUES ($1)", key,
[on_success = std::forward<OnSuccess>(on_success)]
(const auto& res, const auto& error) {
if (error) {
report_error(error);
return;
}
on_success(res.RowsAffected());
}
);
}
Values of userver
Technologies for debugging and memory profiling a running production service
Write your first toy C++ service, evolve it into a production ready service.
Efficient asynchronous drivers for databases (MongoDB, PostgreSQL, MySQL/MariaDB, Redis, ClickHouse, YDB, ...) and data transfer protocols (HTTP, WEbSockets, gRPC, TCP, AMQP-0.9.1, Apache Kafka, ...), tasks construction and cancellation.
Functionality to change the service configuration on-the-fly. Adjust options of the deadline propagation, timeouts, congestion-control without a restart.
Rich set of high-level components for caches, tasks, distributed locking, logging, tracing, statistics, metrics, JSON/YAML/BSON.
Comprehensive set of asynchronous low-level synchronization primitives and OS abstractions.
Brands and companies using userver
Leave Your Feedback
Your opinion will help to improve our service