Skip to content

OMNI-SLO-Monitoring/price-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Price service

Frontend

Installation

$ npm install

Running the app

$ ng serve

Using the app

For a more detailed description of all functionalities visit the the Price Service section of out Github Pages Documentation.

The frontend is running at http://localhost:4300

Complete UI

The app allows to send GET requests to the database service. The requests are monitored by a circuit breaker that watches for errors in the requests. There are different endpoints that the GET request can be send to. These can be selected in the "Choose request type" selector.

Sending requests to the database service

The circuit breaker has two different types that can be configured:

The ConsecutiveBreaker opens after n requests.

Configuration of ConsecutiveBreaker

The SamplingBreaker opens after a percentage of requests fails within a certain time period.

Configuration of SamplingBreaker

Backend

Installation

$ npm install

Swagger IO Documentation

run:

$ npm install --save @nestjs/swagger swagger-ui-express

At http://localhost:3300/api you can see all the API Endpoints, generated from the Swagger IO.

At http://localhost:3300/api-json is the Swagger JSON file.

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Using the app

For a more detailed description of all functionalities visit the Price Service section of our Github Pages Documentation.

The backend listens at http://localhost:3300/request for the incoming default GET requests and automatically transfers them to the backend of the database service (usually sitting at http://localhost:3000 when running).

The backend listens at http://localhost:3300/config/ for a POST request containing the breaker config

The breaker config should have the following format:

    breaker : string;
    timeoutDuration : number;
    resetDuration : number;
    monitorDuration : number;
    threshold : number;
    minimumRequests : number;
    consecutiveFailures : number;