Skip to content

Milestone 2

Sudip Padhye edited this page Mar 29, 2021 · 13 revisions

Project Overview

This project provides a user interface to upload photos to the archive on remote storage servers. It provides pipelines for extracting additional picture metadata using open-source image parsing libraries & Image tags using ML/DL algorithms. The application also enables browsing the photos organized into collections and metadata & tag based searches. It makes use of distributed systems architecture along with Micro-services & Micro-Frontends, and Cloud-Native Architecture principles.

Languages Used:

  1. Front-End: React.JS
  2. Back-End: Java, Python, Node.js

Dependencies

  1. Node.js and npm
  2. Java 11
  3. Eclipse
  4. Python
  5. Download Maven
    Setting up Maven Environment
  6. Kafka
  7. MySQL

Setting up the right directory

git clone [email protected]:airavata-courses/PingIntelligence.git

cd PingIntelligence/

git checkout milestone_2

Setting up each microservices and front-end

1. API Gateway

cd apigateway/

Install dependencies

npm install

Start the default node server on 3001 (node gateway.js)

npm start

2. Image upload Management

cd mainuploadmgmt/

Open this directory in the IDE. Set up the Eclipse project with the pom.xml

Update Maven project

Run as > Clean Build

Run MainuploadmgmtApplication.java file.

3. Metadata Extraction Service

cd metadata-extraction-service/

Open this directory in the IDE. Set up the Eclipse project with the pom.xml

Update Maven project

Run as > Clean Build

Run UploadingFilesApplication.java file.

4. Metadata Extractor Search

cd metadataextractorsearch/

set up virtual for django project

python -m venv venv

source venv/scripts/activate to activate the virtual environment

on Windows

.\venv\Scripts\activate

download dependencies

pip install -r requirements.txt

migrate the database with

python manage.py makemigrations

python manage.py migrate

in order to run the server

python manage.py runserver

5. User Management

cd usermgnt/

Open this directory in the IDE. Set up the Eclipse project with the pom.xml

Update Maven project

Run as > Clean Build

Run PhotosqaudusermgntApplication.java file.

6. Front-end

cd ui/

npm install

npm start

Access the UI using the address: http://localhost:3000/

7. Kafka (Message Broker)

kafka version : kafka_2.12-2.2.0

to start zookeeper : to go this path 18126@DESKTOP-2ORIMG7 MINGW64 ~/Downloads/kafka_2.12-2.2.0/bin/windows $ pwd /c/Users/18126/Downloads/kafka_2.12-2.2.0/bin/windows

then > put below script for zookeeper zookeeper-server-start.bat ../../config/zookeeper.properties

to start kafka : for kafka server go to below path : 18126@DESKTOP-2ORIMG7 MINGW64 ~/Downloads/kafka_2.12-2.2.0/bin/windows $ pwd /c/Users/18126/Downloads/kafka_2.12-2.2.0/bin/windows and write for kafka start >>>>

kafka-server-start.bat ../../config/server.properties

Create topic : topic name is "test" kafka-topics -zookeeper localhost:2181 -topic test -create

8. Upload to Google Drive

cd uploadgoogledrive/

python uploadphtotostodrive.py