Giter Site home page Giter Site logo

ocurero / asyncoro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pgiri/asyncoro

0.0 1.0 0.0 1.33 MB

Python framework for asynchronous, concurrent, distributed, network programming with coroutines

License: MIT License

Python 92.14% CSS 0.90% JavaScript 0.42% HTML 6.54%

asyncoro's Introduction

asyncoro

asyncoro is a Python framework for asynchronous, concurrent, distributed programming with coroutines, asynchronous completions and message passing.

Unlike with other asynchronous frameworks, programs developed with asyncoro have same logic and structure as programs with threads, except for a few syntactic changes - mostly using yield with asynchronous completions that give control to asyncoro's scheduler, which interleaves executions of coroutines, similar to the way an operating system executes multiple processes. In addition, asyncoro has many additional features, including message passing for communication, distributed computing/programming etc.

Unlike threads, creating processes (coroutines) with asyncoro is very efficient. Moreover, with asyncoro context switch occurs only when coroutines use yield (typically with an asychronous call), so there is no need for locking and there is no overhead of unnecessary context switches.

asyncoro works with Python versions 2.7+ and 3.1+. It has been tested with Linux, Mac OS X and Windows; it may work on other platforms, too.

Features

  • No callbacks or event loops! No need to lock critical sections either,
  • Efficient polling mechanisms epoll, kqueue, /dev/poll, Windows I/O Completion Ports (IOCP) for high performance and scalability,
  • Asynchronous (non-blocking) sockets and pipes, for concurrent processing of I/O,
  • SSL for security,
  • Asynchronous locking primitives similar to Python threading module,
  • Message passing for (local and remote) coroutines to exchange messages one-to-one with Message Queue Pattern or through broadcasting channels with Publish-Subscribe Pattern,
  • Location transparency with naming and locating (local and remote) resources,
  • Distributing computation components (code and data) for execution of distributed communicating processes, for wide range of use cases, covering SIMD, MISD, MIMD system architectures at the process level, web interface to monitor cluster/application status/performance; in-memory processing, data streaming, real-time (live) analytics and cloud computing are supported as well,
  • Monitoring and restarting of (local or remote) coroutines, for fault detection and fault-tolerance,
  • Hot-swapping of coroutine functions, for dynamic system reconfiguration,
  • Thread pools with asynchronous task completions, for executing (external) synchronous tasks, such as reading standard input.

Dependencies

asyncoro is implemented with standard modules in Python.

If psutil is available on nodes, node availability status (CPU, memory and disk) is sent in status messages, and shown in web browser so node/application performance can be monitored.

Under Windows efficient polling notifier I/O Completion Ports (IOCP) is supported only if pywin32 is available; otherwise, inefficient select notifier is used.

Installation

To install asyncoro, run:

python -m pip install asyncoro

Authors

  • Giridhar Pemmasani

Links

asyncoro's People

Contributors

pgiri avatar ocurero 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.