GithubHelp home page GithubHelp logo

edwardbetts / cotyledon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sileht/cotyledon

0.0 1.0 0.0 165 KB

Cotyledon provides a framework for defining long-running services.

License: Apache License 2.0

Python 98.56% Shell 1.44%

cotyledon's Introduction

Cotyledon

Latest Version Downloads https://travis-ci.org/sileht/cotyledon.png?branch=master

Cotyledon provides a framework for defining long-running services.

It provides handling of Unix signals, spawning of workers, supervision of children processes, daemon reloading, sd-notify, rate limiting for worker spawning, and more.

Why Cotyledon

This library is mainly used in OpenStack Telemetry projects, in replacement of oslo.service. However, as oslo.service depends on eventlet, a different library was needed for project that do not need it. When an application do not monkeypatch the Python standard library anymore, greenlets do not in timely fashion. That made other libraries such as Tooz or oslo.messaging to fail with e.g. their heartbeat systems. Also, processes would not exist as expected due to greenpipes never being processed.

oslo.service is actually written on top of eventlet to provide two main features:

  • periodic tasks
  • workers processes management

The first feature was replaced by another library called futurist and the second feature is superseded by Cotyledon.

Unlike oslo.service, Cotyledon have:

  • The same code path when workers=1 and workers>=2
  • Reload API (on SIGHUP) hooks work in case of you don't want to restarting children
  • A separated API for children process termination and for master process termination
  • Seatbelt to ensure only one service workers manager run at a time.
  • Is signal concurrency safe.
  • Support non posix platform, because it's built on top of multiprocessing module instead of os.fork
  • Provide functional testing

And doesn't:

  • facilitate the creation of wsgi application (sockets sharing between parent and children process). Because too many wsgi webserver already exists.

oslo.service being impossible to fix and bringing an heavy dependency on eventlet, Cotyledon appeared.

cotyledon's People

Contributors

jd avatar sileht avatar toabctl avatar

Watchers

 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.