Coder Social home page Coder Social logo

graft's Introduction

graft

An unopinionated asynchronous DAG DSL and executor built into Python.

Overview

Oftentimes, Python is not the core infrastructure powering large systems. At a certain point, Python buckles under its own weight; its runtime was simply not designed to allow for the control necessary for certain levels of load. Instead, if Python is used, it is used as a glue that binds together other components of the system. This shift signifies a switch from a CPU-bound workload to an IO-bound workload.

There are myriad existing approaches to extracting more performance out of IO-bound workloads in Python, like the built in asyncio, gevent, and others. In general, these approaches have one of two problems:

  • They require that you aggressively buy in to their specific async system

  • They provide insufficient structure, allowing programmers to create an inefficient program

graft attempts to address these issues for request/response-style programs by:

  • Structuring the API to allow for gradual rewrites; graphs are recursive structures where subgraphs are first class objects. Parts of the program can be rewritten as a self-contained graph and subsequently added to a larger graph as a migration continues.

  • Aggressively decoupling code from its execution order; many of the inefficiencies from IO-bound systems come from overhead encouraged by a procedural language. In practice programmers are often trying to describe a system of dependent IO operations. By offloading thework of scheduling an executing these operations, programmers can increase the parallelism of their IO waits.

Installation

This package is not on pip, sorry :(. I'll get around to it eventually.

$ git clone https://github.com/crockeo/graft
$ cd graft
$ pip install .

Contributing

We'll have more here soon, but:

  • probably use virtualenv! this is written on Python 3.8 and you might not want to install that on your system directly

  • please install pre-commit, and do pre-commit install in the repo directory

License

MIT Open Source

graft's People

Contributors

crockeo avatar

Watchers

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