upb-uc4 / lagom-core

Repository for the micro service backend using lagom.
Apache License 2.0
6 stars 0 forks source link
kubernetes lagom microservices scala

Lagom backend implementation of UC4

Current Status

Test Status

Code Format Status

Table of Contents


Versions in this project

Changes necessary on UNIX

Add in .sbtopts '-J' in front of every parameter. Should look like this:

-J-Xms512M
-J-Xmx6144M
-J-Xss2M
-J-XX:MaxMetaspaceSize=2048M

Running in development mode

Prerequisites

Have a running hlf network in the background with the test flag.

Actions in the product code folder

First start Postgres, Imaginary and HTML-TO-PDF with the default settings:

docker-compose up

Attention, this occupies your shell.
You may want to detach with 'ctrl + d' or with '-d' flag.

Use following command:

sbt runAll

If you don\'t have sbt installed, you need to install sbt.

Errors

If you encounter any unexpected errors, use following command:

sbt clean

If this doesn\'t help: Open an issue.

Changelog

To get an overview of our development process, we tagged our releases and added changelogs for every service, like the one of the user service, to our repository, which lists our different releases along with a description/enumeration of the changes between versions. Each service has an individual tag which starts with the name of the service followed by the version-number.

Create Docker Images

sbt <name>_service/docker:publish

Change settings of postgres

The configuration file used by the local docker image are defined in the postgres.conf. This file will be loaded when postgres starts.

Dependecies of the different services

Dependency tree

The figure gives an overview of the internal communciation between services and therefore their dependencies. Inter-service communcation is either realized through service calls or a publish-subscribe pattern using Apache Kafka as a message broker. Service calls are synchronous HTTP calls that use the defined REST-API and publishing messages to Kafka allows asynchronous decoupled communication between services. Messages are published to topics which multiple services can subscribe to. Some services communicate with the underlying Hyperledger Fabric Framework. These services are marked with a red tag.

Running tests in IntelliJ

IntelliJ expects some impressive Hardware. To work around that fact you can tell it to use less Memory. Instead of starting up VMs with ~ 1.5 GB you can tell the sbt to work on a max heap size of 512 MB.

File
- Settings
    - Build, Execution, Deployment
      - BuildTools
        - sbt
          [ ] Maximum Heap Size (MB) [  512  ]

Maintain and extend

In case you want to maintain or extend our lagom backend consult the handbook.

License

Our source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file.