GithubHelp home page GithubHelp logo

gleicon / restmq-appengine Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 108 KB

Rest Message Queue using JSON as protocol and HTTP as transport, appengine version

Home Page: http://zenmachine.wordpress.com

Python 100.00%

restmq-appengine's Introduction

RestMQ - Appengine version
Simple Message Queue which uses REST routes, HTTP as transport layer and JSON as payload/protocol.
This one can be seen running at http://jsonqueue.appspot.com.
Protocol is simple and uses an API Key.
There is a twisted/redis version too somewhere.

-- Quick Howto -----

http://jsonqueue.appspot.com/admin
create your API Key and save it. You may regenerate it later.

{
	"cmd": "add",
	"queue": "genesis",
        "value": "abacab",
        "apikey":"your-api-key"
}

{
	 "cmd": "add",
	 "queue": "genesis",
	 "value": "turn it on",
         "apikey":"your-api-key"
}

{
	 "cmd": "add",
	 "queue": "genesis",
	 "value": {"composer": "phil collins",
"drummer":"phil collins"},
         "apikey":"your-api-key"
}

http://jsonqueue.appspot.com/stats/genesis - 3 items on backlog

{
	 "cmd": "take",
	 "queue": "genesis",
         "apikey":"your-api-key"
}

http://jsonqueue.appspot.com/stats/genesis - 2 items on backlog

{
	 "cmd": "get",
	 "queue": "genesis",
         "apikey":"your-api-key"
}

do this 2 times, there must be a count field, which is incremented with every get request.

{"queue": "genesis", "count": 1, "key": "aglqc29ucXVldWVyEQsSClF1ZXVlTW9kZWwYyRoM", "value": "turn it on"}

do whatever you want to do and delete this item using the key attribute (which is unique between queue items)

{
	 "cmd": "del",
	 "queue": "genesis",
 	 "key":"aglqc29ucXVldWVyEQsSClF1ZXVlTW9kZWwYyRoM",
         "apikey":"your-api-key"
}

check stats again, there must be just one item in the backlog
http://jsonqueue.appspot.com/stats/genesis


key - queue item unique id
apikey - your API Key
cmd - which command is meant to be executed
value - any json object you wish to put in the queue.

restmq-appengine's People

Contributors

gleicon avatar

Stargazers

 avatar

Watchers

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