Giter Site home page Giter Site logo

microprofile-conference's Introduction

Microprofile Showcase Application

General information

The application consists of several Microservices and a Web-Application managing a conference :

  • microservice-schedule : Schedule of the conference

  • microservice-session : Sessions of the conference

  • microservice-speaker : Speakers of the conference

  • microservice-vote : Votes for each session

  • web-application : Frontend Angular2 | Bootstrap4

Technologies

  • Java

  • Micro Profile

  • JAX-RS 2.0 / JSON-P 1.0 / CDI 1.1

Development Build

mvn clean install -DskipTests
  • Build the projects using Maven (mvn clean install) or (mvn -fn clean install) to skip over failed tests.

  • To get the technical documentation, just mvn clean generate-resources under the docs directory. You will get a PDF and HTML version of the documentation under docs/target/generated-docs

Run Services

Each service can run on any container (this is the Microprofile guarantee), but the service projects have been written by vendors to use their container.

The following sections describe vendor specifics:

microservice-schedule

The Schedule service is provided using a special microprofile release of Payara Micro which can be downloaded from Maven Central

Build and run the service When building the service Payara Microprofile packages both the war file and the microprofile runtime into a single UberJar for convenience.

cd microservice-schedule
mvn clean package
java -jar target/microservice-schedule.jar [Options]

Port Bindings By default the microservice will bind to port 8080, if this is not available it will bind to the next available port e.g. 8081. To specify the port use --port as a command line option

To see a full set options run the jar with the --help command line option or see the Payara Micro Documentation for a full list of options.

microservice-session

Provided using WildFly Swarm

Build and run the service

cd microservice-session
mvn clean package
java -jar target/microservice-session-swarm.jar [-D<OPTION>]

Address & Port Bindings

Table 1. Session Service Options
Flag Description Default

swarm.bind.address=<address>

Interface to bind servers

0.0.0.0

swarm.http.port=<port>

Sets the port for the HTTP server

8080

swarm.port.offset=<offset>

Sets a global port adjustment

0

For a full set of configuration options please see the Wildfly Swarm Userguide

microservice-speaker

Provided using Apache TomEE 7.x

Build and run the service

cd microservice-speaker

cd microservice-speaker-web

mvn clean package tomee:exec -DskipTests

java -DadditionalSystemProperties=”-Dport.http=9191 -Dport.ajp=9292 -Dport.shutdown=9393” -jar target/microservice-speaker-web-exec.jar

microservice-vote

TBC

Run the UI Web Application

This starts the UI app and all services running in an embedded container. The landing page is http://localhost:8080

Console 1
mvn clean package tomee:run -pl :web-application -DskipTests

This starts a gulp task that monitors and updates changes to the static resources.

Console 2
$ cd web-application
$ mvn frontend:gulp

Open a browser at http://localhost:8080/

Run all services and UI in separate runtimes

This will run each service in the runtime container that its setup for and the UI in a Node.js server to interact with them.

Build, package and run all services and the UI:

mvn clean package -Pstart

Run all services and the UI:

mvn package -Pstart -pl :microservice-start

Tests

mvn clean test

Common problems/bugs

NPM issues

The web-application project uses the com.github.eirslett:frontend-maven-plugin to download and install all node and npm requirements. Sometimes this may fail if console permissions are not permissive enough.

In such cases you will have to manually install some reqiurements:

  1. Download and install node: https://nodejs.org/en/download/current/

  2. Install npm manually:

cd web-application/src/main/static
npm install npm
npm install typings --global
typings install --global

Notes

This application is a collaborative demonstration application by:

  • Liberty Profile

  • London Java Community

  • Red Hat

  • Tomitribe

  • Payara

microprofile-conference's People

Contributors

agoncal avatar andygee avatar andymc12 avatar emily-jiang avatar gregrluck avatar heiko-braun avatar hutchig avatar iainduncani avatar ivannov avatar karianna avatar kenfinnigan avatar mrbyte2001 avatar ondromih avatar smillidge avatar tevans78 avatar

Watchers

 avatar  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.