evandroeisinger / poll

Simple and quick way to create and monitor polls

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

poll

The main goal is to provide simple and quick way to create a poll application, also providing a dashboard to monitor the poll status.

pre-requisites

running

To setup the development environment and get the applications running:

make run

It will start the poll and dashboard applications and the poll worker:

  • poll: http://127.0.0.1:8080;
  • dashboard: http://127.0.0.1:8080/dashboard user: admin, pass: admin;

If you need to access the virtual machine:

make ssh

To stop or reload all applications and worker:

make stop
make reload

production deployment

To handle with production environment, you need to create a deployment configuration file at ./env/prod/deploy.json based on ./env/prod/sample.deploy.json. After that you'll be able to access the production server, deploy to production and setup the production server (already done):

make ssh-prod
make deploy-prod
make setup-prod # don't do it

benchmark

To perform the load tests, uncomment the desired service at makefile: siege v3+

development environment:

  • POST 280~ vote/secs
  • GET 250~ poll/secs
  • GET 250~ candidates/secs

Obs: Requests made to the production environment are authenticated with a header token api-access-token and recaptcha. However, development environment doesn't have any authentication.

make load-test

Makefile

load-test:
  siege -b -t5s -c10 "http://127.0.0.1:8080/api/poll/current"
  #siege -b -t5s -c10 "http://127.0.0.1:8080/api/candidates"
  #...

About

Simple and quick way to create and monitor polls


Languages

Language:JavaScript 64.6%Language:CSS 25.2%Language:Shell 6.5%Language:Makefile 2.3%Language:HTML 1.4%