Skip to content
Aravind Parappil edited this page Mar 3, 2019 · 18 revisions

Utopia

Gets you the right music based on your mood!

Features:

  1. Choose your mood and get matching songs
  2. Search for any song
  3. See recommended songs based on your history

Napkin diagram

Napkin diagram

Architecture diagram (Milestone 2)

Arch_diag

Sequence Diagram

Seq_diag

User Stories

Using this application as a user I should be able to:

• Listen to songs based on mood.
• Search for songs by name.
• Listen to recommended songs.
• View my history and profile.

Future Enhancements:

• Context based recommendations
• Custom Playlists
• Social networking
• Write unit tests and include it in Jenkins pipeline

Improvements from Project-1

API GATEWAY
Previously all API calls were made by UI, which increased the load on React front-end. To overcome this problem we created API gateway that handles and directs all REST calls from mircoservices. UI is now purely presentation layer of the app.

ZOOKEEPER
Service registration and discovery was implemented using Zookeeper. All services run on different virtual machines and they are registered with Zookeeper so that API Gateway can discover services dynamically without knowing their actual addresses before. If any service goes down, and is run on a different machine, the API Gateway will get their address from Zookeeper as it maintains a registry of services.

RabbitMQ
Messaging queue is implemented for sending emails to new accounts that are registered with Utopia.

JENKINS CI/CD
Whenever Project-2 branch receives a new commit, all services are deployed automatically on respective VMs(we have implemented Master-Worker configuration for Jenkins).

Instructions for building

Prerequisite: You need to have a Spotify account

This job is the entry point for Jenkins pipeline. Building this job (Job_ZK_Clean) will restart Zookeeper and sequentially trigger all other jobs.

A commit to Project-2 branch will trigger this job as well. Once all jobs are completed, you can proceed to access the app through the browser

The UI service is hosted at this address. We recommend Chrome browser.
NOTE: After initial log-in, there is a significant delay (3-4 mins) to fetch the first set of songs (either by search/clicking a mood tile) This is a known issue

Challenges Faced

ZOOKEEPER SERVICE REGISTRATION
We faced issues while implementing service registration-creating nodes and understanding directory structure with z-nodes.

MASTER WORKER CONFIGURATION IN JENKINS
Jenkins Master was unable to authorize with Worker through SSH due to improper permissions in Worker machines. This was resolved by making Master and Worker users ars sudoers.

UNTIMELY SERVICE EXPIRY
Services were being killed automatically even when nohup was provided. As a fix, BUILD_ID=dontKillMe was added as prefix. This is a known issue #113.