Project 2: Cloudbread
University Name: http://www.sjsu.edu/
Course: Cloud Technologies
Professor: Sanjay Garje
ISA: Divyankitha Urs
Student:
Anushri Srinath Aithal
Ashwini Shankar Narayan
Anuradha Rajashekar
Nidhi Jamar
Every restaurant has perfectly good food that they cannot sell at the end of their day. Large amount of these food goes wasted and is thrown away in the dumping zone. How can one efficiently use this food to kill someone’s hunger? What if there is a platform which connects restaurants to institutes such as food banks. With this platform not only, food banks can serve more hungry people additionally restaurants will also have a meaningful channel to distribute or dispose of the surplus food. It’s a win-win situation where business can contribute to a sustainable environment in a meaningful way at the same time charities help fight food poverty. For this to happen both food banks and restaurants will have to register with the platform and exchange information regarding how much food is remaining and food banks can collect those food from the nearest restaurants
Using AWS cloud services, we are developing and hosting a 3-Tier Web Application which enables frictionless communication between restaurant management, local charities and one who is hungry. The application houses a portal for restaurant management to post information regarding all the leftovers in the form of images at the end of business hour. Using AWS Notifications, we notify local charities to pick up this available food. The application provides a portal where local charities can sign up to this platform. When notified about food availability, the charity responds by accepting to collect the food from the restaurant. Analytics are provided to help restaurants reduce their food wastage. AWS Machine Learning is used to provide meaningful predictions about food wastage.
- Sign up form for new user to create an account. A new user record is created in DynamoDB. If an already existing user tries to sign up, he is prevented in doing the same.
- Login Page to allow only authorized users to login. Performs validation for username and password match. A role based login is enabled to redirect users to either Business Home Page or Charity Home Page.
- Business Home Page provides a widget to upload leftover food images. It also takes in user input for amount of food cooked, food wasted and pick up time. The food images are uploaded to S3.
- Amazon Rekognition is used to identify the category of food. It is divided into 3 types – Raw, Canned and Processed.
- Amazon Machine Learning with RDS is used to display predicitive analytics on Food Wastage.
- An asynchronous notification system using AWS SQS and email using SES is set up to notify charity about food availability when restaurants upload.
- Charity Home Page displays all the food images uploaded by Business. Images are displayed from CloudFront.
- Data warehouse using Redshift and Lambda. When the ML Data .csv file will be uploaded to S3 bucket, the data from .csv file will be copied to Redshift.
Resources to be configured on AWS:
- EC2, AutoScale Group, ELB, Route 53
- S3, IA, Glacier
- Amazon Rekognition
- Amazon Machine Learning and Predictive Analysis
- DynamoDB and RDS
- Lambda and Redshift
- Cloudwatch, SQS, SES and SNS
Softwares to download locally:
- Server Side: Spring MVC, REST, Java, AWS Java SDK, Apache commons and Fasterxml/Jackson
- Client Side: HTML5, AngularJS, Bootstrap
- Database: RDS MySQL, Hibernate, DynamoDB
-
Build Tool : Maven
- Web Server: Apache Tomcat 8.5
- Prerequisite Softwares: Java8 Runtime, Maven, Apache Tomcat 8.5, Eclipse, MySQL 5.7.
- Download code from Github.
- Set up DynamoDB User table with fields specified in DynamoDBUser.schema
- Run DBScript.sql on MySQL instance.
- Run the standalone application MLDataGenerator.java
- Run the standalone application DynamoDbDataGenerator.java
- Update applications.properties with MySQL URL, Username and Password.
- Update application.properties with access key and secret.
- Update application.properties with CloudFront URL.
- Run the instruction mvn clean install on project pom.xml
- Change the Tomcat server.xml (in conf/server.xml) to run your application as the root application
- Deploy the cloudbread.war folder in Tomcat webapps folder.
- Run the startup.sh/startup.bat in bin folder
- You can now access the application at http://localhost:8080/