Git Product home page Git Product logo

crackercat / userver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from userver-framework/userver

0.0 0.0 0.0 121.91 MB

The C++ Asynchronous Framework (beta)

Home Page: https://userver-framework.github.io/userver

License: Apache License 2.0

Shell 0.28% JavaScript 1.02% C++ 94.19% Python 1.39% C 0.85% Assembly 0.45% CSS 0.09% Makefile 0.03% HTML 0.18% CMake 1.16% SWIG 0.08% Jinja 0.27%

userver's Introduction

userver

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 InsertKey(storages::postgres::ClusterPtr pg, std::string_view key) {
    // Asynchronous execution of the SQL query. Current thread handles other
    // requests while the response from the DB is being received:
    auto res = pg->Execute(storages::postgres::ClusterHostType::kMaster,
                           "INSERT INTO key_table (key) 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.

Other Features

  • Efficient asynchronous drivers for databases (MongoDB, PostgreSQL, Redis, ...) and data transfer protocols (HTTP, GRPC, TCP, ...), 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.

userver's People

Contributors

alexiprof avatar andrewlanin avatar anton3 avatar apolukhin avatar axolm avatar dengaleev avatar dmitriysud avatar firsov179 avatar georgthegreat avatar iliayar avatar itrofimow avatar littleboyjohnny avatar nul1 avatar segoon avatar vitek avatar xrengine512 avatar zmij avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.