Splitter-app
A SOA based web application that splits expenses in a group. Consists of 3 microservices
- Splitter - This service contains Users, Groups of users, Transactions.
- Email - This service is responsible for sending emails using 3rd part API's.
- SMS - This service is responsible for sending SMS using 3rd part API's.
Steps to get the microservices up and running
- Start RabbitMQ using this command /usr/local/opt/rabbitmq/sbin/rabbitmq-server. This starts on port 15672.
- Start Splitter app service on local host port 3000. rails s -p 3000 is the command
- Start the SMS service on local host port 4000 if required. rails s -p 4000 is the command.
- Start the Email service on local host port 5000 if required . rails s -p 5000 is the command.
- WORKERS=MailWorker rake sneakers:run to start the email service workers.
- WORKERS=SmsWorker rake sneakers:run to start the email service workers.
Architecture Diagram
RabbitMQ as a message broker. P - Producers C- Consumers.
DataBase Schema for Splitter
Salient Features of Splitter Service
- Reduces group based expenses to a graph that allowed the application of Tarjans’s strongly connected components algorithm that finds cycles in O(n) time complexity to quickly settle up expenses in a group.
- Users can add transactions/bill expenses with friends in groups and normally.
- Create your own groups.
Salient Features of Email Service
- Uses MailGun's 3rd party API for Sending emails of transactions.
- Consumes message sent on the email queue of RabbitMQ from splitter app.
Salient Features of SMS Service
- Uses Gupshups's 3rd party API for Sending sms of transactions.
-
- Consumes message sent on the sms queue of RabbitMQ from splitter app.