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
The WebApp is a direct subscriber to the individual Microservices. This means that there is no aggregator / middle-man application. The WebApp itself provides a known relative EndPoint microservice that enables the lookup of URLs to the other services.
The sample is a version of the MicroProfile sample application, designed to run all the services on Open Liberty.
If you would like to participate in the MicroProfile community effort to advance EE then by all means feel free to join us on the following sites:
Microprofile.io - The community landing site.
Google+ Microprofile groups - Public discussion lists (We do not have private lists).
Kanban board - A nice Kanban integration for our GitHub issues.
All source code - Apache Licence V2 project OSS code.
To run all the services on individual Open Liberty servers:
mvn clean package -P start
To view the Web application, open a browser at http://localhost:8080/
To build each service but not start the individual servers:
mvn package
To clean up the build, including stopping the individual servers:
mvn clean
Running with Gradle
To run the entire life cycle and start the servers:
gradle build libertyStart
To simply start the servers:
gradle libertyStart
To view the Web application, open a browser at http://localhost:8080/ or use:
gradle openWebApp
To package your servers:
gradle libertyPackage
To stop the individual servers and clean up the build:
gradle libertyStop clean
Click here for full Gradle Liberty Plugin documentation.
The web-application project downloads and install all node and npm requirements using plugins. Maven uses https://github.com/eirslett/frontend-maven-plugin, and Gradle uses https://plugins.gradle.org/plugin/org.ysb33r.nodejs.gulp. Sometimes this may fail if console permissions are not permissive enough.
In such cases you will have to manually install some reqiurements:
-
Download and install node: https://nodejs.org/en/download/current/
-
Install npm manually:
cd web-application/src/main/static npm install npm npm install typings --global typings install --global
The sample uses the antrun plugin to launch the web UI in a browser at the and of the build. This may fail on mac or linux with the following message:
An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot locate antRun script: Property 'ant.home' not found
This can be safely ignored, The ui should still be availaible at http://localhost:8080 or running the build with the ant home property set will remove the error (mvn -Dant.home=/path/to/ant ….)
This samples is based of the MicroProfile Conference demo at:
The application consists of several Microservices and a Web-Application managing a conference.
-
Session service. Manage session descriptions.
-
Session voting service. Vote for the your favorite session
-
Speaker service. Manage speakers, Bios, etc
-
Schedule Service. Service to manage session schedules
-
Front-end application
Speaker - Id (generated) - Name - Title - Organization - Biography - Picture - Twitter handle
APIs Speaker add(Speaker) void remove(Id) Speaker update(Speaker) Speaker retrieve(Id) List<Speaker> retrieveAll() List<Speaker> search(Speaker)
Session - Id (generated) - Code - Title - Abstract - Type (HOL/Session)
Session Speakers - Session Id - Speaker Id
APIs Session add(Session) Session update(Session) Session retrieve(Id) void remove(Id) List<Session> search(Session) List<Session> sessionsForSpeaker(Speaker Id) List<Session> speakersForSession(Session Id)
Schedule - Id (generated) - Session Id - Venue - Date - Start Time - Duration
APIs Schedule add(Schedule) Schedule update(Schedule) Schedule retrieve(Id) void remove(Id) List<Schedule> allForVenue(venue) List<Schedule> activeAtTime(time) List<Schedule> allForDay(date) List<Schedule> all
Attendee - Id - Name
Session Rating - Id - Session Id - Attendee Id - Rating (1-10)
APIs Attendee registerAttendee(Attendee) Attendee updateAttendee(Attendee) SessionRating rateSession(SessionRating) SessionRating updateRating(SessionRating) List<SessionRating> allSessionVotes(Session Id) Double sessionRatingAverage(Session Id) List<SessionRating> votesByAttendee(Attendee Id)