#Sieve A/B testing framework
Overview
This project is divided into three components:
- API Server: provides endpoints to manage the experiments. Also handles experiment allocation, tracking and reporting
- Dashboard: is the admin UI for managing experiments and tracking their performance
- SDK: hosts the npm module sieve-js, which is to be integrated by an app that wants to perform the A/B test
TODO: Add more information about the flow and the directory structure
Requirements
- node >= 4
- MySQL
- Redis
- Redshift cluster / PostgreSQL server
(Optional) For Data Processing:
- JDK 8
- Maven 3
- Apache Spark 2+ / AWS EMR cluster
Running the Demo
Installing has general instructions for setting up the project. If you're just trying a demo, check this out for a wrapper that makes the setup easy
Installing
Clone the repository:
git clone https://github.com/agaralabs/sieve.git
cd sieve
Install the dependencies:
.bin/dependencies.sh
If you prefer not to build the data processor java application, set the env WITHOUT_DATAPROC=1
:
WITHOUT_DATAPROC=1 .bin/dependencies.sh
Configure the API:
cd dashboard/server
cp src/config/sample-spark.config.ini src/config/config.ini
Modify the config according to the instructions given here and return to the project root
cd ../..
Build:
.bin/build.sh
As before, if you prefer not to build the data processor java app, you can skip it
WITHOUT_DATAPROC=1 .bin/build.sh
This will create build artifacts in the dist
directory. It contains the server
and dashboard
folders, which correspond to the API app and it's frontend
Database:
For MySQL:
Create the database and the user, and grant correct permissions:
CREATE SCHEMA `sieve`;
CREATE USER sieveuser IDENTIFIED BY "password";
GRANT ALL PRIVILEGES ON sieve.* TO sieveuser;
And setup the tables:
mysql -u sieveuser -p sieve < dashboard/server/db/mysql_schema.sql
TODO: Add steps for Postgres
Run:
For the API Server:
cd dist/server
npm install --production
node app.js # use the "--harmony" flag for node v4
For the frontend dashboard, serve the contents via a generic server like nginx/apache, or use this command for a temporary server. Access it through the browser via http://localhost:8000
cd dist/dashboard
python -m SimpleHTTPServer 8000
##Contributing
For bugs and support, please raise an issue on this repository.
To contribute, please fork the project and raise a pull request. Make sure to run tests before pushing.
.bin/test.sh
.bin/build.sh