Skip to content

sequoiar/OpenSynapse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Open Synapse

What is Open Synapse?
Open Synapse is an Async Task Server. Basically, the server application handles communication between task routines.

What is Task Routine?
A task routine is a simple client socket application/script called by a unique name. Open Synapse delivers messages by that unique name. You can write your task routines in any language which supports network sockets.

What is Key-based Task Routine?
Open Synapse supports distributed task management. By default, server chooses one of those distributed tasks randomly but sometimes tasks may need specific selection. As in memory cache applications, key-based selection is a highly recommended distribution method.

Installation & Setup:
To run Open Synapse, you need these libraries:
- gevent (http://gevent.org)
- ujson (https://github.com/jskorpan/ultrajson)

to install:
$git clone git@github.com:MrGoodbyte/OpenSynapse.git

to run:
$python server.py

Note: You can modify PORT information in config.py file.

Tasks:
You can find a sample task in tasks folder. There is also another example to understand how to use key-based load balancing. That example provides really fast and simple memory cache.
Update: I added a new task routine called Distributed Session.

Example Transactions:
{“c”:”reg”, “p”:{“n”:”my-task”}}
{“c”:”reg”, “p”:{“n”:”my-key-based-task”, “k”:true}}
{“c”:”cll”, “p”:{“n”:”my-task”, “d”:{“id”:5}}}
{“c”:”cll”, “p”:{“n”:”my-key-based-task”, “d”:{“k”:”my-key”}}}