Giter Site home page Giter Site logo

edisonqkj / seastar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scylladb/seastar

0.0 2.0 0.0 7.62 MB

High performance server-side application framework

Home Page: http://seastar-project.org

License: Apache License 2.0

CMake 7.29% C++ 86.51% Ragel 0.37% Python 4.54% Shell 1.27% Dockerfile 0.02%

seastar's Introduction

Seastar

Travis Build Status Version License: Apache2 n00b issues

Introduction

SeaStar is an event-driven framework allowing you to write non-blocking, asynchronous code in a relatively straightforward manner (once understood). It is based on futures.

Building Seastar

For more detailed instructions, read HACKING.md.

Configuring Seastar via

./cooking.sh -r dev

will create a localized development environment specific to Seastar by downloading, compiling, and installing all dependencies of the library.

The build type defaults to Debug and can be changed with the -t option. These include the common cmake ones (Debug, RelWithDebInfo, Release, etc), but there are a few peculiarities in Seastar:

  • Debug includes sanitizers
  • All build modes enable asserts
  • There is a Dev build. It has no debug information nor sanitizers and just minimum optimizations. The objective is to build quickly

It is convenient to have multiple build directories and alternate between them depending on what is being done.

$ ./cooking -r dev -d build-dev -t Dev     # Use for quick edit-compile-test cycle
$ ./cooking -r dev -d build-dbg -t Debug   # Use to run gdb
$ ./cooking -r dev -d build-rel -t Release # Use to benchmark

You can then compile:

$ cd build
$ ninja

Alternatively, system packages (via RPM or APT packages, for example) can be used to supply dependencies as well. There are distribution-specific instructions for Fedora, CentOS and Ubuntu. In general, the install-dependencies.sh will attempt to install all necessary packages for your distribution.

There are also instructions for building on any host that supports Docker.

Use of the DPDK is optional.

Using C++17

Seastar can be built with the C++17 dialect by supporting compilers, conditional on the Seastar_CXX_DIALECT CMake variable being set to "gnu++17".

However, by default Seastar uses C++14-compatible types such as std::experimental::optional<> or boost::variant, both internally and in its public API, thus forcing them on C++17 projects. To fix this, Seastar respects the value of the preprocessor variable SEASTAR_USE_STD_OPTIONAL_VARIANT_STRINGVIEW, which changes those types to their stdlib incarnation, and allows seemless use of C++17. Usage of this option requires an updated compiler, such as GCC 8.1.1-5 on Fedora.

Getting started

There is a mini tutorial and a more comprehensive one.

The documentation is available on the web.

Resources

Ask questions and post patches on the development mailing list. Subscription information and archives are available here, or just send an email to [email protected].

Information can be found on the main project website.

File bug reports on the project issue tracker.

The Native TCP/IP Stack

Seastar comes with its own userspace TCP/IP stack for better performance.

Recommended hardware configuration for SeaStar

  • CPUs - As much as you need. SeaStar is highly friendly for multi-core and NUMA
  • NICs - As fast as possible, we recommend 10G or 40G cards. It's possible to use 1G too but you may be limited by their capacity. In addition, the more hardware queue per cpu the better for SeaStar. Otherwise we have to emulate that in software.
  • Disks - Fast SSDs with high number of IOPS.
  • Client machines - Usually a single client machine can't load our servers. Both memaslap (memcached) and WRK (httpd) cannot over load their matching server counter parts. We recommend running the client on different machine than the servers and use several of them.

seastar's People

Contributors

avikivity avatar tgrabiec avatar gleb-cloudius avatar amnonh avatar asias avatar nyh avatar pdziepak avatar duarten avatar syuu1228 avatar raphaelsc avatar vladzcloudius avatar denesb avatar bhalevy avatar tchaikov avatar argenet avatar elcallio avatar espindola avatar slivne avatar erichkeane avatar emaxerrno avatar yuyuyu101 avatar mundaym avatar markw77 avatar lifanxi avatar javeme avatar dorlaor avatar ultrabug avatar amoskong avatar penberg avatar yurai007 avatar

Watchers

James Cloos avatar Edison Qian 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.