Skip to content
nikhilmankame edited this page Mar 20, 2020 · 40 revisions

Team - CodeStorm

Introduction

Welcome to Codestorm wiki!

Getting Started

1. API Gateway

All calls from client to microservices are rendered by API Gateway. Runs on Port 4000

Follow the steps to run API Gateway:

  1. On Terminal.
  2. Go to APIGateway Directory.
  3. Open REST Gateway
  4. Run server.js using the following command: npm run start

Pre-requisites:

  1. Node JS: v13.8.0
  2. Express JS

Starting API Gateway

  1. npm run start

2. User Management

User is authenticated using JWT token. User Management runs on port 8085.

Follow the steps to run User Management:

  1. On Terminal.
  2. Go to UserManagement Directory.
  3. Run the following commands: 1. mvn clean install 2. mvn spring-boot:run

Pre-requisites:

  1. Java: Version 8 AVA_HOME environment variable needs to be set to the JAVA installation directory. Refer: https: //www.java.com/en/download/ SpringBoot: 2.2.0

Starting Microservices

  1. mvn clean install
  2. mvn spring-boot:run

3. Session Management (Not yet integrated - Present on Session Management branch)

Session Management is used for tracking user activities. Session Management runs on port 8089.

Pre-requisites:

  1. Java Version: 8 AVA_HOME environment variable needs to be set to the JAVA installation directory. Refer: https://www.java.com/en/download/

Follow the steps to run Session Management (Indepedently):

  1. On Terminal
  2. Go to sessionmanagement-2 Directory.
  3. Run the following commands: 1. mvn clean install 2. mvn spring-boot:run

Starting Microservices

  1. mvn clean install
  2. mvn spring-boot:run

4. Data Retrieval

Data Retrieval is used for fetching data. Data Retrieval runs on port 7000.

Pre-requisites:

  1. python3 or higher
  2. pip3 or higher
  3. Install Docker https://docs.docker.com/install/
  4. Install Docker confluent-kafka https://docs.confluent.io/current/quickstart/ce-docker-quickstart.html#ce-docker-quickstart Follow the steps listed on the website.

Install required libraries

  1. Linux or mac: pip3.7 install -r requirements.txt
  2. Windows: pip3 install -r requirements.txt

Starting Micro-service

  1. On Terminal.
  2. Navigate to DataRetrieval.
  3. flask run --port=7000

5. Model Execution

Model Execution is used to process the fetched data. Model Execution runs on port 7500.

Pre-requisites:

  1. python version 3 or higher.
  2. pip python 3 or higher.
  3. Docker version 19.03.5 to be installed.
  4. Install Docker https://docs.docker.com/install/
  5. Install Docker confluent-kafka https://docs.confluent.io/current/quickstart/ce-docker-quickstart.html#ce-docker-quickstart Follow the steps listed on the website.

Install required libraries

  1. Linux or mac: pip3.7 install -r requirements.txt
  2. Windows: pip3 install -r requirements.txt

Starting Micro-service

  1. Navigate to Model Execution
  2. flask run --port=7500

6. Post Processing

Post Processing displays the Model Execution result. Post Processing runs on port 5500.

Pre-requisites:

  1. python3 or higher
  2. pip3 or higher
  3. Install Docker https://docs.docker.com/install/
  4. Install Docker confluent-kafka https://docs.confluent.io/current/quickstart/ce-docker-quickstart.html#ce-docker-quickstart Follow the steps listed on the website.

Install required libraries

  1. Linux or mac: pip3.7 install -r requirements.txt
  2. Windows: pip3 install -r requirements.txt

Starting Micro-service

  1. Navigate to Post Processing
  2. flask run --port=5500

7. Front End

A simple react front end to retrieve, process and analyze weather data.

Follow the steps to start the front end service:

  1. On Ternminal.
  2. Go inside frontend directory.
  3. Run the following command: npm start

Front End URL: http://localhost:3000/

Pre-requisites:

Do the following inside frontend directory:

  1. Install NodeJS version: v13.8.0. You can find it at: https://www.tutorialspoint.com/nodejs/nodejs_environment_setup.htm
  2. Install nom using the following command: npm install
  3. Follow this tutorial to install react: https://www.tutorialspoint.com/reactjs/reactjs_environment_setup.htm

Steps to run the Project

  1. Pull the entire code base from the master branch.
  2. Set up React and Node JS
  3. Run all the servers.
  4. Run the following command to install all the dependencies npm install
  5. Run the following command to start the server npm start
  6. Register as a User
  7. Login using the Credentials
  8. Click on the Man icon on top right
  9. Click on the Data Retrieval
  10. Click on the Model Execution
  11. Click on Post Processing
  12. P.S : Model Execution and Post Processing sometimes work & sometimes don't due to the issue from Kafka Production and Consumption not being performed properly but all microservices run properly when run independently.

Performance Testing Using Jmeter

  1. An Apache Jmeter based performance testing has been conducted on all the Microservices.
  2. The Jmeter tool aids in conducting the tests using different loads.
  3. Load Tests help identify the maximum number of requests each service can handle as well as the bottlenecks due to which the performance starts degrading
  4. The load tests are conducted via a simulation of the real user scenarios.

Prerequisites for Apache Jmeter

  1. Java version 8 or higher
  2. Multi core CPUs with 4 or more cores
  3. At least 16 GB RAM
  4. 1 Gbps LAN
  5. Blazemeter (Extension from the Chrome Web Store)

Installation Steps

  1. Login to https://jmeter.apache.org/download_jmeter.cgi
  2. Under the Binaries Section, click on the link with .zip extension.
  3. Once the download is complete, extract the contents of the zip file into a new folder.
    1. Windows

    • Place the folder into C:\Program Files
    • Navigate to the bin directory of the installation
    • Double click on the jmeter Windows Batch File to launch the application
    1. Linux

    • Open the command line interface and navigate to the navigate to the bin directory of the installation
    • execute the command ./jmeter
    1. Mac

    • Navigate to the bin directory of the installation
    • Execute the command sh ./jmeter.sh on the terminal
Clone this wiki locally