Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thurloat/httpdb
An HTTP Interface to AppEngine's datastore.
https://github.com/thurloat/httpdb
Last synced: 9 days ago
JSON representation
An HTTP Interface to AppEngine's datastore.
- Host: GitHub
- URL: https://github.com/thurloat/httpdb
- Owner: thurloat
- Created: 2010-02-17T20:10:34.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-01-09T17:46:24.000Z (almost 14 years ago)
- Last Synced: 2024-04-13T20:02:24.434Z (7 months ago)
- Language: Python
- Homepage:
- Size: 572 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
===================
Project Description
===================HTTPDB is a very simple and fast publically accessible key:value datastore that runs on App Engine. The idea is to give developers who have rich client applications the ability to store application information in the cloud with no setup. As a naming convention, the developer should strictly define data structures on the front end with keys such as "Class:Identifier:Property" which could map to something like "User:105:foo" which holds the value "bar".
=====================
External Dependencies
=====================The current incantation of the code is built on Google App Engine, however it disregards App Engine's built-in framework which uses webapp and a stripped down Django.
Cherrypy framework to map urls and handle general requests
- http://www.cherrypy.org/simplejson to help convert the Protocol Buffer formatted db entities to pretty JSON strings
- http://pypi.python.org/pypi/simplejson/App Engine Datastore api to store the data
- http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/api/datastore.py===============
Current Example
===============Request for Empty Data
~: curl http://httpdbapp.appspot.com/get/foo/
{}Set Key to Value:
~: curl http://httpdbapp.appspot.com/set/foo/bar/
SETRe-Consume the Data:
~: curl http://httpdbapp.appspot.com/get/foo/
{"foo": "bar"}===================
Performance Results
===================A lot of the discoveries in this project are performance based. Here's a list of real test performed on the appspot domain from a dedicated server, and what was done to achieve the result in the comments.
App Engine Version || Comments || Req / Sec || Req mean time (ms)
------------------------------------------------------------------------------------
Java GAE: norexmedals || || 178 || 1068
------------------------------------------------------------------------------------
v. Cherrypy || Using sync DS req. /w || 223 || 887
|| Datastore.get() || ||
------------------------------------------------------------------------------------
v. Protobuff || Async DS req. using || 297 || 682
|| protobuff.__json__() || ||
------------------------------------------------------------------------------------
v. None || returns True in main() || ~500 || ~450
------------------------------------------------------------------------------------Notes:
- All tests were run 4 times, and the average was taken (not thorough, i know) ab -c 200 -n 2000
- the norexmedals project runs on Java App Engine and returns a heavily memcached JSON result.
- no caching was used for the Cherrypy or Protobuff versions.
- the same payload was generated and returned for all tests (minus the barebones True test)Started Using CherryPy wsgi framework. feature stripped, 10-20ms response.