Skip to content

Just another REST API implementation but on a queue based workflow. It runs on python, flask, nginx, gunicorn, rabbitmq, celery & mongodb for database(redis if ram wasn't that expensive =( ). Test server runs on Vagrant and workers(gunicorn, celery workers) are daemonized via supervisord.

License

Notifications You must be signed in to change notification settings

ricasiano/slave-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slave-api

Chikka API integration but on a queue-based workflow. It runs on python, flask, nginx, gunicorn, rabbitmq, celery & mongodb for database(redis if ram wasn't that expensive =( ). Test server runs on Vagrant and workers(gunicorn, celery workers) are daemonized via supervisor.

Platform Structure:

. sms/ +--    wsgi.py  (gunicorn container)
+--    api.py  (entrypoint once nginx relayed the request, routes wether to go to)
+--    celeryconfig.py  (configurations as well as routings for workers)
+--    mongo.py  (mongo connection handler)
+--    slaves/
|    +--  message.py (resource handler for chikka's message inbound transaction)
|    +--  notification.py (resource handler for chikka's delivery notification)
|    +--  reply.py (worker for handling message replies for inbound messages)
|    +--  broadcast.py (todo for message broadcasts)
|    +--  keywords/
|    |    +--  project1
|    |    +--  project2
|    |    +--  projectN

create an ec2 instance

  • on security group, allow http(port 80)

run: source install.sh re-login restart nginx restart supervisor run celery workers in foreground or daemonize it

workers: celery -A routing.post.notification worker -Q notification --loglevel=info -n notification1.worker.%h celery -A routing.post.message worker -Q message --loglevel=info -n message1.worker.%h celery -A routing.post.message worker -Q message --loglevel=info -n message2.worker.%h celery -A routing.post.inbound.keywords.bord.process worker -Q bord --loglevel=info -n bord1.worker.%h

About

Just another REST API implementation but on a queue based workflow. It runs on python, flask, nginx, gunicorn, rabbitmq, celery & mongodb for database(redis if ram wasn't that expensive =( ). Test server runs on Vagrant and workers(gunicorn, celery workers) are daemonized via supervisord.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published