This project is to demonstrate the way to integrate application with third-party services by using asynchronous messaging (Background Worker & Message Queue). It also shows how to use ansible for provisioning and auto CI/CD pipeline by using CircleCI and Ansistrano.
The application will save the form data into the database and push a message to AWS SQS after form submission. A background worker keeps running to poll the message from SQS and process it (pushing a new tweet to twitter in this case). This is a typical use case that "when something happens, we need to do a,b,c...". We can process a,b,c... in either a synchronous or asynchronous way which depends on your business rules.
Read my post for more explanations
Redis
- it is used to determine whether to restart the background worker. It is inspired by Laravel Queue.Supervisor
- it is used to auto-restart workers if they are stopped by any exception.