PiCL Storage Server
The is the PICL Storage server, you can read up some architecture discussion and have a look at [the API documentation] api
How to install and run it
PiCL is using Node.js internally, so you'll need to have this installed. It's also using the npm package manager.
To have this up and running, you can do the following:
$ git clone git://github.com/mozilla/picl-server.git
$ npm install
And you should be fine.
To make it run, just run npm start and you'll be all set!
Testing
You can run the tests yourself using the npm test command. In case you want
to run the tests on a remote server, you can set the TEST_REMOTE
variable to the address of the server you want to test:
$ export TEST_REMOTE=http://127.0.0.1:8080
$ npm test
Storage Backends
By default, all data is stored in memory. To use the mysql backend, set the environmental variable SYNCSTORE_BACKEND=mysql. E.g.:
$ SYNCSTORE_BACKEND=mysql npm start
Or, to run tests against the mysql backend:
$ SYNCSTORE_BACKEND=mysql npm test
You can also set SYNCSTORE_BACKEND=casandra to run using cassandra and
memcached as the storage backend.
Deployment
PiCL is designed for deployment into AWS.
For testing and light-weight deployments you can use awsbox which will create an all-in-one PiCL server instance:
$ awsbox create -t m1.small -n picl-server-test
$ git push picl-server-test HEAD:master
For something that's closer to what might be seen in production, you can use awsboxen to deploy an auto-scaling cluster with separate database server.
$ awsboxen deploy --profile=MockProduction picl-server-test