tree: 8ba447d8237f0bdd7d92889c7c29cf3a690efd01 [path history] [tgz]
  1. data-catalog/
  2. Migrations/
  3. rpc_handler/
  4. Server/
  5. README.md
gsoc2022/smilesdb/README.md

Small Molecule Ionic Lattices (SMILES) Data Models

Local Build GitHub last commit GitHub commit activity (branch) GitHub code size in bytes

This project is an experimental workspace used for the Scientific and Chemical Engineering. This is an end to end implementation of SEAGrid Data Catalog, embedded with the new features and advanced data visualization techniques.

DEVELOPMENT GOALS

  1. Create a robust database to reduce the latency.
  2. Redesigning the data models.
  3. Synchronising the data with a user dashboard on performing experiment successfully.

Table of Contents

Pre-requisites

Technical Stack

FunctionLanguage/Framework/Technology used
Backend Microservice Implementation1. Spring Boot (Java)
(Suggested tool IntelliJ)
Frontend Microservice Implementation1. Django (Python)
2. Vue JS
(Suggested tool PyCharm)
Inter-service Communication1. Google Remote Procedure Calls (gRPC)
2. REST framework
Database ManagementMongoDB (Mongo Compass)
Performance TestingBloomRPC (for gRPC routing)

Set up the code directory

Suggestion: For the effective workspace management, use IntelliJ and PyCharm.

Working on Mac Environment:

  1. Open the terminal application and set the path to the home directory, use the command cd ~/ to move to the home directory.
  2. Clone the GitHub repository and use the following commands to change the working directory.
     git init
     git clone https://github.com/bhavesh-asana/airavata-sandbox.git
    

How to run the project

Server Initialization

On the server side, Spring Boot with the Maven configuration is being used to interact with the database and define the proto schema. To start the communication services the Google Remote Procedure Call (gRPC) stub is implemented in Java, which acts as a server and helps to transfer the data effectively with the connected clients across the distributed systems.

  1. Before initializing the server, make sure the MongoDB is installed and the instance is running locally.
    mongo --port 27017
    
    This command ensure the Mongo instance is running locally and connected the instance to the port 27017.
  2. Open a new terminal window (server_runner) and change the directory to the server codebase
    cd ~/airavata-sandbox/gsoc2022/smilesdb/Server/
    
  3. Build the Maven project.
    mvn package
    mvn clean install
    
  4. Run the Spring Boot application.
    mvn spring-boot:run
    
    On successful running of the server application, it shows a message as “Server running successfully” and open connection with mongodb driver.

Middleware (Django Application)

Open a new terminal window and follow the steps to run the middleware application.

  1. Change the working directory to SMILES middleware.
    cd ~/airavata-sandbox/gsoc2022/smilesdb/DjangoMiddleware
    
  2. Create a virtual environment using the following command.
    Strictly recommended to use Python version 3.8.3 to build the grpcio-wheel.
    $ conda create -n <EnvironmentName> python=3.8.3
    $ conda activate <EnvironmentName>
    
  3. Upgrade the PIP version and install the required dependencies using the requirements.txt file.
    pip install -U pip
    pip install -r requirements
    
  4. Run the Django application.
    python manage.py runserver
    
  5. Open http://127.0.0.1:8000/api/calcinfo/ to check the data transmission from the server application. On successful transmission, the data can also be visualized in the server terminal.

Client Initialization

The front-end client application is developed in the JavaScript framework (vue.js). The vue.js is communicated with the Django application (Middleware) using REST api calls and the data is exchanged in between the server and client application.

To run the client application, open a new terminal window and follow the below steps

  1. Change the working directory to SMILES Dashboard.
    cd ~/airavata-sandbox/gsoc2022/smilesdb/smiles_dashboard
    
  2. Open the new terminal and run the following commands to build the project.
    npm install
    npm run serve
    
  3. Open

Database Management

Visualize the data with Mongo Compass GUI

The mongo instances are configured in the application.properties file (located under Server/src/main/resources/). Initialise the mongo compass and connect to the respective port (27017). On execution of the ServerApplication, the smiles database is created and the test data of calcinfo is sent to the database, which can be viewed under the calcInfo collection.

Visualize with Mongo CLI

To view the data using Mongo shell, open the terminal and follow the commands mentioned below.

 mongo
 show dbs
 use smiles
 show collections
 db.calcInfo.find()

References

  1. Jira Issue:
    https://issues.apache.org/jira/browse/AIRAVATA-3593
  2. Confluence Page:
    https://cwiki.apache.org/confluence/display/AIRAVATA/SMILES+Data+Models
  3. GitHub - Airavata sand-box:
    Master branch: https://github.com/apache/airavata-sandbox
  4. DevDocs

The team

GSoC Mentors

  • Suresh Marru
  • Sudhakar Pamidighatam

Contributor

  • Bhavesh Asanabada