Inspiration

Event data analysis with Microsoft Cognitive Services Emotions API and outputting it in a geolocation aware format using Esri maps API.

What it does

Takes a simple two-field input: a link to a Facebook album with photos from an event and a location. Analyses photos in the album and evaluates emotions of people present on the photos. Plots a point on a 2D map and displays information about the event gathered from the Emotions API.

How we built it

A broad overview of our application is basically getting all the photos from Facebook and then passing the links on to the backend for further processing. The backend calls the Microsoft Cognitive API's for every image and does some minor data processing on the returned values and gives it back to the user. But it was even harder to implement this simple workflow. We started with just calling the cognitive api's through JavaScript but it took a lot of time to send all the images and do required calculations. So we thought of sending a message to an AWS SQS queue and wrote a Go server, which is attached to the queue and when it receives new messages, it calls the API for all the images concurrently thus bringing our execution time from about 10secs to 1-2secs. Apart from that we run node.js server on an EC2 instance and the frontend is written in Angular.js, HTML5 and CSS.

Challenges we ran into

The major challenges were basically related to concurrency in Go, eliminating data races, avoiding null pointers and reduce the number of goroutines. Also understanding the AWS SDK for Go lang was a big challenge and setting up the Simple Queue Service wasn't easy as well.

Accomplishments that we're proud of

Efficient use of multiple APIs and actually harnessing the power of Go and Amazon AWS.

What's next for Hackathon Happiness

User registration, added functionality to save your map even when the session has expired.

Share this project:

Updates