Skip to content
Neeraj Lad edited this page Sep 12, 2017 · 3 revisions

Welcome to the neeraj-lad asgn-1 wiki!

System Architecture

About


A microservices based application which helps the client query the database. The user enters any number 'i' between 1 and 10 inclusive. This application retrieves information like Rating, Name and Number of Reviews for the movie ranked 'i' in the IMDB Top 10 list.

My Development Environment


  • OS: El Capitan 10.11.6
  • NodeJS: v6.11.0
  • Python: 3.5.2
  • PHP: 5.5.38
  • MySQL: 14.14

How to build


Database

  1. Install MySQL.
  2. Run db-script.sql to setup the database.

Microservice3 (ms3.php)

  1. Install PHP
  2. Add your MySQL credentials to ms3/ms3.php

Microservice2 (ms2.py)

  1. Install Flask
  2. Run export FLASK_APP=ms2.py inside ms2

Microservice1(ms1.js)

  1. Install node
  2. Install restify as npm install restify
  3. Install request as npm install request

Gateway (gateway.js)

  1. Install node
  2. Install restify as npm install restify
  3. Install request as npm install request

How to test


  1. Start ms3

Run php -S localhost:9080

  1. Start ms2

Run flask run

Note to Ubuntu users: If you haven't setup a symlink from nodejs to node, use nodejs in the following commands instead of node. If needed use sudo with the commands as sudo node or sudo nodejs.

  1. Start ms1

Run node ms1.js

  1. Start gateway

Run node gateway.js

  1. Open index.html