Paul Krill
Editor at Large

Async C++ framework aims for easier microservices

news
Aug 1, 20222 mins

Userver, currently in beta, promises to solve the problem of efficient I/O interactions transparently for C++ developers.

binary target
Credit: Violka08 / Getty Images

C++ developers can get an assist in building asynchronous microservices, with a new open source framework intended to solve the problem of efficient I/O interactions.

Called Userver, the asynchronous framework offers a set of abstractions for “fast and comfortable” creation of C++ microservices, services, and utilities, according to the project’s GitHub repo. The project is currently in beta.

Userver promises to solve the issue of efficient I/O transactions transparently for developers. The developers behind the the framework say it offers the speed of C++,  the simplicity of Python, and the coroutine model of Go. With Userver, operations that normally suspend the thread of execution do not do so; instead, the thread processes other tasks and returns to the handling of the operation only when it is guaranteed to execute immediately.

Developers get straightforward source code and avoid CPU-consuming context switches from the OS, while efficiently utilizing the CPU with a small number of execution threads, the project states. Other features of the Userver framework include:

  • A set of high-level components for caches, distributed locking, JSON/YAML/BSON, logging, metrics, statistics, and tasks.
  • The ability to perform on-the-fly service configuration changes.
  • A comprehensive set of asynchronous and low-level synchronization primitives and OS abstractions.
  • Asynchronous drivers for MongoDB, Postgres, Redis, and other databases. 
  • Asynchronous drivers for data transfer protocols including HTTP, GRPC, and TCP, and for for tasks including construction and cancellation.

A July 29 bulletin announcing the beta of Userver emphasizes the simplicity of the Userver development process, claiming even interns and students can write and deploy to production a new microservice in just a week. The bulletin notes that issues including errors with multithreading are caught at compile time. Documentation for userver can be found at userver.tech. The framework is published under an Apache 2.0 license.

The beta of Userver follows closely revelations of a potential successor to C++, a language called Carbon. Carbon is currently in an experimental phase.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author