GithubHelp home page GithubHelp logo

sisl's Introduction

SymbiosisLib (sisl)

This repo provides a symbiosis of libraries (thus named sisl - pronounced like sizzle) mostly for very high performance data structures and utilities. This is mostly on top of folly, boost, STL and other good well known libraries. Thus its not trying to replace these libraries, but provide a layer on top of it. In general there are 3 variations of these libraries

  • Libraries which are higher performing than standard libraries for specific use cases
  • Libraries which wrap existing library to provide simplistic view or use cases
  • Libraries that fill any missing gaps.

Following are the tools it provides so far

Whats in this library

Async HTTP Server

Provides an HTTP REST Server for asynchronous programming model. It works on top of evhtp library, but wraps threading model C++ methods for evhtp C library.

Metrics

A very high performance metrics collection (counters, histograms and gauges) and report the results in form of json or sent to prometheus whichever caller choose from. It is meant to scale with multiple threads and huge amount of performance metrics. The collection is extremely fast <<5ns per metric, but pay penalty during metrics result gathering which is rare. It uses Wisr framework which will be detailed next

Wisr

WISR stands for Waitfree Inserts Snoozy Rest. This is a framework and data structures on top of this framework which provides ultra high performance waitfree inserts into the data structures, but pretty slow read and update operations. It is thread safe and thus good use cases are to collect metrics, garbage collection etc, where one would want to quickly append the data into some protected list, but scanning them is few and far between. It uses RCU (Read side during insert and write side during other operations).

More details in the Wisr README under [src/wisr/README.md]

FDS

This is a bunch of data structures meant for high performance or specific use cases. Each of these structures are detailed in their corresponding source files. Some of the major data structures are

Bitset

A high performance bitset to have various functionalities to scan the contiguous 1s, 0s, set/reset multiple bits without iterating over every bit, ability to serialize/deserialize bitsets, atomically update concurrent bits, ability to dynamically resize and shrink. It has many functionalities which are not provided by std::bitset or boost::dynamic_bitset or folly::AtomicBitset

StreamTracker

Support a very popular pattern of tracking sequential entities, where key is an integer and value is any structure. It tracks consecutive completions of the key and sweep everything that are completed. It is an essential pattern seen in multiple stream processing and this container provides concurrent access without exclusive locks for all critical operations.

MallocHelper

To be able to use either tcmalloc or jemalloc and have consistent tunables across both the mallocs and metrics collections into prometheus.

ThreadBuffer

This is an enhanced version of per thread buffer, where the buffers are optionally tracked even after the thread exits till it is consumed. This pattern is essential to build reliable structures using Wisr framework.

VectorPool

Capture the vector in a pool in thread local fashion, so that vectors are not built from scratch everytime.

Settings Framework

Please refer to the README under [src/settings/README.md]

Installation

This is mostly header only library and can be just compiled into your code. There are some of the pieces which needs a library (libsisl) to be built.

With conan

Assuming the conan setup is already done

$ mkdir build
$ cd build

# Install all dependencies
$ conan install ..

# Build the libsisl.a
$ conan build ..

Without conan

To be Added

Contributing to This Project

We welcome contributions. If you find any bugs, potential flaws and edge cases, improvements, new feature suggestions or discussions, please submit issues or pull requests.

Contact Harihara Kadayam [email protected]

License Information

Copyright 2021 eBay Inc.

Primary Author: Harihara Kadayam Primary Developers: Harihara Kadayam, Rishabh Mittal, Bryan Zimmerman, Brian Szymd

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

sisl's People

Contributors

d2chau avatar hkadayam avatar jiankyu avatar raakella1 avatar soungupta avatar szmyd avatar xiaoxichen avatar yamingk 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.