Demo app for MicroProfile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
membership
profiling
staticweb
user
.gitignore README Update Oct 12, 2018
LICENSE
README.md Changed to use internal H2 database. Oct 18, 2018
bulkhead_load_test.jmx
grafana.json Moved to work on localhost Sep 15, 2018
high_level.png Update high level image Oct 18, 2018
microprofile-logo.png Added images Jul 7, 2018
microprofile-spec-1.3.pdf
openliberty.png Added images Jul 7, 2018
payara.jpeg Added images Jul 7, 2018
pom.xml
prometheus.yml Moved to work on localhost Sep 15, 2018
sample.gif README update Jul 10, 2018
thorntail.png

README.md

Microprofile demo

logo

Presentation

See the presentation Google Slides, and the talk

Implementations

The demo runs on

thorntail

payara

openliberty

Dependencies

This demo use microprofile-extentions extensively.

High level use case

highlevel

Getting started.

Prerequisite

To make the example easier we use an internal H2 Database and internal Elasticsearch server, so no need to install any datastore.

You can, however, use MySQL if you prefer:

MySQL / Maria (Optional)

You need a MySQL/Maria Database installed and running on your PC.

So something like this:

sudo pacman -S mariadb
sudo systemctl start mariadb.service

You need to create a Database and Database User in Maria:

mysql -u root -p < membership/init.sql

You also need to change the datasource definition in web.xml and change the driver in pom.xml

Prometheus and Grafana (Optional)

To see the metrics in action (i.e. more than just the raw output) you will need a Prometheus and Grafana server.

So something like this:

packer -S prometheus
sudo pacman -Ss grafana
sudo systemctl start prometheus.service
sudo systemctl start grafana.service

Also make sure prometheus is configured in

/etc/prometheus/prometheus.yml

(look at prometheus.yml as an example. You can also use the grafana.json for the grafana dashboards)

Source code

The then demo code on your PC:

git clone https://github.com/phillip-kruger/microprofile-demo.git
cd microprofile-demo
mvn clean install

Running

Build and start Membership service

cd membership/
mvn clean install -Prun

Build and start Profiling service

cd profiling/
mvn clean install -Prun

Build and start User service

cd user/
mvn clean install -Prun

Static Web Demo page

There is a static HTML Demo page, you can go to any of

You can generate a token in the User Service to be used in the other services.

You can find some test users in the OpenLiberty configuration - server.xml

Sample

sample