All Projects → nikoloss → pyfadeaway

nikoloss / pyfadeaway

Licence: other
python RPC module

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pyfadeaway

future.scala
Stack-safe asynchronous programming
Stars: ✭ 38 (+26.67%)
Mutual labels:  asynchronous
esa-httpclient
An asynchronous event-driven HTTP client based on netty.
Stars: ✭ 82 (+173.33%)
Mutual labels:  asynchronous
ssdp-client
The most lightweight asynchronous Java SSDP (Simple Service Discovery Protocol) Client
Stars: ✭ 46 (+53.33%)
Mutual labels:  asynchronous
Rump
REST client for Java that allows for easy configuration and default values. Allows for quick request construction and a huge range of modifications by using response/request interceptors, adjusting default values related to HTTP requests and creating custom instances for when you need multiple API connection setups.
Stars: ✭ 55 (+83.33%)
Mutual labels:  asynchronous
debugging-async-operations-in-nodejs
Example code to accompany my blog post on debugging async operations in Node.js.
Stars: ✭ 22 (-26.67%)
Mutual labels:  asynchronous
venusscript
A dynamic, interpreted, scripting language written in Java.
Stars: ✭ 17 (-43.33%)
Mutual labels:  asynchronous
futures-extra
Java library for working with Guava futures
Stars: ✭ 131 (+336.67%)
Mutual labels:  asynchronous
logtoes
Demo of Asynchronous pattern (worker) using Python Flask & Celery
Stars: ✭ 49 (+63.33%)
Mutual labels:  asynchronous
AsyncSuffix
Asynchronous methods naming checker for ReSharper
Stars: ✭ 19 (-36.67%)
Mutual labels:  asynchronous
fetch-action-creator
Fetches using standardized, four-part asynchronous actions for redux-thunk.
Stars: ✭ 28 (-6.67%)
Mutual labels:  asynchronous
promise4j
Fluent promise framework for Java
Stars: ✭ 20 (-33.33%)
Mutual labels:  asynchronous
RunAll
This is a library for running the concurrent processing using only native Google Apps Script (GAS).
Stars: ✭ 55 (+83.33%)
Mutual labels:  asynchronous
asynckivy
async library for Kivy
Stars: ✭ 56 (+86.67%)
Mutual labels:  asynchronous
PandaDemo
Demo project for asynchronous render and Layout framework Panda
Stars: ✭ 15 (-50%)
Mutual labels:  asynchronous
dialectic
Transport-polymorphic, asynchronous session types for Rust
Stars: ✭ 60 (+100%)
Mutual labels:  asynchronous
zab
C++20 liburing backed coroutine executor and event loop framework.
Stars: ✭ 54 (+80%)
Mutual labels:  asynchronous
cashews
Cache with async power
Stars: ✭ 204 (+580%)
Mutual labels:  asynchronous
spellbook
Functional library for Javascript
Stars: ✭ 14 (-53.33%)
Mutual labels:  asynchronous
FastAPI-template
Feature rich robust FastAPI template.
Stars: ✭ 660 (+2100%)
Mutual labels:  asynchronous
AsyncIterator
An asynchronous iterator library for advanced object pipelines in JavaScript
Stars: ✭ 43 (+43.33%)
Mutual labels:  asynchronous

The PyFadeaway module

Introduction

Pyfadeaway is a multi-task RPC module also easy to use. You can build distributed application based on a good performance RPC framwork with minimal effort.
Pyfadeaway是一个基于多线程的RPC 的模块,它非常小巧,易读,易用。 你可以轻而易举的使用它来构建高性能的rpc应用

Installation

$> git clone https://github.com/nikoloss/pyfadeaway
$> cd pyfadeaway
$> sudo python setup.py install

Quick Start

server

# This is a server demo, it shows a simply way to export a function to the
# outside world by using a decorator, "export".
import time
from fadeaway.core import main
from fadeaway import server

rpc = server.RemoteSrv()

@rpc.export
class Demo(object):
    def hello(self, name):
        time.sleep(5)   # That will show how multi-threads work
        return "Hello, %s" % name

    def hi(self, name):
        return 'Hi, %s' % name

rpc.listen(9151)
main.IOLoop.instance().start()

sync-client

# Sync-Client
# The Client will work in a synchronous way

from fadeaway.client import ServerProxy
from fadeaway.client import Sync 

if __name__ == '__main__':
    ss = ServerProxy(Sync, 'localhost', 9151)
    h = ss.Demo()
    print h.hello('billy') # shall block
    print h.hello('rowland')
    print h.hi('lucy')

async-client

# Async-Client
# The Client will work in an asynchronous way which would not cause any 
# blocking calls which means you have to set callback function to every 
# remote function call
from fadeaway.client import ServerProxy
from fadeaway.client import Async

def callback(res, error=None):
    # Any raised exception will set to the parameter "error"
    print '[callback]', res

if __name__ == '__main__':
    ss = ServerProxy(Async, 'localhost', 9151)
    ss.deploy() # Start ioloop in another thread
    h = ss.Demo()
    h.hello('billy').then(callback, timeout=3) # set a callback, timeout 3 seconds
    h.hello('rowland').then(callback)
    h.hi('lucy').then(callback)

About Log

Just add "fadeaway" logging handler, set it to DEBUG level. it would log all the information that every request or response carries.

License

Due to benefit from zeromq, the PyFadeaway is licensed under the GNU Lesser General Public License V3 plus, respect.

Feedback

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].