My favorites | Sign in
Project Logo
                
Feeds:

What is ErlSDB?

ErlSDB is an Erlang library to access Amazon's SimpleDB web service. It uses REST APIs to access SimpleDB service and is built on top OTP.

What is SimpleDB?

SimpleDB is Amazon's web service that provides persistence service for storing or querying a collection of key/value pairs. A collection of key/value pair is called an item, which is similar to row in relational database. However, unlike relation database you can store varying number of key/values. These items are in turn stored in domains which provide a naming scope.

Installing

svn checkout http://erlsdb.googlecode.com/svn/trunk/ erlsdb-read-only

Building

make

Testing

edit Makefile and add access key and secret key, then type make test

Usage

Take a look at test/erlsdb_test.erl to learn usage, here is a sample code

Starting Server

erlsdb:start(type, 
    	[#sdb_state{
		access_key = "YourAccessKey",
		secret_key = "YourSecretKey",
		domain = "YourDomain"
		}
	])

Creating Domain

    erlsdb:create_domain()

Note that the server will use the domain that was passed during initialization.

Listing all Domains

    {ok, List, _} = erlsdb:list_domains()

Deleting Domain

    erlsdb:delete_domain()

Adding an item

    Attributes = lists:sort([
	["StreetAddress", "705 5th Ave"],
        ["City", "Seattle"],
        ["State", "WA"],
        ["Zip", "98101"]
	]),
    erlsdb:put_attributes("TccAddr", Attributes)

Retrieving an item

    {ok, UnsortedAttrs} = erlsdb:get_attributes("TccAddr")

Deleting an item

    erlsdb:delete_attributes("TccAddr"),

Change Log

v0.1 - 12/21/2007

BackLog of future functionality

Project Owner

Feedback

Send patches, issues and comments to

Join the Project

You are welcome to join this project especially if you have experience with Erlang/OTP. Any feedback or suggestions is greatly appreciated.









Hosted by Google Code