Git Product home page Git Product logo

quarkus-faces's Introduction

License: MIT Discord Chat

Quarkus Faces

Quarkus Faces Logo

Goals


The main goal was to take an out of the box Faces (formerly JSF) application (PrimeFaces Showcase) and run it in both a Java EE Server and in Quarkus. Some addition goals:

  • See how much we can improve performance by incorporating various optimization tricks for JSF applications
  • See if Quarkus is a viable option for Faces and migrating to Docker containers

Environment


  • OpenJDK 11.0.10
  • JBoss Wildfly 18.0.1
  • Quarkus 2.6.2.Final
  • JSF Production Mode
  • Intel(R) Core(TM) i7-8750H CPU @2.21 GHz 16GB RAM

Optimizations


Metrics


The following client and server metrics were captured while hitting the exact same page /datatable/crud.xhtml Using Incognito Mode and pressing CTRL+F5 so it forced the browser to load all resources from the server with nothing cached.

Metric WildFly EE Quarkus (unoptimized) Quarkus (optimized) Improvement
Package Size 48.5 MB WAR 98 MB 98 MB ------
Cold Startup 10.3 s 3.04 s 3.01 s 70.78%
Memory Used 140 MB 39 MB 39 MB 72.14%
HTTP Requests 114 114 89 21.93%
Resource Size 4.4 MB 4.4 MB 4.4 MB -----
Transferred Size 4.4 MB 4.4 MB 2.9 MB 34.09%
DOM Loaded 1150 ms 745 ms 668 ms 41.91%
Lighthouse Score 59/100 61/100 98/100 66.10%
First Paint 2.4 s 1.0 s 0.6 s 75.00%
Largest Paint 2.7 s 5.2 s 1.3 s 51.85%
Speed Index 2.4 s 1.8 s 0.9 s 62.50%
Time To Interactive 3.9 s 5.2 s 1.3 s 66.67%

Development


To run the example in Dev mode:

git clone https://github.com/melloware/quarkus-faces
cd quarkus-faces
mvn -Pqdev

Then open your web browser to http://localhost:8080/

Production


To run the example in HotSpot Production mode (GraalVM native-image not supported):

git clone https://github.com/melloware/quarkus-faces
cd quarkus-faces
mvn clean package
java -jar target/quarkus-app/quarkus-run.jar

Then open your web browser to http://localhost:8080/

Docker JVM


Builds a Docker image running as a standard JVM application.

mvn clean package -Ddocker
docker run -i --rm -p 8080:8080 melloware/quarkus-faces:latest

Docker Native


Builds a native Docker image running as a GraalVM (Mandrel) application.

โš ๏ธ NOTE: not currently working because of limitations with some classloading.

mvn clean package -Dnative
docker build -f src/main/docker/Dockerfile.native -t melloware/quarkus-faces:${version} .
docker run -i --rm -p 8080:8080 melloware/quarkus-faces:${version}

Known Issues


We have a WIKI page where we are keeping track of known issues while developing with Quarkus/MyFaces/PrimeFaces. Please feel free to contribute to that page if you find anything you think others should know!

quarkus-faces's People

Contributors

melloware avatar dependabot[bot] 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.