Git Product home page Git Product logo

distributedsystems's Introduction

DistributedSystems

General Information

Repository for the project of the lecture distributed systems. A small application that displays a list of animals. The user is able to add, edit and delete animals. Even though it is out-of-scope for now it will have a filter function to filter through the animals based on their species and their attributes. With the help of the search field one will be able to search for a specific breed.

Start through Docker

Before starting with docker open the backend in your IDE. In Eclipse select the root of your dirctory and go to Run as. There select the command Maven clean first to ensure that there are no jar-files under the target directory. After that select under Run as the command Maven install. That will provide you with the necessary jar-file to start the backend docker container.

After that install docker on your machine if you have not already done so. To ckeck the version you are using you can simply run:

$ docker -v

The output should look something like this when using Linux Ubuntu:

$ Docker version 20.10.21, build 20.10.21-0ubuntu1~20.04.2

Then go to the directory that contains the docker-compose.yml file. Run the command:

$ docker-compose up --build

After stoping the containers make sure to run the command:

$ docker-compose down --volumes

Otherwise a second attempt to start the project might fail.

Known Issues

  • communication problems between the database and the backend might occur -> a workaround is to start the backend locally through an IDE
  • so far docker-compose has only been tested on Windows and on Linux Ubuntu

Start through IDEs

Backend in Eclipse

Simply run the project as a Spring Boot project.

Frontend

In a terminal go to the directory pet-project. There just enter the command:

$ ng serve

Set up for development

Frontend

The frontend is using the angular framework. In order to set up the project one has to install angular on their local machines.

On Linux Ubuntu:

First install nodejs:

$ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && sudo apt-get install -y nodejs

Check the version:

$ node -v

One should get something like this:

$ v18.16.1

After that one can get the latest version of npm (optional):

$ sudo npm install npm@latest -g

Check the version:

$ npm -v

The feedback should look like this:

$ 9.7.2

Now install angular/cli:

$ sudo npm install -g @angular/cli

Check the version:

$ ng version

The feedback should look like this:

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 16.1.1
Node: 18.16.1
Package Manager: npm 9.7.2
OS: linux x64

Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1601.1 (cli-only)
@angular-devkit/core         16.1.1 (cli-only)
@angular-devkit/schematics   16.1.1 (cli-only)
@schematics/angular          16.1.1 (cli-only)

Backend

The Backend language used for this project is Java 17. While the framework Springboot is used, it requires no further installation process.

To install Java 17, first check if there is already a version installed.

On Linux Ubuntu

$ java -version

If it is not installed the output will look somewhat like this:

Command 'java' not found, but can be installed with:
sudo apt install default-jdk
sudo apt install default-jre

Before installation first run the command:

$ sudo apt-get update

Now to the actual installation, run the command:

$ sudo apt install openjdk-17-jdk openjdk-17-jre

When running the command:

$ java -version

The output should look somewhat like this:

openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu120.04, mixed mode, sharing)

IDE

The choice of an IDE is of course for the developer to make. So this part covers the personally preferred IDEs for a project like this.

Visual Studio Code

For the frontend the IDE Visual Studio Code was used.

To get Visual Studio Code simply follow this Link and choose the version for the operating system of the local machine used for this project.

Eclipse

For the backend the IDE Eclipse was used.

To get it, simply follow the instructions of the Eclipse Foundation

Lombok

This application uses Lombok. In order to use Lombok in Eclipse this tool has to be installed.

distributedsystems's People

Contributors

viola137 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.