We keep an eye on all the issues and feature requests at the github.com/userver-framework, at the English-speaking and Russian-speaking Telegram support chats. All the good ideas are discussed, big and important ones go to the Roadmap. We also have our in-house feature requests, those could be also found in Roadmap.
Important or interesting features go to the changelog as they get implemented. Note that there's also a Security Changelog.
Changelog news also go to the userver framework news channel.
Roadmap
- Add YDB driver.
- Add PostgreSQL connection pools control via Congestion Control.
- Add retry budget or retry circuit breaker for clients.
- Add web interface to the uservice-dynconf
- Add basic Kafka driver.
Changelog
Release v1.0.0
Big new features since the Beta announcement:
- Implemented WebSockets server
- Added MySQL driver
- RabbitMQ drived was added
- Implemented TLS server
- Enabled PostgreSQL pipelining
- Implemented and enabled Deadline Propagation
- Improved experience with metrics. Added Prometheus and Graphite metric formats. Provided a modern simple interface to write and test metrics.
- Added chaos tests for drivers
- Implemented streaming API for the HTTP
- Improved documentation, added more samples and descriptions, improved search.
- Numerous optimizations.
- Numerous build improvements, including Conan and Docker support.
Optimized and improved features that were available at the Beta announcement:
- gRPC client and server
- Mongo driver
- Redis driver
- PostgreSQL
- HTTP server and client
- Logging and Tracing
- ... and many other features.
Detailed descriptions could be found below.
Beta (September 2023)
- WebSockets server and TLS server are now implemented as part of the HTTP server
- PostgreSQL pipelining is now implemented and turned on by default, leading to improved response times.
- Mongo Congestion Control is implemented and turned on by default, leading to better stability of the service in case of high load on database.
- Initial logger is now initialized from the component config, leading to a more simple code and setup. The
--initial-logger
option now does nothing and will be removed soon.
- Added a `userver_testsuite_add_simple()` CMake function to simplify testsuite CMake configuration.
- Expanded list of HTTP codes, thanks to Vladimir Popov for the PR!
- Projects from Yandex Schools were updated by the original authors. Thanks to bshirokov, Almaz Shagiev, Konstantin Antoniadi, Mingaripov Niyaz, Ilya Golosov and all the participants for the the great work and PRs!
- Build:
- New versions of
yaml-cpp
library are now supported. Thanks to Nikita for the bug report!
- Supported compilation with fmt 10.1.0. Thanks to Vladislav Nepogodin for the PRs!
- Fixed unused result warning. Thanks to Vladislav Nepogodin for the PR!
- Fixed use of deprecated API. Thanks to Vladislav Nepogodin for the PR!
- Fixed build with GCC-13 libstdc++. Thanks to Vladislav Nepogodin for the PR!
- Fixed MacOS Protobuf discovery. Thanks to Pavel Talashchenko for the PR!
- Fixed multiple other build warnings and issues.
Beta (August 2023)
- Deadline Propagation is now implemented and documented.
- Projects from Yandex Schools:
- Documentation was redesigned by hellenisaeva and MariaGrinchenko; new design was made up by Fedor Alekseev, fleshr, Anna Zagrebaylo, Michael Talalaev; the whole process was managed by Oleg Komarov with feedback from marketing specialist makachusha. Many thanks to all the participants for the great work.
- Implemented initial API for RFC 7616 - HTTP Digest Access Authentication, thanks to Almaz Shagiev, Konstantin Antoniadi, Ilya Golosov, and Niyaz for multiple PRs!
- std::bitset<N>, std::array<bool, N>, userver::utils::Flags<Enum> and integral values are now mapped to PostgreSQL bit and bit varying types. Thanks to dsaa27 and bshirokov for the PRs!
- Initial
Realmedium
sample was implemented and moved into a separate repository at userver-framework/realmedium_sample. Thanks to berholz, rumxcola, Konstantin Artemev, GasikPasik, Anna Volkova, Nikita Semenov, Daniil Boriskin, VVendor for the PR!
- Metrics for CPU usage of particular threads of task processors are now available via new engine::TaskProcessorsLoadMonitor component.
- gRPC and HTTP handler metrics were switched to utils::statistics::Rate, leading to better handling of service start/stop by metrics storage.
- server::Server now returns HTTP header "Content-Type: application/octet-stream" if the content type was not set.
- Implemented
ToString(utils::StrongTypedef<floating point>)
, thanks to Daniil Shvalov for the PR.
- Optimizations:
- Signifiacally optimized JSON DOM access to a non-existing element.
- Logging now does not lock a mutex in fs-task-processor on each log record.
- Up to 3 times faster logging due to multiple minor tweaks with data copy and memory prereserving.
- The new asynchronous engine::io::sys::linux::Inotify driver for Linux allows subscriptions to filesystem events. Thanks to it the fs::FsCacheClient now reacts faster.
- Docs:
- Build:
- Dropped spdlog dependency
- CPM library is now used for managing third-party dependencies.
- Fixed cryptopp compilation error, thanks to Daniil Shvalov for the PR!
- Fixed -Wsign-conversion -Wctad-maybe-unsupported warnings in utils::TrivialBiMap, thanks to darktime78 for the PR!
Beta (July 2023)
- server::http::CustomHandlerException now allows to provide a custom HTTP status that is not mapped to protocol-agnostic server::handlers::HandlerErrorCode.
- Non-coroutine
userver-universal
CMake target was refactored and is now used by the whole framework as a basic dependency. Compile times dropped down drastically for building the whole framework from scratch.
- Added a non-coroutine usage example Non-Coroutine Console Tool.
- It is now possible to subscribe to
SIGUSR1
and SIGUSR2
in the same class. Thanks to Beshkent for the bug report.
- Dynamic config management commands were added to
uctl
tool.
- Optimizations:
- storages::redis::SubscribeClient subscriptions were optimized to do less dynamic allocations on new message and use a faster lock-free queue.
- Escaping of tags for logging is now done at compile-time by default, which gives up to 30% speedup in some cases.
- Internal asynchronous logging logic was rewritten, leading to better scalability and more than 25% speedup.
- HTTP client connection is now preserved on deadline, leading to less connections being reopened.
- Cleaned up and added docs for redis::CommandControl.
- MacOS build instructions were enhanced, thanks to Daniil Shvalov for the PR!
- Conan build was fixed, thanks to Yuri Bogomolov for the PR.
- Numerous build and configure fixes.
Beta (June 2023)
- Static configs of the service now can retrieve environment variables via the
#env
syntax. See yaml_config::YamlConfig for more examples.
- New testsuite plugins userver_config_http_client and userver_config_testsuite_support turned on by default to increase timeouts in tests and make the functional tests more reliable.
- gRPC now can write access logs, see
access-tskv-logger
static option of ugrpc::server::ServerComponent.
- Now the waiter is allowed to destroy the engine::SingleConsumerEvent immediately after exiting WaitForEvent, if the wait succeeded.
- New dynamic_config_fallback_patch fixture could be used to replace some dynamic config values specifically for testsuite tests.
- Fixed utils::SmallString tests, thanks to Chingiz Sabdenov for the PR!
- Optimizations:
- Counters in the tasks were optimized. New thread local counters use less CPU and scale better on huge amounts of coroutines.
- engine::TaskProcessor optimized layout with interference shielded atomics uses less CPU and scales better on huge amounts of coroutines.
- Minor optimizations for HTTP clients URL manipulations.
- tracing::Span generation of ID was made faster.
- clients::http::Request now does less atomic counters increments/decrements while the request is being built.
mlock_debug_info
static configuration option of components::ManagerControllerComponent is now on by default. It improves responsiveness of the service under heavy load on low memory and bad hard drives.
- engine::io::Socket now has an additional
SendAll
overload that accepts const struct iovec* list, std::size_t list_size
for implementing low-level vector sends. Mongo driver now uses the new function, resulting in smaller CPU and memory consumption.
- clients::http::Form::AddContent now instead of
const std::string&
parameters accepts std::string_view
parameters that allow to copy less data.
- Docs and diagnostics:
- Build:
- Multiple build fixes for gRPC targets.
- Clickhouse for Conan was added, thanks to Anton for the PR.
- CMake build flag
USERVER_FEATURE_UBOOST_CORO
can be used to use system boost::context.
Beta (May 2023)
- New scripts/uctl/uctl console script for administration of the running service was added.
- Improved compile times by removing multiple includes from userver headers including templating the serializers of different formats.
- Implemented ugrpc::server::HealthComponent handler, a gRPC alternative to server::handlers::Ping.
- gRPC server and clients now support middlewares - a customization plugins that could be shared by different handlers.
- Invalid implementations of CacheUpdateTrait::Update are now detected and logged.
- Optimizations:
- Significant improvements in HTTP handling due to new http::headers::HeaderMap usage instead of std::unordered_map.
- Improved performance of utils::TrivialBiMap by an order of magnitude for enum-to-enum mappings, thanks to Vlad Tytskiy for the bug report!
- utils::FromString now uses std::from_chars for better performance.
- TESTPOINT and other testpoint related macro now imply zero overhead if testpoints were disabled in static config.
- More functions of formats::json::ValueBuilder now accept std::string_view, resulting in less std::string constructions and better performance.
- TSKV escaping was optimized via SIMD, resulting in up to x10 speedup on long logs.
mlock_debug_info
static configuration option of components::ManagerControllerComponent now allows to lock exception unwinding information in memory. It improves responsiveness of the service under heavy load on low memory and bad hard drives.
- Docs:
- Build:
- Arch Linux instructions were improved, thanks to Kirill Zimnikov for the PR!
- Fixed Conan based builds, thanks to Anton for the PR.
- Clickhouse-cpp version was raised to 2.4.0, thanks to Kirill Zimnikov for the PR!
- Fixed build on libstdc++ from GCC-13, thanks to Kirill Zimnikov for the PR!
- Fixed benchmarks build on non x86 targets.
- Rewrite of Protobuf and gRPC locating logic.
Beta (April 2023)
- MySQL driver was added, see MySQL Driver - EXPERIMENTAL.
- Experimental support for HTTP "Baggage" header is implemented, including verification, forwarding from HTTP handlers to client, baggage manipulation. See baggage::BaggageManagerComponent for more info.
- Redis driver now supports non-queued variants for pubsub.
- Redis driver now supports read-only transactions.
- utils::FilterBloom was merged in along with initial SLRU cache implementations. The work is a part of the backend development school course project by Leonid Faktorovich, Alexandr Starovoytov, Ruslan, Egor Chistyakov from PR #262.
- HTTP request decompression is now ON by default in server::handlers::HandlerBase.
- dynamic_config::Source now allows subscribing to a particular dynamic config variable changes.
- Initial support for utils::statistics::Rate metrics type.
- Human-readable "pretty" format (utils::statistics::ToPrettyFormat) for metrics output was added to the server::handlers::ServerMonitor.
- Optimizations:
- Don't issue tail
writev
for empty io_vec
on bulk socket writes.
- All the userver metrics are now written via the fast utils::statistics::Writer.
- x2-x50 faster serialization of unique maps into formats::json::ValueBuilder.
- utils::StrIcaseHash became slightly faster.
- engine::Task now does not have a virtual destructor. New engine::TaskBase based hierarchy does not use RTTI, resulting in smaller binaries.
- Mongo driver does not capture stack traces in release builds in case of errors. The error path become slightly faster, server is more responsive in case of Mongo problems.
- Build:
- Improved support for Conan 2.0, many thanks to Anton for the PR.
.gitattributes
now handles line endings automatically for files detected as text. This simplifies WSL builds. Thanks to Anatoly Shirokov for the PR.
- PostgreSQL libs selection is now possible in CMake if the platform has multiple versions installed, see PostgreSQL versions for more info.
- Improved support for Arch Linux, many thanks to Konstantin Goncharik for the PR.
- Multiple improvements for docs, including mockserver clarifications from Victor Makarov.
Beta (March 2023)
- Now logging of particular lines could be controlled by dynamic config. See USERVER_LOG_DYNAMIC_DEBUG for more info.
- HTTP headers that contain the tracing context now could be customized, both for handlers and HttpClient, by feeding tracing::TracingManagerBase implementation into tracing::DefaultTracingManagerLocator (docs to come soon).
- User defined literals for different formats are now available at formats::literals
- Added crypto::CmsSigner and crypto::CmsVerifier as per RFC 5652.
- cache::LruMap and cache::LruSet now work with non-movable types.
- BSON<>JSON conversions now supported via json_value.ConvertTo<formats::bson::Value>() and bson_value.ConvertTo<formats::json::Value>().
- engine::CancellableSemaphore was implemented.
- Optimizations:
- Mongo driver switched to a faster utils::statistics::Writer.
- utils::Async functions now make 1 dynamic allocation less, thanks to Ivan Trofimov for the PR.
- Getting the default logger now takes only a single atomic read. LOG_* macro now do two RMW atomic operations less and do not use RCU, that could lead to a dynamic memory allocation in rare cases.
- PostgreSQL driver now does much less atomic operations due to wider usage of std::move on the internal std::shared_ptr.
- Added storages::postgres::Transaction::ExecuteDecomposeBulk function for fast insertion of C++ array of structures as arrays of values.
- Str[I]caseHash now uses a 5-10 times faster SipHash13
- Redis driver now does an asynchronous DNS resolving, amount of heavy system calls dropped down noticeably.
- Build changes:
- CMake option
USERVER_OPEN_SOURCE_BUILD
was removed as the build is always the same for in-house and public environments.
- CMake option
USERVER_FEATURE_SPDLOG_TCP_SINK
was removed as now the implementation of the sink does not rely on spdlog implementation.
- Configuration step was made much faster.
- Makefile was simplified and only up-to-date targets were left.
- Added a script to prepare docker build, see Docker for userver for more info.
- Scripts for generating CMakeLists were simplified and cleared from internal stuff.
- Added missing dependencies to scripts/docs/en/deps_ubuntu_.md20_04 and sorted all the dependencies, thanks to Anatoly Shirokov for the PR.
- Statistics and metrics now do additional lifetime checks in debug builds to catch improper usages.
- Push functions of concurrent::MpscQueue and other queues now have a
[[nodiscard]]
for compile time misuse detection.
- Significant improvement of Redis server-side errors diagnostic.
- Improved diagnostics for distributed locking.
- Fixed numerous typos in docs and samples.
Beta (February 2023)
- tracing::Span now logs the location where it was constructed.
- Now the string<>enum utils::TrivialBiMap mappings could be used within storages::postgres::io::CppToUserPg. See uPg: Mapping a C++ enum to PostgreSQL enum type. for more info.
- components::Logging now provides options for configuring the task processors to do the asynchronous logging.
- Redis driver now supports the
geosearch
and unlink
commands.
- DNS resolvers were switched to asynchronous mode by default.
- UDP chaos proxy was implemented, see chaos.UdpGate
- C++ Standard now could be explicitly controlled via the CMake flag
CMAKE_CXX_STANDARD
.
- Optimizations:
- Many metrics were moved to a faster utils::statistics::Writer.
- gRPC now allows concurrent execution of 1 Read and 1 Write on the same Bidirectional stream.
- Python dependencies for build are now automatically installed, thanks to Pavel Shuvalov for the PR!
- Added a Conan option to disable LTO, thanks to Oleg Burchakov for the PR!
- Diagnostic messages and docs were improved, including:
- In case of a typo in static config name the fixed name is now reported
error-injection
static option for components::Postgres was documented
- Fixed typos, thanks to Ch0p1k3 for the PR!
Beta (January 2023)
- Unknown/mistyped values in static configs are now reported by default. Static configs validation now could use
minimum
and maximum
.
- gRPC clients now have ReadAsync() functions, that return a future and allow to request multiple results from different RPCs at the same moment.
- ugrpc::server::Server now can return a vector of gRPC service names.
- To aid in asynchronous drivers development the engine::io::FdPoller is now a part of the public API.
- Added a blazing fast utils::TrivialBiMap.
- HTTP Streaming is now considered production ready, see HTTP, HTTPS, WebSocket for docs.
- Testsuite fixtures were improved:
- Optimizations:
- Now the engine does less random number generator invocations for HTTP handling.
- Logging of tracing::Span became x2 faster
- IntrusiveMpscQueue is now used for engine internals, IO operations now schedule faster.
- Writing HTTP headers became faster, thanks to Ivan Trofimov for the PR.
- utils::TrivialBiMap is now used wherever it is possible.
- Metrics:
- FreeBSD build fixes.
- Multiple documentation and diagnostics improvements.
- Added
ToStringView(HttpMethod)
function, thanks to Фёдор Барков for the PR.
- Added more engine::Yield tests, thanks to Ivan Trofimov for the PR.
Beta (December 2022)
- Added logs colorization to the testsuite plugins, thanks to Victor Makarov for the PR.
- Multiple big improvements in framework testing:
- improved unit tests re-entrance
- multiple new chaos and metrics tests
- improved testsuite diagnostics
- Added a Custom Authorization/Authentication via PostgreSQL sample.
- Added an option
set_tracing_headers
to disable HTTP tracing headers, thanks to Ivan Trofimov for the PR.
- Fixed race in RabbitMQ sample, thanks to Ivan Trofimov for the PR.
- Fixed PostgreSQL testing at GithubCI, thanks to Ivan Trofimov for the PR.
Beta (November 2022)
Beta (October 2022)
- Experimental support for Conan packaging, many thanks to Anton for the PR.
- Prometheus and Graphite metrics formats were added, see Service Statistics and Metrics (Prometheus/Graphite/...) for details.
- Initial support for chaos testing was added, see Chaos Testing for more info.
- Generic Escape implementation for ranges was added to Clickhouse, thanks to Ivan Trofimov for the PR.
- TLS/SSL support for Redis.
- Multiple optimizations from Ivan Trofimov:
- utils::datetime::WallCoarseClock and its usage in the framework core;
- HTTP "Date" header caching;
- Significant reduction of syscalls count during any recv operations;
- Server::GetRequestsView not initialized if it is not required;
- utils::encoding::ToHex became faster;
- Marking response as ready became faster.
- Better diagnostics for CoroPool initialization failure, thanks to Ivan Trofimov for the PR.
- New handler server::handlers::OnLogRotate.
- Multiple optimizations, including:
- Faster async cancellations for PostgreSQL;
- Avoid using dynamic_cast in multiple places;
- Avoid calling
std::chrono::steady_clock::now()
in multiple places.
- gRPC mockserver support (see gRPC client and service).
- gRPC now provides an efficient API for async execution of requests without additional
utils::Async
invocations.
- Build fixes for older platforms, thanks to Yuri Bogomolov for the PR.
- components::Logging now can output logs to UNIX sockets.
- Now the "help wanted" issues at github have additional tags "good first issue" and "big", to help you to choose between a good starting issue and a big feature. See Releases, Trunk-based Development and Pull Requests for more info.
Beta (September 2022)
- Ivan Trofimov implemented the RabbitMQ driver.
- Added navigation to the next and previous page in docs, thanks to multiple feature requests in Telegram support chat.
- Improved Task::Detach docs and added recommendation to use concurrent::BackgroundTaskStorage instead, thanks to Ivan Trofimov for the bugreport.
- Added
start-
targets for the samples, to simplify experimenting with them.
- Docs now support dark theme out of the box.
- Fixed CMake issue with
-DUSERVER_FEATURE_TESTSUITE=0
, thanks to Георгий Попов for the bugreport.
- Fixed build on Arch Linux, thanks to Mikhail K. for the bugreport.
- Fixed building in virtual environment on Windows, thanks to sabudilovskiy for the bug report.
- Fixed building with
-std=gnu++20
, thanks to Георгий Попов for the PR.
- Improved package version detection in CMake via
pkg-config
.
- Added a
USERVER_FEATURE_UTEST
flag for disabling utest and ubench target builds, thanks to Anton for the PR.
- Simplified gRPC component registration and usage.
- Added an ability to turn on gRPCs ChannelZ.
- Added evalsha/script load commands for Redis driver.
Beta (August 2022)
- Added server::handlers::HttpHandlerStatic handler to serve static pages.
- Added navigation to previous and next page in docs.
- Optimized internals:
- WaitListLight now never calls std::this_thread::yield().
- More lightweight queues are now used in HTTP server.
- Smaller critical section in TaskContext::Sleep(), improved performance for many the synchronization primitives.
- std::unique_ptr now holds the payload in engine::Task, rather than std::shared_ptr. Thanks to the Stas Zvyagin for the idea and draft PR.
- Simplified and optimized FdControl, resulting in less CPU and memory usage for sockets, pipes and TLS.
- Fixed typos in tests, thanks to Георгий Попов for the PR.
- Removed suspicious operator, thanks to the PatriotRossii for the bugreport.
- Fixed CentOS 7.8 builds, many thanks to jinguoli for the bugreport and fix ideas.
- Fixed Gentoo builds, many thanks to SanyaNya for the PR.
- Fixed default DB values in uservice-dynconf, many thanks to skene2321 for the bugreport.
- Added engine::io::WritableBase and engine::io::RwBase, thanks to Stas Zvyagin for the idea.
- Added components::TcpAcceptorBase with new tutorials TCP half-duplex server with static configs validation and TCP full-duplex server with metrics and Spans, thanks to Stas Zvyagin for the idea and usage samples at https://github.com/szvyagin-gj/unetwork.
- Fixed comparison operator for UserScope, thanks to PatriotRossii for the PR.
- Add CryptoPP version download during CryptoPP installation, thanks to Konstantin for the PR.
- Added more documentation on Non FIFO queues, thanks to Ivan Trofimov for the report.
- Added missing std::atomic into TaskProcessor, thanks to Ivan Trofimov for the report.
- Fixed Boost version detection on MacOs, thanks to Konstantin for the PR.
- Added Fedora 36 support, thanks to Benjamin Conlan for the PR.
- Improved statistics for gRPC.
- Vector versions of engine::io::Socket::SendAll were added and used to optimize CPU and memory consumption during HTTP response sends.
Pre announce (May-Jul 2022)
- Fixed engine::io::TlsWrapper retries, thanks to Ivan Trofimov for the report.
- Fixed missing
const
in utils::DaemonMain function, thanks to Denis Chernikov for the PR.
- Cmake function
userver_testsuite_add
now can pass arguments to virtualenv
, thanks to Дмитрий Изволов for the PR.
- Improved hello_service run instruction, thanks to Svirex for the PR.
- Better Python3 detection, thanks to Дмитрий Изволов for the PR.
- Task processors now have an
os-scheduling
static config option and @md_en_userver_task_processors_guide "a usage guide".
- Added a pg_service_template service template that uses userver the userver framework with PostgreSQL
- In template services, it is now possible to deploy the environment and run the service in one command:
make service-start-debug
or make service-start-release
.
- Added userver::os_signals::Component, which is used for handling OS signals.
- You can now allow skipping the component in the static config file by specializing the components::kConfigFileMode, see the documentation.
- The PostgreSQL driver now requires explicit serialization methods when working with enum.
- Optimized CPU consumption for handlers that do not log requests or responses.
- utils::Async() now can be invoked from non-coroutine thread (in that case do not forget to use engine::Task::BlockingWait() to wait for it). tracing::Span construction became faster. Thanks to Ivan Trofimov for the report.
- Improved MacOS support, thanks to Evgeny Medvedev.
- Docker support: base image for development, docker-compose.yaml for the userver with build and test targets. See Configure and Build
- Docs improved: removed internal links; added Feature Comparison with other Frameworks, Supported Platforms, Security Changelog, Profiling context switches, Driver Writing Guide, @md_en_userver_task_processors_guide, Handling OS signals and Roadmap and Changelog.
- AArch64 build supported. Tests pass successfully
- HTTP headers hashing not vulnerable to HashDOS any more, thanks to Ivan Trofimov for the report.
- engine::WaitAny now can wait for engine::Future, including futures that are signaled by engine::Promise from non-coroutine environment.
- Optimized the PostgreSql driver, thanks to Dmitry Sokolov for the idea.
- Arch Linux is now properly supported, thanks to Denis Sheremet and Konstantin Goncharik.
- Published a service to manage dynamic configs of other userver-based services.
- Now it is possible to enable logging a particular LOG_XXX by its source location, see server::handlers::DynamicDebugLog for more details.
- Added a wrapper class utils::NotNull and aliases utils::UniqueRef and utils::SharedRef.
- LTSV-format is now available for logs via components::Logging static option