Coder Social home page Coder Social logo

reactivemarkets / toolbox-cpp Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 18.0 207.35 MB

The Reactive C++ Toolbox is an open source library of C++20 components designed for efficient, asynchronous network applications on the Linux platform.

Home Page: https://reactivemarkets.github.io/toolbox-cpp/

License: Other

CMake 2.46% Shell 0.08% C++ 86.83% C 10.31% Perl 0.32%
backend cpp library linux low-latency networking reactive reactor

toolbox-cpp's People

Contributors

evilaffliction avatar fanzhao1986 avatar iakovs avatar itslifejim avatar markaylett avatar markjamesstevenson avatar markmcdowell avatar rfernandes avatar shivix avatar steverough avatar stiopaa1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

toolbox-cpp's Issues

Arm build broken by dec_digits4

The "%lu" format expects an argument of type "long unsigned int", but "int64_t" is an alias for "long long int" on ARM32 platforms.

Use type constructor on default from_string

The common case of TypeTraits::from_string should use the target type's constructor, this removes the need to specialize it for those that support String-type constructors, ex: Path.

Use C++20 <bit> header

Prefer C++20 bit header to endianess macros
Use std::countl_zero instead of __builtin_clzll.

Deprecate tuple funcs

With C++17 the tuple iteration functions can be replaced with std::apply and fold expression, therefore there is no need for custom code.

Extend thread config to include affinity

The ThreadConfig structure should be extended to include an isolcpus-style affinity mask, along with helper functions for parsing and setting thread affinity.

Add support for dns resolution

Implement support for dns request / response with the goal of allowing a asyncronous host -> ip resolution mechanism.

Add convenience headers

Add the following convenience headers:

  • toolbox/util.hpp
  • toolbox/sys.hpp
  • toolbox/io.hpp
  • toolbox/ipc.hpp
  • toolbox/net.hpp

These headers will simplify small examples, utilities and help new users unfamiliar with the code to get started.

DNS resolver crashes in GCC 9.1

GCC 9.1 exposed a dormant bug in the DNS resolver that causes the run loop to crash when clearing tasks from the queue. The crash was caused by accessing uninitialised elements of a local array.

Use C++20 three-way comparison

Implement "spaceship operator" where comparison operators were used
Refactor Compare functionality into new comparison operators.

Improve benchmark framework

Improve benchmark framework as follows:

  • add support for benchmarks that depend on non-trivial initialisation.
  • refactor and cleanup hdr files, so that they are more aligned with style guide.
  • move benchmark components to separate library.
  • move benchmark tests to separate directory.

Basic C++ HdrHistogram implementation

To avoid external dependencies, implement a pure C++ version of HdrHistogram.

The current goal includes only a subset of the features supported in the original version.

Remove epoll_create size hint

In the initial epoll_create() implementation, the size argument informed the kernel of the number of file descriptors that the caller expected to add to the epoll instance. Modern kernels no longer require this hint.

Add support for ASAN/TSAN

Both gcc and clang support Address and Thread sanitization builds.
Add those as cmake build types.

The hex_digits function is broken on ARM32 builds

Running 199 test cases...
toolbox/toolbox/util/Utility.ut.cpp(135): error: in "UtilitySuite/HexDigitsCase": check hex_digits(0x0) == 1 has failed [9 != 1]
toolbox/toolbox/util/Utility.ut.cpp(136): error: in "UtilitySuite/HexDigitsCase": check hex_digits(0x1) == 1 has failed [9 != 1]
toolbox/toolbox/util/Utility.ut.cpp(137): error: in "UtilitySuite/HexDigitsCase": check hex_digits(0xf) == 1 has failed [9 != 1]
toolbox/toolbox/util/Utility.ut.cpp(138): error: in "UtilitySuite/HexDigitsCase": check hex_digits(0x10) == 2 has failed [10 != 2]
toolbox/toolbox/util/Utility.ut.cpp(139): error: in "UtilitySuite/HexDigitsCase": check hex_digits(0xff) == 2 has failed [10 != 2]
toolbox/toolbox/util/Utility.ut.cpp(141): error: in "UtilitySuite/HexDigitsCase": check hex_digits(0xcdef) == 4 has failed [12 != 4]
toolbox/toolbox/util/Utility.ut.cpp(142): error: in "UtilitySuite/HexDigitsCase": check hex_digits(0x10000) == 5 has failed [13 != 5]
toolbox/toolbox/util/Utility.ut.cpp(143): error: in "UtilitySuite/HexDigitsCase": check hex_digits(0x89abcdef) == 8 has failed [16 != 8]
toolbox/toolbox/util/Utility.ut.cpp(145): error: in "UtilitySuite/HexDigitsCase": check hex_digits(0x567890abcdef) == 12 has failed [16 != 12]
toolbox/toolbox/util/Utility.ut.cpp(146): error: in "UtilitySuite/HexDigitsCase": check hex_digits(0x1000000000000) == 13 has failed [9 != 13]
Oct 08 06:43:14.661 NOTICE  [6857]: started resolver thread
Oct 08 06:43:14.662 NOTICE  [6857]: stopping resolver thread

*** 10 failures are detected in the test module "Master Test Suite"

Build and deploy Deb packages

Build Deb package using CPack and integrate with CircleCI, so that the package is deployed as a GitHub release artefact.

Our custom toolchain image uses:

  • Boost 1.67.0
  • Clang 7.0.1
  • GCC 8.3

We might be able to lower the requirements to 1.63.0, but I have not tried.

I don't reason any reason not to keep the RPM and, although we don't use it, it may have wider appeal.

Regarding CircleCI, I double-checked the YML file and it will upload all artefacts in build/dist, so it should work without change.

Improve socket option support

Add new on_sock_init lifecycle callback, so that applications are given an opportunity to set socket options such as SO_RCVBUF and SO_SNDBUF.

Generalise JSON exception format

Although the Exception class is designed to represent different kinds of exception, the current JSON format is quite specific to HTTP. The format should be generalised and brought more in line with the emerging OpenAPI standard.

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.