Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- benchmark/whole_applications/coffee-shop/jakarta/.mvn/wrapper/maven-wrapper.properties +3 -0
- benchmark/whole_applications/coffee-shop/jakarta/docker/db/init.sql +12 -0
- benchmark/whole_applications/coffee-shop/jakarta/docker/docker-compose.yml +127 -0
- benchmark/whole_applications/coffee-shop/jakarta/scripts/create-topics.sh +18 -0
- benchmark/whole_applications/coffee-shop/jakarta/scripts/down.sh +3 -0
- benchmark/whole_applications/coffee-shop/jakarta/scripts/smoke-consumers.sh +5 -0
- benchmark/whole_applications/coffee-shop/jakarta/scripts/smoke-orders.sh +9 -0
- benchmark/whole_applications/coffee-shop/jakarta/scripts/smoke_drink.sh +33 -0
- benchmark/whole_applications/coffee-shop/jakarta/scripts/smoke_food.sh +27 -0
- benchmark/whole_applications/coffee-shop/jakarta/scripts/up.sh +13 -0
- benchmark/whole_applications/coffee-shop/jakarta/scripts/wait-for-http.sh +19 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/CoffeeShopApplication.java +7 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/barista/api/StatusResource.java +15 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/barista/health/BasicHealth.java +15 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/barista/messaging/BaristaConsumer.java +43 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/common/domain/OrderAck.java +3 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/common/domain/OrderRequest.java +10 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/common/domain/OrderStatus.java +5 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/orders/service/OrderService.java +39 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/liberty/config/server.xml +49 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/resources/META-INF/microprofile-config.properties +50 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/resources/META-INF/persistence.xml +11 -0
- benchmark/whole_applications/coffee-shop/jakarta/src/main/webapp/coffeeshopTemplate.html +975 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/barista/BaristaImpl.java +90 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/barista/BaristaOutpostImpl.java +58 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/barista/api/Barista.java +18 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/barista/domain/BaristaItem.java +80 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/barista/domain/BaristaRepository.java +17 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/counter/OrderServiceImpl.java +111 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/counter/api/OrderService.java +17 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/counter/domain/OrderEventResult.java +110 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/Beverage.java +4 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/Item.java +22 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/ItemStatus.java +6 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/LineItem.java +132 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/Location.java +6 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/Order.java +342 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/OrderIn.java +4 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/OrderSource.java +6 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/OrderStatus.java +6 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/commands/CommandItem.java +57 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/commands/CommandType.java +6 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/commands/PlaceOrderCommand.java +132 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/valueobjects/OrderIn.java +71 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/valueobjects/OrderUp.java +58 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/valueobjects/OrderUpdate.java +78 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/infrastructure/EventBusTopics.java +10 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/infrastructure/OrderRepository.java +14 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/kitchen/Kitchen.java +10 -0
- benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/kitchen/KitchenImpl.java +75 -0
benchmark/whole_applications/coffee-shop/jakarta/.mvn/wrapper/maven-wrapper.properties
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
wrapperVersion=3.3.4
|
| 2 |
+
distributionType=only-script
|
| 3 |
+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
|
benchmark/whole_applications/coffee-shop/jakarta/docker/db/init.sql
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- Aligns with OrderEntity fields/status usage
|
| 2 |
+
CREATE TABLE IF NOT EXISTS orders (
|
| 3 |
+
id BIGSERIAL PRIMARY KEY,
|
| 4 |
+
customer VARCHAR(100) NOT NULL,
|
| 5 |
+
item VARCHAR(100) NOT NULL,
|
| 6 |
+
quantity INTEGER NOT NULL CHECK (quantity > 0),
|
| 7 |
+
status VARCHAR(20) NOT NULL,
|
| 8 |
+
created TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
| 9 |
+
updated TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
| 10 |
+
);
|
| 11 |
+
|
| 12 |
+
CREATE INDEX IF NOT EXISTS idx_orders_status ON orders(status);
|
benchmark/whole_applications/coffee-shop/jakarta/docker/docker-compose.yml
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
networks:
|
| 3 |
+
coffee-net:
|
| 4 |
+
|
| 5 |
+
volumes:
|
| 6 |
+
pgdata:
|
| 7 |
+
zkdata:
|
| 8 |
+
kdata:
|
| 9 |
+
|
| 10 |
+
services:
|
| 11 |
+
zookeeper:
|
| 12 |
+
image: confluentinc/cp-zookeeper:7.5.3
|
| 13 |
+
container_name: zk
|
| 14 |
+
environment:
|
| 15 |
+
ZOOKEEPER_CLIENT_PORT: 2181
|
| 16 |
+
ZOOKEEPER_TICK_TIME: 2000
|
| 17 |
+
ports:
|
| 18 |
+
- "2181:2181"
|
| 19 |
+
networks: [coffee-net]
|
| 20 |
+
volumes:
|
| 21 |
+
- zkdata:/var/lib/zookeeper/data
|
| 22 |
+
|
| 23 |
+
kafka:
|
| 24 |
+
image: confluentinc/cp-kafka:7.5.3
|
| 25 |
+
container_name: kafka
|
| 26 |
+
depends_on:
|
| 27 |
+
- zookeeper
|
| 28 |
+
ports:
|
| 29 |
+
- "9092:9092" # internal clients in compose can use kafka:9092
|
| 30 |
+
- "29092:29092" # host tools (kcat, etc.) can use localhost:29092
|
| 31 |
+
environment:
|
| 32 |
+
KAFKA_BROKER_ID: 1
|
| 33 |
+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
| 34 |
+
|
| 35 |
+
# 2 listeners: one for containers (kafka:9092), one for host (localhost:29092)
|
| 36 |
+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
|
| 37 |
+
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,PLAINTEXT_HOST://0.0.0.0:29092
|
| 38 |
+
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
|
| 39 |
+
|
| 40 |
+
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
|
| 41 |
+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
| 42 |
+
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
|
| 43 |
+
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
|
| 44 |
+
# ✅ Healthcheck: mark healthy only when the broker responds
|
| 45 |
+
healthcheck:
|
| 46 |
+
# Either of these works; pick ONE test line and keep it.
|
| 47 |
+
# test: ["CMD-SHELL", "kafka-topics --bootstrap-server localhost:9092 --list >/dev/null 2>&1 || exit 1"]
|
| 48 |
+
test: ["CMD-SHELL", "kafka-broker-api-versions --bootstrap-server localhost:9092 >/dev/null 2>&1 || exit 1"]
|
| 49 |
+
interval: 10s
|
| 50 |
+
timeout: 5s
|
| 51 |
+
retries: 10
|
| 52 |
+
start_period: 20s
|
| 53 |
+
|
| 54 |
+
networks: [coffee-net]
|
| 55 |
+
volumes:
|
| 56 |
+
- kdata:/var/lib/kafka/data
|
| 57 |
+
|
| 58 |
+
postgres:
|
| 59 |
+
image: postgres:16
|
| 60 |
+
container_name: postgres
|
| 61 |
+
environment:
|
| 62 |
+
POSTGRES_USER: cafe
|
| 63 |
+
POSTGRES_PASSWORD: cafe
|
| 64 |
+
POSTGRES_DB: coffeeshop
|
| 65 |
+
ports:
|
| 66 |
+
- "5432:5432"
|
| 67 |
+
volumes:
|
| 68 |
+
- pgdata:/var/lib/postgresql/data
|
| 69 |
+
- ./db/init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
|
| 70 |
+
networks: [coffee-net]
|
| 71 |
+
healthcheck:
|
| 72 |
+
test: ["CMD-SHELL", "pg_isready -U cafe -d coffeeshop"]
|
| 73 |
+
interval: 5s
|
| 74 |
+
timeout: 3s
|
| 75 |
+
retries: 20
|
| 76 |
+
|
| 77 |
+
orders-service:
|
| 78 |
+
container_name: orders-service
|
| 79 |
+
build:
|
| 80 |
+
context: ../orders-service
|
| 81 |
+
dockerfile: Dockerfile
|
| 82 |
+
environment:
|
| 83 |
+
# Kafka for containers: use kafka:9092
|
| 84 |
+
KAFKA_BOOTSTRAP: kafka:9092
|
| 85 |
+
# DB settings used by server.xml
|
| 86 |
+
DB_HOST: postgres
|
| 87 |
+
DB_PORT: 5432
|
| 88 |
+
DB_NAME: coffeeshop
|
| 89 |
+
DB_USER: cafe
|
| 90 |
+
DB_PASSWORD: cafe
|
| 91 |
+
ports:
|
| 92 |
+
- "8081:9080" # http
|
| 93 |
+
- "9441:9443" # https (optional)
|
| 94 |
+
depends_on:
|
| 95 |
+
kafka:
|
| 96 |
+
condition: service_healthy
|
| 97 |
+
postgres:
|
| 98 |
+
condition: service_healthy
|
| 99 |
+
networks: [coffee-net]
|
| 100 |
+
|
| 101 |
+
barista-service:
|
| 102 |
+
container_name: barista-service
|
| 103 |
+
build:
|
| 104 |
+
context: ../barista-service
|
| 105 |
+
dockerfile: Dockerfile
|
| 106 |
+
environment:
|
| 107 |
+
KAFKA_BOOTSTRAP: kafka:9092
|
| 108 |
+
ports:
|
| 109 |
+
- "8082:9080"
|
| 110 |
+
- "9442:9443"
|
| 111 |
+
depends_on:
|
| 112 |
+
- kafka
|
| 113 |
+
networks: [coffee-net]
|
| 114 |
+
|
| 115 |
+
kitchen-service:
|
| 116 |
+
container_name: kitchen-service
|
| 117 |
+
build:
|
| 118 |
+
context: ../kitchen-service
|
| 119 |
+
dockerfile: Dockerfile
|
| 120 |
+
environment:
|
| 121 |
+
KAFKA_BOOTSTRAP: kafka:9092
|
| 122 |
+
ports:
|
| 123 |
+
- "8083:9080"
|
| 124 |
+
- "9443:9443"
|
| 125 |
+
depends_on:
|
| 126 |
+
- kafka
|
| 127 |
+
networks: [coffee-net]
|
benchmark/whole_applications/coffee-shop/jakarta/scripts/create-topics.sh
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
COMPOSE="docker compose -f docker/docker-compose.yml"
|
| 5 |
+
|
| 6 |
+
topics=(
|
| 7 |
+
"barista-commands"
|
| 8 |
+
"kitchen-commands"
|
| 9 |
+
"order-updates"
|
| 10 |
+
)
|
| 11 |
+
|
| 12 |
+
for t in "${topics[@]}"; do
|
| 13 |
+
echo "Creating topic: $t (if not exists)"
|
| 14 |
+
$COMPOSE exec -T kafka kafka-topics --bootstrap-server kafka:9092 --create --if-not-exists --topic "$t" --replication-factor 1 --partitions 1 || true
|
| 15 |
+
done
|
| 16 |
+
|
| 17 |
+
echo "Listing topics:"
|
| 18 |
+
$COMPOSE exec -T kafka kafka-topics --bootstrap-server kafka:9092 --list
|
benchmark/whole_applications/coffee-shop/jakarta/scripts/down.sh
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
docker compose -f docker/docker-compose.yml down -v
|
benchmark/whole_applications/coffee-shop/jakarta/scripts/smoke-consumers.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
echo "Tailing service logs (Ctrl+C to stop) ..."
|
| 5 |
+
docker compose -f docker/docker-compose.yml logs -f orders-service barista-service kitchen-service
|
benchmark/whole_applications/coffee-shop/jakarta/scripts/smoke-orders.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
URL="http://localhost:8081/orders-service/api/orders"
|
| 5 |
+
echo "POST -> ${URL}"
|
| 6 |
+
curl -sS -i -X POST "${URL}" -H 'Content-Type: application/json' -d '{"customer":"Raju","item":"latte","quantity":1}'
|
| 7 |
+
echo
|
| 8 |
+
echo "Query DB for latest rows:"
|
| 9 |
+
docker compose -f docker/docker-compose.yml exec -T postgres psql -U cafe -d coffeeshop -c "SELECT id, customer, item, quantity, status, created, updated FROM orders ORDER BY id DESC LIMIT 5;"
|
benchmark/whole_applications/coffee-shop/jakarta/scripts/smoke_drink.sh
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
ORDERS_URL=${ORDERS_URL:-http://localhost:8081/orders-service}
|
| 5 |
+
POST_URL="$ORDERS_URL/api/orders"
|
| 6 |
+
|
| 7 |
+
require() {
|
| 8 |
+
command -v "$1" >/dev/null 2>&1 || { echo "Missing dependency: $1"; exit 1; }
|
| 9 |
+
}
|
| 10 |
+
require curl
|
| 11 |
+
require jq
|
| 12 |
+
|
| 13 |
+
echo "==> placing DRINK order (latte)"
|
| 14 |
+
resp=$(curl -sS -X POST "$POST_URL" \
|
| 15 |
+
-H 'Content-Type: application/json' \
|
| 16 |
+
-d '{"customer":"Raju","item":"latte","quantity":1}')
|
| 17 |
+
|
| 18 |
+
echo "POST response: $resp"
|
| 19 |
+
order_id=$(echo "$resp" | jq -r '.id // .orderId // empty')
|
| 20 |
+
if [[ -z "${order_id}" || "${order_id}" == "null" ]]; then
|
| 21 |
+
echo "Could not parse order id from response."; exit 2
|
| 22 |
+
fi
|
| 23 |
+
echo "Order id: $order_id"
|
| 24 |
+
|
| 25 |
+
echo "==> waiting for status to become READY"
|
| 26 |
+
for i in {1..40}; do
|
| 27 |
+
status=$(curl -sS "$ORDERS_URL/api/orders/$order_id" | jq -r '.status // empty')
|
| 28 |
+
echo "poll $i -> $status"
|
| 29 |
+
[[ "$status" == "READY" ]] && { echo "✅ drink order READY"; exit 0; }
|
| 30 |
+
sleep 1
|
| 31 |
+
done
|
| 32 |
+
|
| 33 |
+
echo "❌ timeout waiting for READY"; exit 3
|
benchmark/whole_applications/coffee-shop/jakarta/scripts/smoke_food.sh
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
ORDERS_URL=${ORDERS_URL:-http://localhost:8081/orders-service}
|
| 5 |
+
POST_URL="$ORDERS_URL/api/orders"
|
| 6 |
+
|
| 7 |
+
command -v curl >/dev/null || { echo "Missing curl"; exit 1; }
|
| 8 |
+
command -v jq >/dev/null || { echo "Missing jq"; exit 1; }
|
| 9 |
+
|
| 10 |
+
echo "==> placing FOOD order (sandwich)"
|
| 11 |
+
resp=$(curl -sS -X POST "$POST_URL" \
|
| 12 |
+
-H 'Content-Type: application/json' \
|
| 13 |
+
-d '{"customer":"Raju","item":"sandwich","quantity":1}')
|
| 14 |
+
|
| 15 |
+
echo "POST response: $resp"
|
| 16 |
+
order_id=$(echo "$resp" | jq -r '.id // .orderId // empty')
|
| 17 |
+
[[ -z "${order_id}" || "${order_id}" == "null" ]] && { echo "No order id"; exit 2; }
|
| 18 |
+
|
| 19 |
+
echo "==> waiting for status to become READY"
|
| 20 |
+
for i in {1..40}; do
|
| 21 |
+
status=$(curl -sS "$ORDERS_URL/api/orders/$order_id" | jq -r '.status // empty')
|
| 22 |
+
echo "poll $i -> $status"
|
| 23 |
+
[[ "$status" == "READY" ]] && { echo "✅ food order READY"; exit 0; }
|
| 24 |
+
sleep 1
|
| 25 |
+
done
|
| 26 |
+
|
| 27 |
+
echo "❌ timeout waiting for READY"; exit 3
|
benchmark/whole_applications/coffee-shop/jakarta/scripts/up.sh
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
# 1) build all wars
|
| 5 |
+
mvn -q -DskipTests clean package
|
| 6 |
+
|
| 7 |
+
# 2) build images
|
| 8 |
+
docker compose -f docker/docker-compose.yml build
|
| 9 |
+
|
| 10 |
+
# 3) up
|
| 11 |
+
docker compose -f docker/docker-compose.yml up -d
|
| 12 |
+
|
| 13 |
+
echo "==> Wait a few seconds, then run: scripts/smoke_drink.sh and scripts/smoke_food.sh"
|
benchmark/whole_applications/coffee-shop/jakarta/scripts/wait-for-http.sh
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# wait-for-http.sh <url> [timeout_seconds]
|
| 3 |
+
set -euo pipefail
|
| 4 |
+
|
| 5 |
+
URL="${1:-http://localhost:9081/health}"
|
| 6 |
+
TIMEOUT="${2:-60}"
|
| 7 |
+
|
| 8 |
+
echo "Waiting up to ${TIMEOUT}s for ${URL} ..."
|
| 9 |
+
end=$((SECONDS+TIMEOUT))
|
| 10 |
+
while [ $SECONDS -lt $end ]; do
|
| 11 |
+
if curl -fsS "${URL}" >/dev/null 2>&1; then
|
| 12 |
+
echo "OK: ${URL}"
|
| 13 |
+
exit 0
|
| 14 |
+
fi
|
| 15 |
+
sleep 2
|
| 16 |
+
done
|
| 17 |
+
|
| 18 |
+
echo "TIMEOUT waiting for ${URL}"
|
| 19 |
+
exit 1
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/CoffeeShopApplication.java
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package com.coffeeshop;
|
| 2 |
+
|
| 3 |
+
import jakarta.ws.rs.ApplicationPath;
|
| 4 |
+
import jakarta.ws.rs.core.Application;
|
| 5 |
+
|
| 6 |
+
@ApplicationPath("/api")
|
| 7 |
+
public class CoffeeShopApplication extends Application {}
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/barista/api/StatusResource.java
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package com.coffeeshop.barista.api;
|
| 2 |
+
|
| 3 |
+
import jakarta.ws.rs.GET;
|
| 4 |
+
import jakarta.ws.rs.Path;
|
| 5 |
+
import jakarta.ws.rs.Produces;
|
| 6 |
+
import jakarta.ws.rs.core.MediaType;
|
| 7 |
+
|
| 8 |
+
@Path("/barista/status")
|
| 9 |
+
public class StatusResource {
|
| 10 |
+
@GET
|
| 11 |
+
@Produces(MediaType.TEXT_PLAIN)
|
| 12 |
+
public String ok() {
|
| 13 |
+
return "barista ok";
|
| 14 |
+
}
|
| 15 |
+
}
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/barista/health/BasicHealth.java
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package com.coffeeshop.barista.health;
|
| 2 |
+
|
| 3 |
+
import org.eclipse.microprofile.health.HealthCheck;
|
| 4 |
+
import org.eclipse.microprofile.health.HealthCheckResponse;
|
| 5 |
+
import org.eclipse.microprofile.health.Readiness;
|
| 6 |
+
import jakarta.enterprise.context.ApplicationScoped;
|
| 7 |
+
|
| 8 |
+
@Readiness
|
| 9 |
+
@ApplicationScoped
|
| 10 |
+
public class BasicHealth implements HealthCheck {
|
| 11 |
+
@Override
|
| 12 |
+
public HealthCheckResponse call() {
|
| 13 |
+
return HealthCheckResponse.up("barista-service");
|
| 14 |
+
}
|
| 15 |
+
}
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/barista/messaging/BaristaConsumer.java
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package com.coffeeshop.barista.messaging;
|
| 2 |
+
|
| 3 |
+
import jakarta.enterprise.context.ApplicationScoped;
|
| 4 |
+
import jakarta.json.bind.Jsonb;
|
| 5 |
+
import jakarta.json.bind.JsonbBuilder;
|
| 6 |
+
import org.eclipse.microprofile.reactive.messaging.Incoming;
|
| 7 |
+
import org.eclipse.microprofile.reactive.messaging.Outgoing;
|
| 8 |
+
import org.eclipse.microprofile.reactive.messaging.Message;
|
| 9 |
+
|
| 10 |
+
import java.util.HashMap;
|
| 11 |
+
import java.util.Map;
|
| 12 |
+
|
| 13 |
+
@ApplicationScoped
|
| 14 |
+
public class BaristaConsumer {
|
| 15 |
+
|
| 16 |
+
private final Jsonb jsonb = JsonbBuilder.create();
|
| 17 |
+
|
| 18 |
+
// Consumes commands from orders-service (topic: barista-commands)
|
| 19 |
+
@Incoming("barista")
|
| 20 |
+
// Publishes order status updates (topic: order-updates)
|
| 21 |
+
@Outgoing("barista-order-updates")
|
| 22 |
+
public Message<String> makeCoffee(String orderJson) {
|
| 23 |
+
try {
|
| 24 |
+
System.out.println("[barista] received: " + orderJson);
|
| 25 |
+
Map<String, Object> in = jsonb.fromJson(orderJson, Map.class);
|
| 26 |
+
|
| 27 |
+
Object orderId = in.get("orderId");
|
| 28 |
+
|
| 29 |
+
Map<String, Object> out = new HashMap<>();
|
| 30 |
+
if (orderId != null) {
|
| 31 |
+
out.put("orderId", orderId);
|
| 32 |
+
}
|
| 33 |
+
out.put("status", "READY");
|
| 34 |
+
out.put("from", "barista");
|
| 35 |
+
|
| 36 |
+
return Message.of(jsonb.toJson(out));
|
| 37 |
+
|
| 38 |
+
} catch (Exception e) {
|
| 39 |
+
System.err.println("[barista] parse/update error: " + e + " payload=" + orderJson);
|
| 40 |
+
throw e;
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
}
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/common/domain/OrderAck.java
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package com.coffeeshop.common.domain;
|
| 2 |
+
|
| 3 |
+
public record OrderAck(String id) {}
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/common/domain/OrderRequest.java
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package com.coffeeshop.common.domain;
|
| 2 |
+
|
| 3 |
+
import jakarta.validation.constraints.Min;
|
| 4 |
+
import jakarta.validation.constraints.NotBlank;
|
| 5 |
+
|
| 6 |
+
public record OrderRequest(
|
| 7 |
+
@NotBlank String customer,
|
| 8 |
+
@NotBlank String item,
|
| 9 |
+
@Min(1) int quantity
|
| 10 |
+
) {}
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/common/domain/OrderStatus.java
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package com.coffeeshop.common.domain;
|
| 2 |
+
|
| 3 |
+
public enum OrderStatus {
|
| 4 |
+
PLACED, IN_PROGRESS, READY, DELIVERED, CANCELLED
|
| 5 |
+
}
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/java/com/coffeeshop/orders/service/OrderService.java
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package com.coffeeshop.orders.service;
|
| 2 |
+
|
| 3 |
+
import com.coffeeshop.common.domain.OrderRequest;
|
| 4 |
+
import com.coffeeshop.orders.domain.OrderEntity;
|
| 5 |
+
import com.coffeeshop.orders.domain.OrderRepository;
|
| 6 |
+
import com.coffeeshop.orders.messaging.OrdersPipeline;
|
| 7 |
+
import jakarta.enterprise.context.ApplicationScoped;
|
| 8 |
+
import jakarta.inject.Inject;
|
| 9 |
+
import jakarta.validation.Valid;
|
| 10 |
+
|
| 11 |
+
@ApplicationScoped
|
| 12 |
+
public class OrderService {
|
| 13 |
+
@Inject OrderRepository repo;
|
| 14 |
+
@Inject OrdersPipeline pipeline;
|
| 15 |
+
|
| 16 |
+
public String place(@Valid OrderRequest req){
|
| 17 |
+
var e = new OrderEntity();
|
| 18 |
+
e.setCustomer(req.customer());
|
| 19 |
+
e.setItem(req.item());
|
| 20 |
+
e.setQuantity(req.quantity());
|
| 21 |
+
repo.save(e);
|
| 22 |
+
|
| 23 |
+
// simple routing: drinks -> barista, everything else -> kitchen
|
| 24 |
+
if (isDrink(req.item())) {
|
| 25 |
+
pipeline.publishToBarista(new OrdersPipeline.OrderCommand("BARISTA", e.getId(), req.item(), req.quantity()));
|
| 26 |
+
} else {
|
| 27 |
+
pipeline.publishToKitchen(new OrdersPipeline.OrderCommand("KITCHEN", e.getId(), req.item(), req.quantity()));
|
| 28 |
+
}
|
| 29 |
+
return String.valueOf(e.getId());
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
private boolean isDrink(String item) {
|
| 33 |
+
if (item == null) return false;
|
| 34 |
+
var s = item.toLowerCase();
|
| 35 |
+
return s.contains("coffee") || s.contains("latte") || s.contains("espresso")
|
| 36 |
+
|| s.contains("cappuccino") || s.contains("americano") || s.contains("mocha")
|
| 37 |
+
|| s.contains("tea");
|
| 38 |
+
}
|
| 39 |
+
}
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/liberty/config/server.xml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<server>
|
| 2 |
+
<logging traceSpecification="JPA=all:com.ibm.ws.jpa.*=all"/>
|
| 3 |
+
|
| 4 |
+
<featureManager>
|
| 5 |
+
<feature>webProfile-10.0</feature>
|
| 6 |
+
|
| 7 |
+
<!-- JPA – BOTH are needed for @PersistenceContext -->
|
| 8 |
+
<feature>persistence-3.1</feature>
|
| 9 |
+
<feature>persistenceContainer-3.1</feature>
|
| 10 |
+
|
| 11 |
+
<!-- Validation is required because you use @Valid etc. -->
|
| 12 |
+
<feature>beanValidation-3.0</feature>
|
| 13 |
+
|
| 14 |
+
<!-- MicroProfile features -->
|
| 15 |
+
<feature>mpConfig-3.1</feature>
|
| 16 |
+
<feature>mpHealth-4.0</feature>
|
| 17 |
+
<feature>mpOpenAPI-3.1</feature>
|
| 18 |
+
<feature>mpMetrics-5.1</feature>
|
| 19 |
+
<feature>mpRestClient-3.0</feature>
|
| 20 |
+
<feature>mpReactiveMessaging-3.0</feature>
|
| 21 |
+
<feature>mpJwt-2.1</feature>
|
| 22 |
+
</featureManager>
|
| 23 |
+
|
| 24 |
+
<httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9080" httpsPort="9443"/>
|
| 25 |
+
|
| 26 |
+
<basicRegistry id="basic" realm="defaultRealm">
|
| 27 |
+
<user name="admin" password="adminpwd"/>
|
| 28 |
+
</basicRegistry>
|
| 29 |
+
|
| 30 |
+
<!-- JDBC driver jar lives in /config/lib/global inside the container -->
|
| 31 |
+
<library id="jdbcLib">
|
| 32 |
+
<fileset dir="${server.config.dir}/lib/global" includes="*.jar"/>
|
| 33 |
+
</library>
|
| 34 |
+
|
| 35 |
+
<dataSource id="ordersDS" jndiName="jdbc/ordersDS">
|
| 36 |
+
<jdbcDriver libraryRef="jdbcLib"/>
|
| 37 |
+
<properties
|
| 38 |
+
databaseName="${env.DB_NAME}"
|
| 39 |
+
user="${env.DB_USER}"
|
| 40 |
+
password="${env.DB_PASSWORD}"
|
| 41 |
+
serverName="${env.DB_HOST}"
|
| 42 |
+
portNumber="${env.DB_PORT:5432}"/>
|
| 43 |
+
</dataSource>
|
| 44 |
+
|
| 45 |
+
<webApplication id="coffeeshop"
|
| 46 |
+
location="${server.config.dir}/apps/coffeeshop.war"
|
| 47 |
+
contextRoot="/"/>
|
| 48 |
+
|
| 49 |
+
</server>
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/resources/META-INF/microprofile-config.properties
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# bootstrap (fallback so dev works even if env var is missing)
|
| 2 |
+
mp.messaging.connector.liberty-kafka.bootstrap.servers=${KAFKA_BOOTSTRAP:localhost:9092}
|
| 3 |
+
|
| 4 |
+
# --- orders outgoing: Emitter -> barista-commands topic ---
|
| 5 |
+
mp.messaging.outgoing.barista-out.connector=liberty-kafka
|
| 6 |
+
mp.messaging.outgoing.barista-out.topic=barista-commands
|
| 7 |
+
mp.messaging.outgoing.barista-out.key.serializer=org.apache.kafka.common.serialization.StringSerializer
|
| 8 |
+
mp.messaging.outgoing.barista-out.value.serializer=org.apache.kafka.common.serialization.StringSerializer
|
| 9 |
+
|
| 10 |
+
# --- orders outgoing: Emitter -> kitchen-commands topic ---
|
| 11 |
+
mp.messaging.outgoing.kitchen-out.connector=liberty-kafka
|
| 12 |
+
mp.messaging.outgoing.kitchen-out.topic=kitchen-commands
|
| 13 |
+
mp.messaging.outgoing.kitchen-out.key.serializer=org.apache.kafka.common.serialization.StringSerializer
|
| 14 |
+
mp.messaging.outgoing.kitchen-out.value.serializer=org.apache.kafka.common.serialization.StringSerializer
|
| 15 |
+
|
| 16 |
+
# --- barista incoming: from barista-commands topic ---
|
| 17 |
+
mp.messaging.incoming.barista.connector=liberty-kafka
|
| 18 |
+
mp.messaging.incoming.barista.topic=barista-commands
|
| 19 |
+
mp.messaging.incoming.barista.key.deserializer=org.apache.kafka.common.serialization.StringDeserializer
|
| 20 |
+
mp.messaging.incoming.barista.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
|
| 21 |
+
mp.messaging.incoming.barista.auto.offset.reset=latest
|
| 22 |
+
mp.messaging.incoming.barista.group.id=barista-service-dev
|
| 23 |
+
|
| 24 |
+
# --- barista outgoing: -> order-updates topic ---
|
| 25 |
+
mp.messaging.outgoing.barista-order-updates.connector=liberty-kafka
|
| 26 |
+
mp.messaging.outgoing.barista-order-updates.topic=order-updates
|
| 27 |
+
mp.messaging.outgoing.barista-order-updates.key.serializer=org.apache.kafka.common.serialization.StringSerializer
|
| 28 |
+
mp.messaging.outgoing.barista-order-updates.value.serializer=org.apache.kafka.common.serialization.StringSerializer
|
| 29 |
+
|
| 30 |
+
# --- kitchen incoming: from kitchen-commands topic ---
|
| 31 |
+
mp.messaging.incoming.kitchen.connector=liberty-kafka
|
| 32 |
+
mp.messaging.incoming.kitchen.topic=kitchen-commands
|
| 33 |
+
mp.messaging.incoming.kitchen.group.id=kitchen-service
|
| 34 |
+
mp.messaging.incoming.kitchen.key.deserializer=org.apache.kafka.common.serialization.StringDeserializer
|
| 35 |
+
mp.messaging.incoming.kitchen.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
|
| 36 |
+
|
| 37 |
+
# --- kitchen outgoing: -> order-updates topic ---
|
| 38 |
+
mp.messaging.outgoing.kitchen-order-updates.connector=liberty-kafka
|
| 39 |
+
mp.messaging.outgoing.kitchen-order-updates.topic=order-updates
|
| 40 |
+
mp.messaging.outgoing.kitchen-order-updates.key.serializer=org.apache.kafka.common.serialization.StringSerializer
|
| 41 |
+
mp.messaging.outgoing.kitchen-order-updates.value.serializer=org.apache.kafka.common.serialization.StringSerializer
|
| 42 |
+
|
| 43 |
+
# --- orders incoming: from order-updates topic ---
|
| 44 |
+
mp.messaging.incoming.order-updates.connector=liberty-kafka
|
| 45 |
+
mp.messaging.incoming.order-updates.topic=order-updates
|
| 46 |
+
mp.messaging.incoming.order-updates.key.deserializer=org.apache.kafka.common.serialization.StringDeserializer
|
| 47 |
+
mp.messaging.incoming.order-updates.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
|
| 48 |
+
mp.messaging.incoming.order-updates.group.id=orders-service
|
| 49 |
+
mp.messaging.incoming.order-updates.auto.offset.reset=latest
|
| 50 |
+
mp.messaging.incoming.order-updates.failure-strategy=ignore
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/resources/META-INF/persistence.xml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<persistence xmlns="https://jakarta.ee/xml/ns/persistence" version="3.0">
|
| 3 |
+
<persistence-unit name="ordersPU" transaction-type="JTA">
|
| 4 |
+
<jta-data-source>jdbc/ordersDS</jta-data-source>
|
| 5 |
+
<properties>
|
| 6 |
+
<property name="jakarta.persistence.schema-generation.database.action" value="none"/>
|
| 7 |
+
<property name="jakarta.persistence.validation.mode" value="NONE"/>
|
| 8 |
+
<property name="eclipselink.logging.level" value="FINE"/>
|
| 9 |
+
</properties>
|
| 10 |
+
</persistence-unit>
|
| 11 |
+
</persistence>
|
benchmark/whole_applications/coffee-shop/jakarta/src/main/webapp/coffeeshopTemplate.html
ADDED
|
@@ -0,0 +1,975 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8">
|
| 5 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 7 |
+
<meta name="format-detection" content="telephone=no">
|
| 8 |
+
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
| 9 |
+
<title>Quarkus Coffee Shop</title>
|
| 10 |
+
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
|
| 11 |
+
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
|
| 12 |
+
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
|
| 13 |
+
<link rel="manifest" href="favicon/site.webmanifest">
|
| 14 |
+
<link rel="mask-icon" href="favicon/safari-pinned-tab.svg" color="#5bbad5">
|
| 15 |
+
<link rel="shortcut icon" href="favicon/favicon.ico">
|
| 16 |
+
<meta name="msapplication-TileColor" content="#da532c">
|
| 17 |
+
<meta name="msapplication-config" content="favicon/browserconfig.xml">
|
| 18 |
+
<meta name="theme-color" content="#ffffff">
|
| 19 |
+
<!-- Bootstrap -->
|
| 20 |
+
<link href="vendor/bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet">
|
| 21 |
+
<!-- Base Styles -->
|
| 22 |
+
<link href="css/styles.css" rel="stylesheet">
|
| 23 |
+
<!-- Custom CSS -->
|
| 24 |
+
<link href="css/custom.css" rel="stylesheet">
|
| 25 |
+
<!-- Google Fonts -->
|
| 26 |
+
<link href="https://fonts.googleapis.com/css?family=Cookie%7cMontserrat:300,400,500,600,700%7cRoboto:300,400,500,700" rel="stylesheet">
|
| 27 |
+
<!-- Font Awesome -->
|
| 28 |
+
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
|
| 29 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
|
| 30 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.css">
|
| 31 |
+
<!-- Customized css -->
|
| 32 |
+
<link href="css/cafe.css" rel="stylesheet" />
|
| 33 |
+
<link href="css/toastr.css" rel="stylesheet">
|
| 34 |
+
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
| 35 |
+
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
| 36 |
+
<!--[if lt IE 9]>
|
| 37 |
+
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
| 38 |
+
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
| 39 |
+
<![endif]-->
|
| 40 |
+
</head>
|
| 41 |
+
<body>
|
| 42 |
+
<nav class="navbar navbar-inverse navbar-fixed-top">
|
| 43 |
+
<div class="container">
|
| 44 |
+
<!-- Brand and toggle get grouped for better mobile display -->
|
| 45 |
+
<div class="navbar-header">
|
| 46 |
+
<button type="button" class="navbar-toggler collapsed" data-bs-toggle="collapse" data-bs-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
| 47 |
+
<span class="sr-only">Toggle navigation</span>
|
| 48 |
+
<span class="icon-bar"></span>
|
| 49 |
+
<span class="icon-bar"></span>
|
| 50 |
+
<span class="icon-bar"></span>
|
| 51 |
+
</button>
|
| 52 |
+
<a class="navbar-brand active" href="#banner"><i class="fa fa-coffee"></i> Quarkus Coffee Shop</a>
|
| 53 |
+
</div>
|
| 54 |
+
<!-- Collect the nav links, forms, and other content for toggling -->
|
| 55 |
+
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
| 56 |
+
<ul class="nav navbar-nav navbar-right">
|
| 57 |
+
<li><a href="#about">About</a></li>
|
| 58 |
+
<li><a href="#menu">Menu</a></li>
|
| 59 |
+
<li><a href="#gallery">Gallery</a></li>
|
| 60 |
+
<li><a href="#team">Team</a></li>
|
| 61 |
+
<li><a href="#testimonials">Twitter</a></li>
|
| 62 |
+
<li><a href="#contact">Contact</a></li>
|
| 63 |
+
<li id="rewards_link" class="nav-item"><a class="nav-link" data-bs-toggle="modal" data-bs-target="#rewardsModal">Rewards</a></li>
|
| 64 |
+
</ul>
|
| 65 |
+
</div>
|
| 66 |
+
<!-- /.navbar-collapse -->
|
| 67 |
+
</div>
|
| 68 |
+
<!-- /.container -->
|
| 69 |
+
</nav>
|
| 70 |
+
<span id="banner"></span>
|
| 71 |
+
<section class="banner">
|
| 72 |
+
<div class="jumbotron">
|
| 73 |
+
<div class="container">
|
| 74 |
+
<div class="content">
|
| 75 |
+
<h5>Established 2020</h5>
|
| 76 |
+
<h1>Quarkus Coffee Shop</h1>
|
| 77 |
+
<a href="#menu" class="btn">Place an Order</a>
|
| 78 |
+
</div>
|
| 79 |
+
</div>
|
| 80 |
+
</div>
|
| 81 |
+
</section>
|
| 82 |
+
|
| 83 |
+
<div class="modal" id="rewardsModal">
|
| 84 |
+
<div class="modal-dialog">
|
| 85 |
+
<form id="rewards_modal">
|
| 86 |
+
|
| 87 |
+
<div class="modal-content">
|
| 88 |
+
<!-- Modal Header -->
|
| 89 |
+
<div class="modal-header">
|
| 90 |
+
<h4 class="modal-title">
|
| 91 |
+
Rewards Info
|
| 92 |
+
</h4>
|
| 93 |
+
<button id="btn_cancel" type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| 94 |
+
</div>
|
| 95 |
+
<!-- Modal body -->
|
| 96 |
+
<div class="modal-body flex-fill d-inline-flex">
|
| 97 |
+
<div class="flex-fill d-inline-flex justify-content-end form-group">
|
| 98 |
+
<label for="rewards_id" class="mr-sm-2 input-cafe text-nowrap mb-2">Rewards email:</label>
|
| 99 |
+
<input type="email" required class="form-control mb-2 mr-sm-2" placeholder="Enter rewards email" id="rewards_id" rewards_id="rewards_id">
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
|
| 103 |
+
<!-- Modal footer -->
|
| 104 |
+
<div class="modal-footer">
|
| 105 |
+
<div class="flex-fill">
|
| 106 |
+
<button type="submit" id="rewards_entered" class="btn-sm btn-primary pull-right">Done</button>
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
</form>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
|
| 114 |
+
<span class="anchor" id="about"></span>
|
| 115 |
+
<section class="about">
|
| 116 |
+
<div class="container padding-2x">
|
| 117 |
+
<div class="row text-wrap">
|
| 118 |
+
<div class="col-sm-12">
|
| 119 |
+
<h3 class="text-center">Welcome to Quarkus, Kafka, Kubernetes, and Coffee</h3>
|
| 120 |
+
<hr>
|
| 121 |
+
<p class="text-center">Quarkus is a Kubernetes Native Java stack tailored for OpenJDK HotSpot and GraalVM, crafted from the best of breed Java libraries and standards.</p>
|
| 122 |
+
</div>
|
| 123 |
+
</div>
|
| 124 |
+
<div class="row about-info">
|
| 125 |
+
<div class="col-sm-12 col-md-6">
|
| 126 |
+
<div class="box wow fadeIn" data-wow-duration="400ms" data-wow-offset="10">
|
| 127 |
+
<img src="images/about.jpg" alt="about" />
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
<div class="col-sm-12 col-md-6">
|
| 131 |
+
<div class="box wow fadeIn" data-wow-duration="800ms" data-wow-offset="10">
|
| 132 |
+
<h5>Our Story</h5>
|
| 133 |
+
<p>A Kubernetes Native Java stack tailored for OpenJDK HotSpot and GraalVM, crafted from the best of breed Java libraries and standards.</p>
|
| 134 |
+
<p>Quarkus tailors your application for GraalVM and HotSpot. Amazingly fast boot time, incredibly low RSS memory (not just heap size!) offering near instant scale up and high density memory utilization in container orchestration platforms like Kubernetes.</p>
|
| 135 |
+
<p>This application is demo showcasing an event driven Quarkus application that uses Apache Kafka for messaging.</p>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
</section>
|
| 141 |
+
<span class="anchor" id="menu"></span>
|
| 142 |
+
<section class="menu">
|
| 143 |
+
<div class="container padding-2x">
|
| 144 |
+
<div class="row text-wrap">
|
| 145 |
+
<div class="col-sm-12">
|
| 146 |
+
<h3 class="text-center">Menu</h3>
|
| 147 |
+
<hr>
|
| 148 |
+
<p class="text-center">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. </p>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
<div class="modal" id="myModal">
|
| 152 |
+
<div class="modal-dialog" display="flex">
|
| 153 |
+
<div class="modal-content">
|
| 154 |
+
<!-- Modal Header -->
|
| 155 |
+
<div class="modal-header">
|
| 156 |
+
<h4 class="modal-title" >
|
| 157 |
+
Current Order
|
| 158 |
+
</h4>
|
| 159 |
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| 160 |
+
<div class="pt-10">
|
| 161 |
+
<ul class="list-group mt-10" id="current_order">
|
| 162 |
+
</ul>
|
| 163 |
+
</div>
|
| 164 |
+
<div class="alert alert-success" role="alert"id="item_added_alert" >
|
| 165 |
+
</div>
|
| 166 |
+
</div>
|
| 167 |
+
<!-- Modal body -->
|
| 168 |
+
<div class="modal-body">
|
| 169 |
+
<div id="rewards_display" class="small text-muted" style="align-self: flex-end">
|
| 170 |
+
<text> Rewards member</text>
|
| 171 |
+
<text id="rewards_display_id"></text>
|
| 172 |
+
</div>
|
| 173 |
+
<form class="form-inline" action="" id="item_form">
|
| 174 |
+
<div class="flex-fill d-inline-flex justify-content-between">
|
| 175 |
+
<input type="hidden" id="item_type" name="item_type"/>
|
| 176 |
+
<input type="hidden" id="item_price" name="item_price"/>
|
| 177 |
+
<label for="item" class="mr-sm-2 input-cafe text-nowrap mb-2" id="item_label"></label>
|
| 178 |
+
<input type="hidden" id="item" name="item"/>
|
| 179 |
+
<label for="name" class="mr-sm-2 input-cafe text-nowrap mb-2">for Name:</label>
|
| 180 |
+
<input type="text" class="form-control mb-2 mr-sm-2" placeholder="Enter name" id="name" name="name">
|
| 181 |
+
<button type="submit" class="btn-sm btn-primary mb-2">Add</button>
|
| 182 |
+
</div>
|
| 183 |
+
</form>
|
| 184 |
+
</div>
|
| 185 |
+
|
| 186 |
+
<!-- Modal footer -->
|
| 187 |
+
<div class="modal-footer">
|
| 188 |
+
<form class="form-inline flex-fill" action="" id="order_form">
|
| 189 |
+
<div class="flex-fill">
|
| 190 |
+
<button type="button" class="btn-sm btn-danger" data-bs-dismiss="modal">Back to Menu</button>
|
| 191 |
+
<button type="submit" class="btn-sm btn-primary pull-right">Place Order</button>
|
| 192 |
+
</div>
|
| 193 |
+
</form>
|
| 194 |
+
</div>
|
| 195 |
+
</div>
|
| 196 |
+
</div>
|
| 197 |
+
</div>
|
| 198 |
+
|
| 199 |
+
<div class="row menu-lists">
|
| 200 |
+
<div class="col-sm-12">
|
| 201 |
+
<ul class="nav nav-tabs nav-justified">
|
| 202 |
+
<li class="active"><a data-bs-target="#espresso" data-bs-toggle="tab">BARISTA</a></li>
|
| 203 |
+
<!--
|
| 204 |
+
<li><a data-bs-target="#breakfast" data-bs-toggle="tab">BREAKFAST</a></li>
|
| 205 |
+
<li><a data-bs-target="#lunch" data-bs-toggle="tab">LUNCH</a></li>
|
| 206 |
+
-->
|
| 207 |
+
<li><a data-bs-target="#bakery" data-bs-toggle="tab">BAKERY</a></li>
|
| 208 |
+
</ul>
|
| 209 |
+
<div class="tab-content">
|
| 210 |
+
<div class="tab-pane active" id="espresso">
|
| 211 |
+
<div class="row">
|
| 212 |
+
<div class="col-xs-12 col-md-6">
|
| 213 |
+
<div class="menu-item">
|
| 214 |
+
<div class="name-price-wrap">
|
| 215 |
+
<div class="name pull-left">
|
| 216 |
+
<h6>Coffee (black)</h6>
|
| 217 |
+
</div>
|
| 218 |
+
<div class="price pull-right">
|
| 219 |
+
<button type="button" class="btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#myModal" data-whatever="COFFEE_BLACK" data-item_type="beverage" data-item_price="3.50" data-display_name="Coffee (black)">Add</button>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
<div class="desc">
|
| 223 |
+
<p>a full cup of coffee</p>
|
| 224 |
+
</div>
|
| 225 |
+
</div>
|
| 226 |
+
<div class="menu-item">
|
| 227 |
+
<div class="name-price-wrap">
|
| 228 |
+
<div class="name pull-left">
|
| 229 |
+
<h6>Coffee (with room)</h6>
|
| 230 |
+
</div>
|
| 231 |
+
<div class="price pull-right">
|
| 232 |
+
<button type="button" class="btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#myModal" data-whatever="COFFEE_WITH_ROOM" data-item_type="beverage" data-item_price="3.50" data-display_name="Coffee (with room)">Add</button>
|
| 233 |
+
</div>
|
| 234 |
+
</div>
|
| 235 |
+
<div class="desc">
|
| 236 |
+
<p>a cup of coffee with room for cream or milk</p>
|
| 237 |
+
</div>
|
| 238 |
+
</div>
|
| 239 |
+
<div class="menu-item">
|
| 240 |
+
<div class="name-price-wrap">
|
| 241 |
+
<div class="name pull-left">
|
| 242 |
+
<h6>Espresso - $3.25</h6>
|
| 243 |
+
</div>
|
| 244 |
+
<div class="price pull-right">
|
| 245 |
+
<button type="button" class="btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#myModal" data-whatever="ESPRESSO" data-item_type="beverage" data-item_price="4.00" data-display_name="Espresso">Add</button>
|
| 246 |
+
</div>
|
| 247 |
+
</div>
|
| 248 |
+
<div class="desc">
|
| 249 |
+
<p>espresso served with seltzer water</p>
|
| 250 |
+
</div>
|
| 251 |
+
</div>
|
| 252 |
+
<div class="menu-item">
|
| 253 |
+
<div class="name-price-wrap">
|
| 254 |
+
<div class="name pull-left">
|
| 255 |
+
<h6>Espresso (Double) - $4.25</h6>
|
| 256 |
+
</div>
|
| 257 |
+
<div class="price pull-right">
|
| 258 |
+
<button type="button" class="btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#myModal" data-whatever="ESPRESSO_DOUBLE" data-item_type="beverage" data-item_price="5.25" data-display_name="Double Espresso">Add</button>
|
| 259 |
+
</div>
|
| 260 |
+
</div>
|
| 261 |
+
<div class="desc">
|
| 262 |
+
<p>2 shots of espresso</p>
|
| 263 |
+
</div>
|
| 264 |
+
</div>
|
| 265 |
+
<div class="menu-item">
|
| 266 |
+
<div class="name-price-wrap">
|
| 267 |
+
<div class="name pull-left">
|
| 268 |
+
<h6>Cappuccino - $3.75</h6>
|
| 269 |
+
</div>
|
| 270 |
+
<div class="price pull-right">
|
| 271 |
+
<button type="button" class="btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#myModal" data-whatever="CAPPUCCINO" data-item_type="beverage" data-item_price="3.75" data-display_name="Cappucino">Add</button>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
<div class="desc">
|
| 275 |
+
<p>espresso + 4 oz steamed milk</p>
|
| 276 |
+
</div>
|
| 277 |
+
</div>
|
| 278 |
+
</div>
|
| 279 |
+
<div class="col-xs-12 col-md-6">
|
| 280 |
+
<div class="menu-item">
|
| 281 |
+
<div class="name-price-wrap">
|
| 282 |
+
<div class="name pull-left">
|
| 283 |
+
<h6>Croissant - $4.00</h6>
|
| 284 |
+
</div>
|
| 285 |
+
<div class="price pull-right">
|
| 286 |
+
<button type="button" class="btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#myModal" data-whatever="CROISSANT" data-item_type="kitchen" data-item_price="3.00" data-display_name="Butter Croissant">Add</button>
|
| 287 |
+
</div>
|
| 288 |
+
</div>
|
| 289 |
+
<div class="desc">
|
| 290 |
+
<p>fresh baked butter croissant</p>
|
| 291 |
+
</div>
|
| 292 |
+
</div>
|
| 293 |
+
<div class="menu-item">
|
| 294 |
+
<div class="name-price-wrap">
|
| 295 |
+
<div class="name pull-left">
|
| 296 |
+
<h6>Chocolate Croissant - $4.00</h6>
|
| 297 |
+
</div>
|
| 298 |
+
<div class="price pull-right">
|
| 299 |
+
<button type="button" class="btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#myModal" data-whatever="CROISSANT_CHOCOLATE" data-item_type="kitchen" data-item_price="3.25" data-display_name="Chocolate Croissant">Add</button>
|
| 300 |
+
</div>
|
| 301 |
+
</div>
|
| 302 |
+
<div class="desc">
|
| 303 |
+
<p>fresh baked butter croissant</p>
|
| 304 |
+
</div>
|
| 305 |
+
</div>
|
| 306 |
+
<div class="menu-item">
|
| 307 |
+
<div class="name-price-wrap">
|
| 308 |
+
<div class="name pull-left">
|
| 309 |
+
<h6>Muffin - $3.25</h6>
|
| 310 |
+
</div>
|
| 311 |
+
<div class="price pull-right">
|
| 312 |
+
<button type="button" class="btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#myModal" data-whatever="MUFFIN" data-item_type="kitchen" data-item_price="3.50" data-display_name="Muffin of the Day">Add</button>
|
| 313 |
+
</div>
|
| 314 |
+
</div>
|
| 315 |
+
<div class="desc">
|
| 316 |
+
<p>blueberry muffin</p>
|
| 317 |
+
</div>
|
| 318 |
+
</div>
|
| 319 |
+
<div class="menu-item">
|
| 320 |
+
<div class="name-price-wrap">
|
| 321 |
+
<div class="name pull-left">
|
| 322 |
+
<h6>Cakepop - $2.25</h6>
|
| 323 |
+
</div>
|
| 324 |
+
<div class="price pull-right">
|
| 325 |
+
<button type="button" class="btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#myModal" data-whatever="CAKEPOP" data-item_type="kitchen" data-item_price="2.50" data-display_name="Cakepop">Add</button>
|
| 326 |
+
</div>
|
| 327 |
+
</div>
|
| 328 |
+
<div class="desc">
|
| 329 |
+
<p>chocolate cake with strawberry frosting</p>
|
| 330 |
+
</div>
|
| 331 |
+
</div>
|
| 332 |
+
</div>
|
| 333 |
+
</div>
|
| 334 |
+
</div>
|
| 335 |
+
<div class="tab-pane" id="breakfast">
|
| 336 |
+
<div class="row">
|
| 337 |
+
<div class="col-xs-12 col-md-6">
|
| 338 |
+
<div class="menu-item">
|
| 339 |
+
<div class="name-price-wrap">
|
| 340 |
+
<div class="name pull-left">
|
| 341 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 342 |
+
</div>
|
| 343 |
+
<div class="price pull-right">
|
| 344 |
+
<h6>$20</h6>
|
| 345 |
+
</div>
|
| 346 |
+
</div>
|
| 347 |
+
<div class="desc">
|
| 348 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 349 |
+
</div>
|
| 350 |
+
</div>
|
| 351 |
+
<div class="menu-item">
|
| 352 |
+
<div class="name-price-wrap">
|
| 353 |
+
<div class="name pull-left">
|
| 354 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 355 |
+
</div>
|
| 356 |
+
<div class="price pull-right">
|
| 357 |
+
<h6>$20</h6>
|
| 358 |
+
</div>
|
| 359 |
+
</div>
|
| 360 |
+
<div class="desc">
|
| 361 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 362 |
+
</div>
|
| 363 |
+
</div>
|
| 364 |
+
<div class="menu-item">
|
| 365 |
+
<div class="name-price-wrap">
|
| 366 |
+
<div class="name pull-left">
|
| 367 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 368 |
+
</div>
|
| 369 |
+
<div class="price pull-right">
|
| 370 |
+
<h6>$20</h6>
|
| 371 |
+
</div>
|
| 372 |
+
</div>
|
| 373 |
+
<div class="desc">
|
| 374 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 375 |
+
</div>
|
| 376 |
+
</div>
|
| 377 |
+
<div class="menu-item">
|
| 378 |
+
<div class="name-price-wrap">
|
| 379 |
+
<div class="name pull-left">
|
| 380 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 381 |
+
</div>
|
| 382 |
+
<div class="price pull-right">
|
| 383 |
+
<h6>$20</h6>
|
| 384 |
+
</div>
|
| 385 |
+
</div>
|
| 386 |
+
<div class="desc">
|
| 387 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 388 |
+
</div>
|
| 389 |
+
</div>
|
| 390 |
+
</div>
|
| 391 |
+
<div class="col-xs-12 col-md-6">
|
| 392 |
+
<div class="menu-item">
|
| 393 |
+
<div class="name-price-wrap">
|
| 394 |
+
<div class="name pull-left">
|
| 395 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 396 |
+
</div>
|
| 397 |
+
<div class="price pull-right">
|
| 398 |
+
<h6>$20</h6>
|
| 399 |
+
</div>
|
| 400 |
+
</div>
|
| 401 |
+
<div class="desc">
|
| 402 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 403 |
+
</div>
|
| 404 |
+
</div>
|
| 405 |
+
<div class="menu-item">
|
| 406 |
+
<div class="name-price-wrap">
|
| 407 |
+
<div class="name pull-left">
|
| 408 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 409 |
+
</div>
|
| 410 |
+
<div class="price pull-right">
|
| 411 |
+
<h6>$20</h6>
|
| 412 |
+
</div>
|
| 413 |
+
</div>
|
| 414 |
+
<div class="desc">
|
| 415 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 416 |
+
</div>
|
| 417 |
+
</div>
|
| 418 |
+
<div class="menu-item">
|
| 419 |
+
<div class="name-price-wrap">
|
| 420 |
+
<div class="name pull-left">
|
| 421 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 422 |
+
</div>
|
| 423 |
+
<div class="price pull-right">
|
| 424 |
+
<h6>$20</h6>
|
| 425 |
+
</div>
|
| 426 |
+
</div>
|
| 427 |
+
<div class="desc">
|
| 428 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 429 |
+
</div>
|
| 430 |
+
</div>
|
| 431 |
+
<div class="menu-item">
|
| 432 |
+
<div class="name-price-wrap">
|
| 433 |
+
<div class="name pull-left">
|
| 434 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 435 |
+
</div>
|
| 436 |
+
<div class="price pull-right">
|
| 437 |
+
<h6>$20</h6>
|
| 438 |
+
</div>
|
| 439 |
+
</div>
|
| 440 |
+
<div class="desc">
|
| 441 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 442 |
+
</div>
|
| 443 |
+
</div>
|
| 444 |
+
</div>
|
| 445 |
+
</div>
|
| 446 |
+
</div>
|
| 447 |
+
<div class="tab-pane" id="lunch">
|
| 448 |
+
<div class="row">
|
| 449 |
+
<div class="col-xs-12 col-md-6">
|
| 450 |
+
<div class="menu-item">
|
| 451 |
+
<div class="name-price-wrap">
|
| 452 |
+
<div class="name pull-left">
|
| 453 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 454 |
+
</div>
|
| 455 |
+
<div class="price pull-right">
|
| 456 |
+
<h6>$20</h6>
|
| 457 |
+
</div>
|
| 458 |
+
</div>
|
| 459 |
+
<div class="desc">
|
| 460 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 461 |
+
</div>
|
| 462 |
+
</div>
|
| 463 |
+
<div class="menu-item">
|
| 464 |
+
<div class="name-price-wrap">
|
| 465 |
+
<div class="name pull-left">
|
| 466 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 467 |
+
</div>
|
| 468 |
+
<div class="price pull-right">
|
| 469 |
+
<h6>$20</h6>
|
| 470 |
+
</div>
|
| 471 |
+
</div>
|
| 472 |
+
<div class="desc">
|
| 473 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 474 |
+
</div>
|
| 475 |
+
</div>
|
| 476 |
+
<div class="menu-item">
|
| 477 |
+
<div class="name-price-wrap">
|
| 478 |
+
<div class="name pull-left">
|
| 479 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 480 |
+
</div>
|
| 481 |
+
<div class="price pull-right">
|
| 482 |
+
<h6>$20</h6>
|
| 483 |
+
</div>
|
| 484 |
+
</div>
|
| 485 |
+
<div class="desc">
|
| 486 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 487 |
+
</div>
|
| 488 |
+
</div>
|
| 489 |
+
<div class="menu-item">
|
| 490 |
+
<div class="name-price-wrap">
|
| 491 |
+
<div class="name pull-left">
|
| 492 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 493 |
+
</div>
|
| 494 |
+
<div class="price pull-right">
|
| 495 |
+
<h6>$20</h6>
|
| 496 |
+
</div>
|
| 497 |
+
</div>
|
| 498 |
+
<div class="desc">
|
| 499 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 500 |
+
</div>
|
| 501 |
+
</div>
|
| 502 |
+
</div>
|
| 503 |
+
<div class="col-xs-12 col-md-6">
|
| 504 |
+
<div class="menu-item">
|
| 505 |
+
<div class="name-price-wrap">
|
| 506 |
+
<div class="name pull-left">
|
| 507 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 508 |
+
</div>
|
| 509 |
+
<div class="price pull-right">
|
| 510 |
+
<h6>$20</h6>
|
| 511 |
+
</div>
|
| 512 |
+
</div>
|
| 513 |
+
<div class="desc">
|
| 514 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 515 |
+
</div>
|
| 516 |
+
</div>
|
| 517 |
+
<div class="menu-item">
|
| 518 |
+
<div class="name-price-wrap">
|
| 519 |
+
<div class="name pull-left">
|
| 520 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 521 |
+
</div>
|
| 522 |
+
<div class="price pull-right">
|
| 523 |
+
<h6>$20</h6>
|
| 524 |
+
</div>
|
| 525 |
+
</div>
|
| 526 |
+
<div class="desc">
|
| 527 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 528 |
+
</div>
|
| 529 |
+
</div>
|
| 530 |
+
<div class="menu-item">
|
| 531 |
+
<div class="name-price-wrap">
|
| 532 |
+
<div class="name pull-left">
|
| 533 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 534 |
+
</div>
|
| 535 |
+
<div class="price pull-right">
|
| 536 |
+
<h6>$20</h6>
|
| 537 |
+
</div>
|
| 538 |
+
</div>
|
| 539 |
+
<div class="desc">
|
| 540 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 541 |
+
</div>
|
| 542 |
+
</div>
|
| 543 |
+
<div class="menu-item">
|
| 544 |
+
<div class="name-price-wrap">
|
| 545 |
+
<div class="name pull-left">
|
| 546 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 547 |
+
</div>
|
| 548 |
+
<div class="price pull-right">
|
| 549 |
+
<h6>$20</h6>
|
| 550 |
+
</div>
|
| 551 |
+
</div>
|
| 552 |
+
<div class="desc">
|
| 553 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 554 |
+
</div>
|
| 555 |
+
</div>
|
| 556 |
+
</div>
|
| 557 |
+
</div>
|
| 558 |
+
</div>
|
| 559 |
+
<div class="tab-pane" id="bakery">
|
| 560 |
+
<div class="row">
|
| 561 |
+
<div class="col-xs-12 col-md-6">
|
| 562 |
+
<div class="menu-item">
|
| 563 |
+
<div class="name-price-wrap">
|
| 564 |
+
<div class="name pull-left">
|
| 565 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 566 |
+
</div>
|
| 567 |
+
<div class="price pull-right">
|
| 568 |
+
<h6>$20</h6>
|
| 569 |
+
</div>
|
| 570 |
+
</div>
|
| 571 |
+
<div class="desc">
|
| 572 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 573 |
+
</div>
|
| 574 |
+
</div>
|
| 575 |
+
<div class="menu-item">
|
| 576 |
+
<div class="name-price-wrap">
|
| 577 |
+
<div class="name pull-left">
|
| 578 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 579 |
+
</div>
|
| 580 |
+
<div class="price pull-right">
|
| 581 |
+
<h6>$20</h6>
|
| 582 |
+
</div>
|
| 583 |
+
</div>
|
| 584 |
+
<div class="desc">
|
| 585 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 586 |
+
</div>
|
| 587 |
+
</div>
|
| 588 |
+
<div class="menu-item">
|
| 589 |
+
<div class="name-price-wrap">
|
| 590 |
+
<div class="name pull-left">
|
| 591 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 592 |
+
</div>
|
| 593 |
+
<div class="price pull-right">
|
| 594 |
+
<h6>$20</h6>
|
| 595 |
+
</div>
|
| 596 |
+
</div>
|
| 597 |
+
<div class="desc">
|
| 598 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 599 |
+
</div>
|
| 600 |
+
</div>
|
| 601 |
+
<div class="menu-item">
|
| 602 |
+
<div class="name-price-wrap">
|
| 603 |
+
<div class="name pull-left">
|
| 604 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 605 |
+
</div>
|
| 606 |
+
<div class="price pull-right">
|
| 607 |
+
<h6>$20</h6>
|
| 608 |
+
</div>
|
| 609 |
+
</div>
|
| 610 |
+
<div class="desc">
|
| 611 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 612 |
+
</div>
|
| 613 |
+
</div>
|
| 614 |
+
</div>
|
| 615 |
+
<div class="col-xs-12 col-md-6">
|
| 616 |
+
<div class="menu-item">
|
| 617 |
+
<div class="name-price-wrap">
|
| 618 |
+
<div class="name pull-left">
|
| 619 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 620 |
+
</div>
|
| 621 |
+
<div class="price pull-right">
|
| 622 |
+
<h6>$20</h6>
|
| 623 |
+
</div>
|
| 624 |
+
</div>
|
| 625 |
+
<div class="desc">
|
| 626 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 627 |
+
</div>
|
| 628 |
+
</div>
|
| 629 |
+
<div class="menu-item">
|
| 630 |
+
<div class="name-price-wrap">
|
| 631 |
+
<div class="name pull-left">
|
| 632 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 633 |
+
</div>
|
| 634 |
+
<div class="price pull-right">
|
| 635 |
+
<h6>$20</h6>
|
| 636 |
+
</div>
|
| 637 |
+
</div>
|
| 638 |
+
<div class="desc">
|
| 639 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 640 |
+
</div>
|
| 641 |
+
</div>
|
| 642 |
+
<div class="menu-item">
|
| 643 |
+
<div class="name-price-wrap">
|
| 644 |
+
<div class="name pull-left">
|
| 645 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 646 |
+
</div>
|
| 647 |
+
<div class="price pull-right">
|
| 648 |
+
<h6>$20</h6>
|
| 649 |
+
</div>
|
| 650 |
+
</div>
|
| 651 |
+
<div class="desc">
|
| 652 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 653 |
+
</div>
|
| 654 |
+
</div>
|
| 655 |
+
<div class="menu-item">
|
| 656 |
+
<div class="name-price-wrap">
|
| 657 |
+
<div class="name pull-left">
|
| 658 |
+
<h6>Lorem Ipsum Dolor</h6>
|
| 659 |
+
</div>
|
| 660 |
+
<div class="price pull-right">
|
| 661 |
+
<h6>$20</h6>
|
| 662 |
+
</div>
|
| 663 |
+
</div>
|
| 664 |
+
<div class="desc">
|
| 665 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, duis sed dapibus leo nec ornare diam. </p>
|
| 666 |
+
</div>
|
| 667 |
+
</div>
|
| 668 |
+
</div>
|
| 669 |
+
</div>
|
| 670 |
+
</div>
|
| 671 |
+
</div>
|
| 672 |
+
</div>
|
| 673 |
+
</div>
|
| 674 |
+
</div>
|
| 675 |
+
</section>
|
| 676 |
+
<span class="anchor" id="statusboard"></span>
|
| 677 |
+
<section class="statusboard">
|
| 678 |
+
<div class="container padding-2x">
|
| 679 |
+
<div class="row text-wrap">
|
| 680 |
+
<div class="col-sm-12">
|
| 681 |
+
<h3 class="text-center">Orders</h3>
|
| 682 |
+
<hr/>
|
| 683 |
+
<p class="text-center">Check Here for Your Order Status</p>
|
| 684 |
+
</div>
|
| 685 |
+
<div class="row justify-content-center">
|
| 686 |
+
<table class="table table-lg table-striped">
|
| 687 |
+
<thead class="thead-dark">
|
| 688 |
+
<tr>
|
| 689 |
+
<th style="width:30%">Customer</th>
|
| 690 |
+
<th style="width:30%">Item</th>
|
| 691 |
+
<th style="width:20%">Status</th>
|
| 692 |
+
<th style="width:20%">Prepared By</th>
|
| 693 |
+
</tr>
|
| 694 |
+
</thead>
|
| 695 |
+
<tbody>
|
| 696 |
+
</tbody>
|
| 697 |
+
</table>
|
| 698 |
+
|
| 699 |
+
</div>
|
| 700 |
+
</div>
|
| 701 |
+
</div>
|
| 702 |
+
</section>
|
| 703 |
+
<span class="anchor" id="team"></span>
|
| 704 |
+
<section class="team">
|
| 705 |
+
<div class="container padding-2x">
|
| 706 |
+
<div class="row text-wrap">
|
| 707 |
+
<div class="col-sm-12">
|
| 708 |
+
<h3 class="text-center">Meet Our Team</h3>
|
| 709 |
+
<hr>
|
| 710 |
+
<p class="text-center">Many people contribute to Quarkus, but these 5 Red Hatters were the ones who started the project
|
| 711 |
+
</p>
|
| 712 |
+
</div>
|
| 713 |
+
</div>
|
| 714 |
+
<div class="row team-boxes">
|
| 715 |
+
<div class="col-md-2 col-md-offset-1">
|
| 716 |
+
<div class="box wow fadeInUp" data-wow-duration="400ms" data-wow-offset="10">
|
| 717 |
+
<img src="images/headshots/emmanuel-bernard.jpg" alt="Emmanuel Bernard" />
|
| 718 |
+
<h6>Emmanuel Bernard</h6>
|
| 719 |
+
<p>Co-Founder / Co-Lead</p>
|
| 720 |
+
</div>
|
| 721 |
+
</div>
|
| 722 |
+
<div class="col-md-2">
|
| 723 |
+
<div class="box wow fadeInUp" data-wow-duration="800ms" data-wow-offset="10">
|
| 724 |
+
<img src="images/headshots/jason-greene.jpg" alt="Jason Greene" />
|
| 725 |
+
<h6>Jason Greene</h6>
|
| 726 |
+
<p>Co-Founder / Co-Lead</p>
|
| 727 |
+
</div>
|
| 728 |
+
</div>
|
| 729 |
+
<div class="col-md-2">
|
| 730 |
+
<div class="box wow fadeInUp" data-wow-duration="1.2s" data-wow-offset="10">
|
| 731 |
+
<img src="images/headshots/ken_avatar_2019.png" alt="Ken Finnigan" />
|
| 732 |
+
<h6>Ken Finnigan</h6>
|
| 733 |
+
<p>Pre-Quarkus Co-Founder</p>
|
| 734 |
+
</div>
|
| 735 |
+
</div>
|
| 736 |
+
<div class="col-md-2">
|
| 737 |
+
<div class="box wow fadeInUp" data-wow-duration="1.6s" data-wow-offset="10">
|
| 738 |
+
<img src="images/headshots/max-andersen.jpg" alt="Max Andersen" />
|
| 739 |
+
<h6>Max Andersen</h6>
|
| 740 |
+
<p>Devex Lead</p>
|
| 741 |
+
</div>
|
| 742 |
+
</div>
|
| 743 |
+
<div class="col-md-2">
|
| 744 |
+
<div class="box wow fadeInUp" data-wow-duration="1.6s" data-wow-offset="10">
|
| 745 |
+
<img src="images/headshots/clement_escoffier.jpeg" alt="Clement Escoffier" />
|
| 746 |
+
<h6>Clement Escoffier</h6>
|
| 747 |
+
<p>Reactive Lead</p>
|
| 748 |
+
</div>
|
| 749 |
+
</div>
|
| 750 |
+
</div>
|
| 751 |
+
</div>
|
| 752 |
+
</section>
|
| 753 |
+
<span class="anchor" id="testimonials"></span>
|
| 754 |
+
<section class="testimonials">
|
| 755 |
+
<div id="carousel-testimonials" class="carousel slide" data-bs-ride="carousel">
|
| 756 |
+
<div class="container-fluid padding-2x">
|
| 757 |
+
<!-- Wrapper for slides -->
|
| 758 |
+
<div class="row">
|
| 759 |
+
<div class="col-xs-12">
|
| 760 |
+
<h3 class="text-center">Twitter</h3>
|
| 761 |
+
<hr>
|
| 762 |
+
</div>
|
| 763 |
+
</div>
|
| 764 |
+
<div class="row">
|
| 765 |
+
<div class="col-xs-10 col-xs-offset-1 col-sm-6 col-sm-offset-3">
|
| 766 |
+
<div class="carousel-inner">
|
| 767 |
+
<div class="carousel-item active">
|
| 768 |
+
<div class="carousel-content">
|
| 769 |
+
<blockquote class="twitter-tweet tw-align-center "><p lang="en" dir="ltr">I really like <a href="https://twitter.com/QuarkusIO?ref_src=twsrc%5Etfw">@QuarkusIO</a>'s extension system. The deployment time (build time) hook allows for a lot of interesting uses I haven't thought of yet 🚀</p>— Knut Wannheden (@knutwannheden) <a href="https://twitter.com/knutwannheden/status/1276588974849634304?ref_src=twsrc%5Etfw">June 26, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
| 770 |
+
</div>
|
| 771 |
+
</div>
|
| 772 |
+
<div class="carousel-item">
|
| 773 |
+
<div class="carousel-content">
|
| 774 |
+
<blockquote class="twitter-tweet tw-align-center "><p lang="en" dir="ltr">“One of the real benefits of <a href="https://twitter.com/hashtag/Java?src=hash&ref_src=twsrc%5Etfw">#Java</a> is that it does have a huge <a href="https://twitter.com/hashtag/ecosystem?src=hash&ref_src=twsrc%5Etfw">#ecosystem</a> of <a href="https://twitter.com/hashtag/libraries?src=hash&ref_src=twsrc%5Etfw">#libraries</a> and <a href="https://twitter.com/hashtag/utilities?src=hash&ref_src=twsrc%5Etfw">#utilities</a> for doing practically everything." Therefore, consider using the <a href="https://twitter.com/hashtag/Quarkus?src=hash&ref_src=twsrc%5Etfw">#Quarkus</a> <a href="https://twitter.com/hashtag/framework?src=hash&ref_src=twsrc%5Etfw">#framework</a> for your next <a href="https://twitter.com/hashtag/microservice?src=hash&ref_src=twsrc%5Etfw">#microservice</a> project. <a href="https://twitter.com/QuarkusIO?ref_src=twsrc%5Etfw">@QuarkusIO</a><a href="https://t.co/Z6JNMFSxab">https://t.co/Z6JNMFSxab</a></p>— Felix Seifert (@flx_seifert) <a href="https://twitter.com/flx_seifert/status/1274708071630045185?ref_src=twsrc%5Etfw">June 21, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
| 775 |
+
</div>
|
| 776 |
+
</div>
|
| 777 |
+
<div class="carousel-item">
|
| 778 |
+
<div class="carousel-content">
|
| 779 |
+
<blockquote class="twitter-tweet tw-align-center "><p lang="en" dir="ltr">⚡️New: Running a native image on AWS <a href="https://twitter.com/hashtag/Lambda?src=hash&ref_src=twsrc%5Etfw">#Lambda</a> through <a href="https://twitter.com/hashtag/Quarkus?src=hash&ref_src=twsrc%5Etfw">#Quarkus</a> and <a href="https://twitter.com/hashtag/GraalVM?src=hash&ref_src=twsrc%5Etfw">#GraalVM</a>, <a href="https://twitter.com/sascha242?ref_src=twsrc%5Etfw">@sascha242</a> and me examine the benefits you can get and describe the build steps required for your <a href="https://twitter.com/hashtag/Java?src=hash&ref_src=twsrc%5Etfw">#Java</a> app. <a href="https://t.co/yRSSEvOSuz">https://t.co/yRSSEvOSuz</a> <a href="https://t.co/6H7OOi3geF">pic.twitter.com/6H7OOi3geF</a></p>— Steffen Grunwald (@steffeng) <a href="https://twitter.com/steffeng/status/1273485530030903298?ref_src=twsrc%5Etfw">June 18, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
| 780 |
+
</div>
|
| 781 |
+
</div>
|
| 782 |
+
<!-- Indicators -->
|
| 783 |
+
<div class="carousel-indicators">
|
| 784 |
+
<button type="button" data-bs-target="#carousel-testimonials" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
|
| 785 |
+
<button type="button" data-bs-target="#carousel-testimonials" data-bs-slide-to="1" aria-label="Slide 2"></button>
|
| 786 |
+
<button type="button" data-bs-target="#carousel-testimonials" data-bs-slide-to="2" aria-label="Slide 3"></button>
|
| 787 |
+
</div>
|
| 788 |
+
</div>
|
| 789 |
+
</div>
|
| 790 |
+
</div>
|
| 791 |
+
</div>
|
| 792 |
+
</div>
|
| 793 |
+
</section>
|
| 794 |
+
<span class="anchor" id="gallery"></span>
|
| 795 |
+
<section class="gallery">
|
| 796 |
+
<div class="container padding-2x">
|
| 797 |
+
<div class="row text-wrap">
|
| 798 |
+
<div class="col-sm-12">
|
| 799 |
+
<h3 class="text-center">Gallery</h3>
|
| 800 |
+
<hr>
|
| 801 |
+
<p class="text-center">Pictures of café like things that lend an air of verisimillitude to our demo.</p>
|
| 802 |
+
</div>
|
| 803 |
+
</div>
|
| 804 |
+
<div class="row gallery-images justify-content-center">
|
| 805 |
+
<div class="col-md-12">
|
| 806 |
+
<div class="row">
|
| 807 |
+
<div class="col-md-4 image wow fadeIn" data-wow-delay="100ms" >
|
| 808 |
+
<a href="images/gallery1.png" data-bs-toggle="lightbox" data-gallery="lava-gallery">
|
| 809 |
+
<img src="images/gallery1.png" class="img-responsive" alt="gallery1">
|
| 810 |
+
</a>
|
| 811 |
+
</div>
|
| 812 |
+
<div class="col-md-4 image wow fadeIn" data-wow-delay="200ms" >
|
| 813 |
+
<a href="images/gallery2.png" data-bs-toggle="lightbox" data-gallery="lava-gallery">
|
| 814 |
+
<img src="images/gallery2.png" class="img-responsive" alt="gallery2">
|
| 815 |
+
</a>
|
| 816 |
+
</div>
|
| 817 |
+
<div class="col-md-4 image wow fadeIn" data-wow-delay="300ms" >
|
| 818 |
+
<a href="images/gallery3.png" data-bs-toggle="lightbox" data-gallery="lava-gallery">
|
| 819 |
+
<img src="images/gallery3.png" class="img-responsive" alt="gallery3">
|
| 820 |
+
</a>
|
| 821 |
+
</div>
|
| 822 |
+
<div class="col-md-4 image wow fadeIn" data-wow-delay="400ms" >
|
| 823 |
+
<a href="images/gallery4.png" data-bs-toggle="lightbox" data-gallery="lava-gallery">
|
| 824 |
+
<img src="images/gallery4.png" class="img-responsive" alt="gallery4">
|
| 825 |
+
</a>
|
| 826 |
+
</div>
|
| 827 |
+
<div class="col-md-4 image wow fadeIn" data-wow-delay="500ms" >
|
| 828 |
+
<a href="images/gallery5.png" data-bs-toggle="lightbox" data-gallery="lava-gallery">
|
| 829 |
+
<img src="images/gallery5.png" class="img-responsive" alt="gallery5">
|
| 830 |
+
</a>
|
| 831 |
+
</div>
|
| 832 |
+
<div class="col-md-4 image wow fadeIn" data-wow-delay="600ms" >
|
| 833 |
+
<a href="images/gallery6.png" data-bs-toggle="lightbox" data-gallery="lava-gallery">
|
| 834 |
+
<img src="images/gallery6.png" class="img-responsive" alt="gallery6">
|
| 835 |
+
</a>
|
| 836 |
+
</div>
|
| 837 |
+
<div class="col-md-4 image wow fadeIn" data-wow-delay="700ms" >
|
| 838 |
+
<a href="images/gallery7.png" data-bs-toggle="lightbox" data-gallery="lava-gallery">
|
| 839 |
+
<img src="images/gallery7.png" class="img-responsive" alt="gallery6">
|
| 840 |
+
</a>
|
| 841 |
+
</div>
|
| 842 |
+
<div class="col-md-4 image wow fadeIn" data-wow-delay="800ms" >
|
| 843 |
+
<a href="images/gallery8.png" data-bs-toggle="lightbox" data-gallery="lava-gallery">
|
| 844 |
+
<img src="images/gallery8.png" class="img-responsive" alt="gallery6">
|
| 845 |
+
</a>
|
| 846 |
+
</div>
|
| 847 |
+
<div class="col-md-4 image wow fadeIn" data-wow-delay="900ms" >
|
| 848 |
+
<a href="images/gallery9.png" data-bs-toggle="lightbox" data-gallery="lava-gallery">
|
| 849 |
+
<img src="images/gallery9.png" class="img-responsive" alt="gallery6">
|
| 850 |
+
</a>
|
| 851 |
+
</div>
|
| 852 |
+
</div>
|
| 853 |
+
</div>
|
| 854 |
+
</div>
|
| 855 |
+
</div>
|
| 856 |
+
</section>
|
| 857 |
+
<span class="anchor" id="reservation"></span>
|
| 858 |
+
<section class="cat">
|
| 859 |
+
<div class="container-fluid padding-2x">
|
| 860 |
+
<div class="row">
|
| 861 |
+
<div class="col-xs-12">
|
| 862 |
+
<div class="container">
|
| 863 |
+
<div class="row">
|
| 864 |
+
<div class="col-xs-12">
|
| 865 |
+
<h4>Want to make a reservation? <i class="fa fa-phone"></i> Call 012-345-6789</h4>
|
| 866 |
+
</div>
|
| 867 |
+
</div>
|
| 868 |
+
</div>
|
| 869 |
+
</div>
|
| 870 |
+
</div>
|
| 871 |
+
</div>
|
| 872 |
+
</section>
|
| 873 |
+
<span class="anchor" id="contact"></span>
|
| 874 |
+
<section class="contact">
|
| 875 |
+
<div class="container padding-2x">
|
| 876 |
+
<div class="row text-wrap">
|
| 877 |
+
<div class="col-sm-12">
|
| 878 |
+
<h3 class="text-center">Contact</h3>
|
| 879 |
+
<hr>
|
| 880 |
+
<p>Want to talk to a Red Hatter about Quarkus, Kafka, or Kubernetes? Or let us know what you thought about the demo?</p>
|
| 881 |
+
</div>
|
| 882 |
+
</div>
|
| 883 |
+
<div class="row">
|
| 884 |
+
<div class="col-xs-12 col-md-8 col-md-offset-2">
|
| 885 |
+
<form>
|
| 886 |
+
<div class="form-group col-md-6">
|
| 887 |
+
<input type="text" placeholder="Name" class="form-control" id="name">
|
| 888 |
+
</div>
|
| 889 |
+
<div class="form-group col-md-6">
|
| 890 |
+
<input type="text" placeholder="Email" class="form-control" id="email">
|
| 891 |
+
</div>
|
| 892 |
+
<div class="form-group col-xs-12">
|
| 893 |
+
<input type="text" placeholder="Subject" class="form-control" id="subject">
|
| 894 |
+
</div>
|
| 895 |
+
<div class="form-group col-xs-12">
|
| 896 |
+
<textarea class="form-control" placeholder="How can we help you?" rows="6" id="message"></textarea>
|
| 897 |
+
</div>
|
| 898 |
+
<button type="submit" class="btn btn-default">Submit</button>
|
| 899 |
+
</form>
|
| 900 |
+
</div>
|
| 901 |
+
</div>
|
| 902 |
+
<div class="row contact-boxes">
|
| 903 |
+
<div class="col-lg-4">
|
| 904 |
+
<div class="box wow fadeInUp" data-wow-duration="400ms" data-wow-offset="10">
|
| 905 |
+
<i class="fa fa-map-marker"></i>
|
| 906 |
+
<h6>Visit With Us</h6>
|
| 907 |
+
<p><a href="https://quarkus.io">Quarkus.io</a></p>
|
| 908 |
+
</div>
|
| 909 |
+
</div>
|
| 910 |
+
<div class="col-lg-4">
|
| 911 |
+
<div class="box wow fadeInUp" data-wow-duration="800ms" data-wow-offset="10">
|
| 912 |
+
<i class="fa fa-phone"></i>
|
| 913 |
+
<h6>Get In Touch</h6>
|
| 914 |
+
<p><a href="https://quarkusio.zulipchat.com" >Quarkus Zulip Chat</a></p>
|
| 915 |
+
<p><a href="https://groups.google.com/forum/#!forum/quarkus-dev">Google Groups</a></p>
|
| 916 |
+
</div>
|
| 917 |
+
</div>
|
| 918 |
+
<div class="col-lg-4">
|
| 919 |
+
<div class="box wow fadeInUp" data-wow-duration="1.2s" data-wow-offset="10">
|
| 920 |
+
<i class="fa fa-clock-o"></i>
|
| 921 |
+
<h6>Hours of Operation</h6>
|
| 922 |
+
<p>Monday-Friday: 9am-7pm<br />
|
| 923 |
+
Saturday & Sunday: 8am-8pm
|
| 924 |
+
</p>
|
| 925 |
+
</div>
|
| 926 |
+
</div>
|
| 927 |
+
</div>
|
| 928 |
+
</div>
|
| 929 |
+
</section>
|
| 930 |
+
<section class="footer">
|
| 931 |
+
<div class="container">
|
| 932 |
+
<div class="row">
|
| 933 |
+
<div class="col-xs-12">
|
| 934 |
+
<ul class="list-inline text-center margin-bottom">
|
| 935 |
+
<li><a href=""><i class="fa fa-facebook"></i></a></li>
|
| 936 |
+
<li><a href=""><i class="fa fa-twitter"></i></a></li>
|
| 937 |
+
<li><a href=""><i class="fa fa-linkedin"></i></a></li>
|
| 938 |
+
<li><a href=""><i class="fa fa-behance"></i></a></li>
|
| 939 |
+
</ul>
|
| 940 |
+
<p class="text-center">© 2018 <a href="http://hh-themes.com/" target="_blank">HH Themes</a></p>
|
| 941 |
+
<!-- Please do not remove the backlink to us unless you have purchased a license. It is part of the license conditions. Thanks for understanding :) -->
|
| 942 |
+
</div>
|
| 943 |
+
</div>
|
| 944 |
+
</div>
|
| 945 |
+
<div id="back-to-top"><i class="fa fa-arrow-circle-up"></i></div>
|
| 946 |
+
</section>
|
| 947 |
+
<div class=".d-none"></div>
|
| 948 |
+
<appvalues id="appvalues"
|
| 949 |
+
data-store-id="{storeId}"
|
| 950 |
+
data-stream-url="{streamUrl}"
|
| 951 |
+
/>
|
| 952 |
+
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
| 953 |
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
| 954 |
+
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
| 955 |
+
<script src="vendor/bootstrap/5.3.3/js/bootstrap.bundle.min.js"></script>
|
| 956 |
+
<script src="js/jquery.matchHeight.js"></script>
|
| 957 |
+
<script src="js/jquery.cookie.js"></script>
|
| 958 |
+
<script src="js/custom.js"></script>
|
| 959 |
+
<script src="js/cafe.js"></script>
|
| 960 |
+
<script src="js/wow.js"></script>
|
| 961 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.js"></script>
|
| 962 |
+
<script src="js/toastr.js"></script>
|
| 963 |
+
<script>
|
| 964 |
+
new WOW().init();
|
| 965 |
+
</script>
|
| 966 |
+
<script>
|
| 967 |
+
$(document).on('click', '[data-bs-toggle="lightbox"]', function(event) {
|
| 968 |
+
event.preventDefault();
|
| 969 |
+
$(this).ekkoLightbox();
|
| 970 |
+
});
|
| 971 |
+
</script>
|
| 972 |
+
|
| 973 |
+
|
| 974 |
+
</body>
|
| 975 |
+
</html>
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/barista/BaristaImpl.java
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.barista;
|
| 2 |
+
|
| 3 |
+
import io.quarkus.runtime.Startup;
|
| 4 |
+
import io.quarkus.vertx.ConsumeEvent;
|
| 5 |
+
import io.quarkuscoffeeshop.coffeeshop.barista.api.Barista;
|
| 6 |
+
import io.quarkuscoffeeshop.coffeeshop.barista.domain.BaristaItem;
|
| 7 |
+
import io.quarkuscoffeeshop.coffeeshop.barista.domain.BaristaRepository;
|
| 8 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Item;
|
| 9 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderIn;
|
| 10 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderUp;
|
| 11 |
+
import io.quarkuscoffeeshop.utils.JsonUtil;
|
| 12 |
+
import io.smallrye.common.annotation.Blocking;
|
| 13 |
+
import io.vertx.core.eventbus.EventBus;
|
| 14 |
+
import io.vertx.mutiny.core.eventbus.Message;
|
| 15 |
+
import org.slf4j.Logger;
|
| 16 |
+
import org.slf4j.LoggerFactory;
|
| 17 |
+
|
| 18 |
+
import jakarta.enterprise.context.ApplicationScoped;
|
| 19 |
+
import jakarta.inject.Inject;
|
| 20 |
+
import jakarta.transaction.Transactional;
|
| 21 |
+
import java.time.Instant;
|
| 22 |
+
|
| 23 |
+
import static io.quarkuscoffeeshop.coffeeshop.infrastructure.EventBusTopics.BARISTA_IN;
|
| 24 |
+
import static io.quarkuscoffeeshop.coffeeshop.infrastructure.EventBusTopics.ORDERS_UP;
|
| 25 |
+
|
| 26 |
+
//@Startup @ApplicationScoped
|
| 27 |
+
public class BaristaImpl {
|
| 28 |
+
|
| 29 |
+
private static final Logger LOGGER = LoggerFactory.getLogger(BaristaImpl.class);
|
| 30 |
+
|
| 31 |
+
private final String madeBy = "Mr. Spock";
|
| 32 |
+
|
| 33 |
+
@Inject
|
| 34 |
+
EventBus eventBus;
|
| 35 |
+
|
| 36 |
+
@Inject
|
| 37 |
+
BaristaRepository baristaRepository;
|
| 38 |
+
|
| 39 |
+
// @ConsumeEvent(BARISTA_IN) @Blocking @Transactional
|
| 40 |
+
public void onOrderIn(final Message message) {
|
| 41 |
+
OrderIn orderIn = JsonUtil.fromJson(message.body().toString(), OrderIn.class);
|
| 42 |
+
BaristaItem baristaItem = new BaristaItem();
|
| 43 |
+
baristaItem.setItem(orderIn.item.toString());
|
| 44 |
+
baristaItem.setTimeIn(Instant.now());
|
| 45 |
+
LOGGER.debug("order in : {}", orderIn);
|
| 46 |
+
try {
|
| 47 |
+
Thread.sleep(calculateDelay(orderIn.item));
|
| 48 |
+
} catch (InterruptedException e) {
|
| 49 |
+
e.printStackTrace();
|
| 50 |
+
}
|
| 51 |
+
OrderUp orderUp = new OrderUp(
|
| 52 |
+
orderIn.orderId,
|
| 53 |
+
orderIn.itemId,
|
| 54 |
+
orderIn.item,
|
| 55 |
+
orderIn.name,
|
| 56 |
+
Instant.now(),
|
| 57 |
+
madeBy);
|
| 58 |
+
baristaItem.setTimeUp(Instant.now());
|
| 59 |
+
baristaRepository.persist(baristaItem);
|
| 60 |
+
eventBus.<OrderUp>publish(ORDERS_UP, JsonUtil.toJson(orderUp));
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
// @Override
|
| 64 |
+
// public void onRemakeIn(Message remakeMessage) {
|
| 65 |
+
//
|
| 66 |
+
// }
|
| 67 |
+
//
|
| 68 |
+
// @Override
|
| 69 |
+
// public void onCancelOrder(Message cancellationMessage) {
|
| 70 |
+
//
|
| 71 |
+
// }
|
| 72 |
+
|
| 73 |
+
private int calculateDelay(final Item item) {
|
| 74 |
+
switch (item) {
|
| 75 |
+
case COFFEE_BLACK:
|
| 76 |
+
return 5000;
|
| 77 |
+
case COFFEE_WITH_ROOM:
|
| 78 |
+
return 5000;
|
| 79 |
+
case ESPRESSO:
|
| 80 |
+
return 7000;
|
| 81 |
+
case ESPRESSO_DOUBLE:
|
| 82 |
+
return 7000;
|
| 83 |
+
case CAPPUCCINO:
|
| 84 |
+
return 10000;
|
| 85 |
+
default:
|
| 86 |
+
return 3000;
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/barista/BaristaOutpostImpl.java
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.barista;
|
| 2 |
+
|
| 3 |
+
import io.quarkus.runtime.Startup;
|
| 4 |
+
import io.quarkus.vertx.ConsumeEvent;
|
| 5 |
+
import io.quarkuscoffeeshop.coffeeshop.barista.api.Barista;
|
| 6 |
+
import io.quarkuscoffeeshop.coffeeshop.barista.domain.BaristaRepository;
|
| 7 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderIn;
|
| 8 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderUp;
|
| 9 |
+
import io.quarkuscoffeeshop.utils.JsonUtil;
|
| 10 |
+
import io.smallrye.common.annotation.Blocking;
|
| 11 |
+
import io.vertx.core.eventbus.EventBus;
|
| 12 |
+
import io.vertx.mutiny.core.eventbus.Message;
|
| 13 |
+
import org.eclipse.microprofile.reactive.messaging.Channel;
|
| 14 |
+
import org.eclipse.microprofile.reactive.messaging.Emitter;
|
| 15 |
+
import org.eclipse.microprofile.reactive.messaging.Incoming;
|
| 16 |
+
import org.slf4j.Logger;
|
| 17 |
+
import org.slf4j.LoggerFactory;
|
| 18 |
+
|
| 19 |
+
import jakarta.enterprise.context.ApplicationScoped;
|
| 20 |
+
import jakarta.inject.Inject;
|
| 21 |
+
import jakarta.transaction.Transactional;
|
| 22 |
+
|
| 23 |
+
import static io.quarkuscoffeeshop.coffeeshop.infrastructure.EventBusTopics.BARISTA_IN;
|
| 24 |
+
import static io.quarkuscoffeeshop.coffeeshop.infrastructure.EventBusTopics.ORDERS_UP;
|
| 25 |
+
|
| 26 |
+
@Startup @ApplicationScoped
|
| 27 |
+
public class BaristaOutpostImpl implements Barista {
|
| 28 |
+
|
| 29 |
+
static final Logger LOGGER = LoggerFactory.getLogger(BaristaOutpostImpl.class);
|
| 30 |
+
|
| 31 |
+
@Channel("barista-outpost")
|
| 32 |
+
Emitter<OrderIn> baristaEmitter;
|
| 33 |
+
|
| 34 |
+
@Inject
|
| 35 |
+
EventBus eventBus;
|
| 36 |
+
|
| 37 |
+
@ConsumeEvent(BARISTA_IN) @Blocking @Transactional
|
| 38 |
+
public void onOrderIn(final Message orderInMessage) {
|
| 39 |
+
baristaEmitter.send(JsonUtil.fromJsonToOrderIn(orderInMessage.body().toString()));
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
@Override
|
| 43 |
+
public void onRemakeIn(final Message remakeMessage) {
|
| 44 |
+
baristaEmitter.send(JsonUtil.fromJsonToOrderIn(remakeMessage.body().toString()));
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
@Override
|
| 48 |
+
public void onCancelOrder(final Message cancellationMessage) {
|
| 49 |
+
baristaEmitter.send(JsonUtil.fromJsonToOrderIn(cancellationMessage.body().toString()));
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
@Incoming("orders-up") @Blocking @Transactional
|
| 53 |
+
public void onOrderUp(OrderUp orderUp) {
|
| 54 |
+
LOGGER.debug("OrderUp: {}", orderUp);
|
| 55 |
+
eventBus.<OrderUp>publish(ORDERS_UP, JsonUtil.toJson(orderUp));
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/barista/api/Barista.java
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.barista.api;
|
| 2 |
+
|
| 3 |
+
import io.vertx.mutiny.core.eventbus.Message;
|
| 4 |
+
|
| 5 |
+
public interface Barista {
|
| 6 |
+
|
| 7 |
+
/**
|
| 8 |
+
* Message with a JSON payload corresponding to OrderIn value object
|
| 9 |
+
*
|
| 10 |
+
* @param orderInMessage OrderIn
|
| 11 |
+
* @see io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderIn
|
| 12 |
+
*/
|
| 13 |
+
public void onOrderIn(final Message orderInMessage);
|
| 14 |
+
|
| 15 |
+
public void onRemakeIn(final Message remakeMessage);
|
| 16 |
+
|
| 17 |
+
public void onCancelOrder(final Message cancellationMessage);
|
| 18 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/barista/domain/BaristaItem.java
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.barista.domain;
|
| 2 |
+
|
| 3 |
+
import io.quarkus.hibernate.orm.panache.PanacheEntity;
|
| 4 |
+
|
| 5 |
+
import jakarta.persistence.Entity;
|
| 6 |
+
import jakarta.persistence.Table;
|
| 7 |
+
import java.time.Instant;
|
| 8 |
+
|
| 9 |
+
@Entity @Table(name = "barista_order", schema = "barista")
|
| 10 |
+
public class BaristaItem extends PanacheEntity {
|
| 11 |
+
|
| 12 |
+
private String item;
|
| 13 |
+
|
| 14 |
+
private Instant timeIn;
|
| 15 |
+
|
| 16 |
+
private Instant timeUp;
|
| 17 |
+
|
| 18 |
+
public BaristaItem(String item, Instant timeIn, Instant timeUp) {
|
| 19 |
+
this.item = item;
|
| 20 |
+
this.timeIn = timeIn;
|
| 21 |
+
this.timeUp = timeUp;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
public BaristaItem() {
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
@Override
|
| 28 |
+
public String toString() {
|
| 29 |
+
final StringBuilder stringBuilder = new StringBuilder("BaristaItem{");
|
| 30 |
+
stringBuilder.append("item='").append(item).append('\'');
|
| 31 |
+
stringBuilder.append(", timeIn=").append(timeIn);
|
| 32 |
+
stringBuilder.append(", timeUp=").append(timeUp);
|
| 33 |
+
stringBuilder.append('}');
|
| 34 |
+
return stringBuilder.toString();
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
@Override
|
| 38 |
+
public boolean equals(Object o) {
|
| 39 |
+
if (this == o) return true;
|
| 40 |
+
if (o == null || getClass() != o.getClass()) return false;
|
| 41 |
+
|
| 42 |
+
BaristaItem that = (BaristaItem) o;
|
| 43 |
+
|
| 44 |
+
if (item != null ? !item.equals(that.item) : that.item != null) return false;
|
| 45 |
+
if (timeIn != null ? !timeIn.equals(that.timeIn) : that.timeIn != null) return false;
|
| 46 |
+
return timeUp != null ? timeUp.equals(that.timeUp) : that.timeUp == null;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
@Override
|
| 50 |
+
public int hashCode() {
|
| 51 |
+
int result = item != null ? item.hashCode() : 0;
|
| 52 |
+
result = 31 * result + (timeIn != null ? timeIn.hashCode() : 0);
|
| 53 |
+
result = 31 * result + (timeUp != null ? timeUp.hashCode() : 0);
|
| 54 |
+
return result;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
public String getItem() {
|
| 58 |
+
return item;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
public void setItem(String item) {
|
| 62 |
+
this.item = item;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
public Instant getTimeIn() {
|
| 66 |
+
return timeIn;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
public void setTimeIn(Instant timeIn) {
|
| 70 |
+
this.timeIn = timeIn;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
public Instant getTimeUp() {
|
| 74 |
+
return timeUp;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
public void setTimeUp(Instant timeUp) {
|
| 78 |
+
this.timeUp = timeUp;
|
| 79 |
+
}
|
| 80 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/barista/domain/BaristaRepository.java
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.barista.domain;
|
| 2 |
+
|
| 3 |
+
import io.agroal.api.AgroalDataSource;
|
| 4 |
+
import io.quarkus.agroal.DataSource;
|
| 5 |
+
import io.quarkus.hibernate.orm.panache.PanacheRepository;
|
| 6 |
+
|
| 7 |
+
import jakarta.enterprise.context.ApplicationScoped;
|
| 8 |
+
import jakarta.inject.Inject;
|
| 9 |
+
|
| 10 |
+
@ApplicationScoped
|
| 11 |
+
public class BaristaRepository implements PanacheRepository<BaristaItem> {
|
| 12 |
+
|
| 13 |
+
@Inject
|
| 14 |
+
@DataSource("barista")
|
| 15 |
+
AgroalDataSource baristaDatasource;
|
| 16 |
+
|
| 17 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/counter/OrderServiceImpl.java
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.counter;
|
| 2 |
+
|
| 3 |
+
import io.quarkus.vertx.ConsumeEvent;
|
| 4 |
+
import io.quarkuscoffeeshop.coffeeshop.counter.api.OrderService;
|
| 5 |
+
import io.quarkuscoffeeshop.coffeeshop.counter.domain.OrderEventResult;
|
| 6 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Order;
|
| 7 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.commands.PlaceOrderCommand;
|
| 8 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderUp;
|
| 9 |
+
import io.quarkuscoffeeshop.coffeeshop.infrastructure.OrderRepository;
|
| 10 |
+
import io.quarkuscoffeeshop.utils.JsonUtil;
|
| 11 |
+
import io.smallrye.common.annotation.Blocking;
|
| 12 |
+
import io.smallrye.mutiny.Uni;
|
| 13 |
+
import io.vertx.core.eventbus.EventBus;
|
| 14 |
+
import io.vertx.mutiny.core.eventbus.Message;
|
| 15 |
+
import org.slf4j.Logger;
|
| 16 |
+
import org.slf4j.LoggerFactory;
|
| 17 |
+
|
| 18 |
+
import jakarta.enterprise.context.ApplicationScoped;
|
| 19 |
+
import jakarta.inject.Inject;
|
| 20 |
+
import jakarta.transaction.Transactional;
|
| 21 |
+
import java.util.concurrent.CompletableFuture;
|
| 22 |
+
|
| 23 |
+
import static io.quarkuscoffeeshop.coffeeshop.infrastructure.EventBusTopics.*;
|
| 24 |
+
import static io.quarkuscoffeeshop.utils.JsonUtil.fromJsonToOrderUp;
|
| 25 |
+
import static io.quarkuscoffeeshop.utils.JsonUtil.toJson;
|
| 26 |
+
|
| 27 |
+
@ApplicationScoped
|
| 28 |
+
public class OrderServiceImpl implements OrderService {
|
| 29 |
+
|
| 30 |
+
Logger LOGGER = LoggerFactory.getLogger(OrderServiceImpl.class);
|
| 31 |
+
|
| 32 |
+
@Inject
|
| 33 |
+
EventBus eventBus;
|
| 34 |
+
|
| 35 |
+
@Inject
|
| 36 |
+
OrderRepository orderRepository;
|
| 37 |
+
|
| 38 |
+
@Transactional
|
| 39 |
+
public void onOrderIn(final PlaceOrderCommand placeOrderCommand) {
|
| 40 |
+
LOGGER.debug("PlaceOrderCommand received: {}", placeOrderCommand);
|
| 41 |
+
OrderEventResult orderEventResult = Order.from(placeOrderCommand);
|
| 42 |
+
|
| 43 |
+
orderRepository.persist(orderEventResult.getOrder());
|
| 44 |
+
|
| 45 |
+
orderEventResult.getOrderUpdates().forEach(orderUpdate -> {
|
| 46 |
+
eventBus.publish(WEB_UPDATES, JsonUtil.toJson(orderUpdate));
|
| 47 |
+
LOGGER.debug("sent web update: {}", orderUpdate);
|
| 48 |
+
});
|
| 49 |
+
if (orderEventResult.getBaristaTickets().isPresent()) {
|
| 50 |
+
orderEventResult.getBaristaTickets().get().forEach(baristaTicket -> {
|
| 51 |
+
eventBus.send(BARISTA_IN, JsonUtil.toJson(baristaTicket));
|
| 52 |
+
LOGGER.debug("sent to barista: {}", baristaTicket);
|
| 53 |
+
});
|
| 54 |
+
}
|
| 55 |
+
if (orderEventResult.getKitchenTickets().isPresent()) {
|
| 56 |
+
orderEventResult.getKitchenTickets().get().forEach(kitchenTicket -> {
|
| 57 |
+
eventBus.send(KITCHEN_IN, JsonUtil.toJson(kitchenTicket));
|
| 58 |
+
LOGGER.debug("sent to kitchen: {}", kitchenTicket);
|
| 59 |
+
});
|
| 60 |
+
}
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
private void saveOrder(final Order order) {
|
| 64 |
+
orderRepository.persistAndFlush(order);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
@Override
|
| 68 |
+
@ConsumeEvent(ORDERS_UP)
|
| 69 |
+
@Blocking
|
| 70 |
+
@Transactional
|
| 71 |
+
public void onOrderUp(final Message message) {
|
| 72 |
+
|
| 73 |
+
LOGGER.debug("order up message: {}", message.body());
|
| 74 |
+
OrderUp orderUp = fromJsonToOrderUp(message.body().toString());
|
| 75 |
+
|
| 76 |
+
Order order = orderRepository.findById(orderUp.orderId);
|
| 77 |
+
OrderEventResult orderEventResult = order.apply(orderUp);
|
| 78 |
+
orderRepository.persistAndFlush(order);
|
| 79 |
+
orderEventResult.getOrderUpdates().forEach(orderUpdate -> {
|
| 80 |
+
eventBus.publish(WEB_UPDATES, JsonUtil.toJson(orderUpdate));
|
| 81 |
+
});
|
| 82 |
+
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
private OrderEventResult applyOrderUp2(final OrderUp orderUp) {
|
| 86 |
+
Order order = orderRepository.findById(orderUp.orderId);
|
| 87 |
+
OrderEventResult orderEventResult = order.apply(orderUp);
|
| 88 |
+
return orderEventResult;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
@Transactional
|
| 92 |
+
CompletableFuture<OrderEventResult> applyOrderUp(final OrderUp orderUp) {
|
| 93 |
+
Order order = orderRepository.findById(orderUp.orderId);
|
| 94 |
+
OrderEventResult orderEventResult = order.apply(orderUp);
|
| 95 |
+
LOGGER.debug("After applying OrderUp event Order: {}", orderEventResult.getOrder());
|
| 96 |
+
|
| 97 |
+
orderEventResult.getOrderUpdates().forEach(orderUpdate -> {
|
| 98 |
+
eventBus.send(WEB_UPDATES, toJson(orderUpdate));
|
| 99 |
+
LOGGER.debug("sent web update: {}", orderUpdate);
|
| 100 |
+
});
|
| 101 |
+
|
| 102 |
+
orderRepository.persist(orderEventResult.getOrder());
|
| 103 |
+
LOGGER.debug("persisted order: {}", orderEventResult.getOrder());
|
| 104 |
+
|
| 105 |
+
return CompletableFuture.completedFuture(orderEventResult);
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
public OrderServiceImpl() {
|
| 110 |
+
}
|
| 111 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/counter/api/OrderService.java
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.counter.api;
|
| 2 |
+
|
| 3 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Order;
|
| 4 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.commands.PlaceOrderCommand;
|
| 5 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderUp;
|
| 6 |
+
import io.smallrye.mutiny.Uni;
|
| 7 |
+
import io.vertx.mutiny.core.eventbus.Message;
|
| 8 |
+
|
| 9 |
+
/**
|
| 10 |
+
* Coordinates order functions
|
| 11 |
+
*/
|
| 12 |
+
public interface OrderService {
|
| 13 |
+
|
| 14 |
+
public void onOrderIn(final PlaceOrderCommand placeOrderCommand);
|
| 15 |
+
|
| 16 |
+
public void onOrderUp(final Message message);
|
| 17 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/counter/domain/OrderEventResult.java
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.counter.domain;
|
| 2 |
+
|
| 3 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Order;
|
| 4 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderIn;
|
| 5 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderUpdate;
|
| 6 |
+
|
| 7 |
+
import java.util.ArrayList;
|
| 8 |
+
import java.util.List;
|
| 9 |
+
import java.util.Optional;
|
| 10 |
+
import java.util.stream.Collectors;
|
| 11 |
+
|
| 12 |
+
public class OrderEventResult {
|
| 13 |
+
|
| 14 |
+
private Order order;
|
| 15 |
+
|
| 16 |
+
private List<OrderIn> baristaTickets;
|
| 17 |
+
|
| 18 |
+
private List<OrderIn> kitchenTickets;
|
| 19 |
+
|
| 20 |
+
private List<OrderUpdate> orderUpdates;
|
| 21 |
+
|
| 22 |
+
public OrderEventResult() {
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
public OrderEventResult(Order order, List<OrderIn> baristaTickets, List<OrderIn> kitchenTickets, List<OrderUpdate> orderUpdates) {
|
| 26 |
+
this.order = order;
|
| 27 |
+
this.baristaTickets = baristaTickets;
|
| 28 |
+
this.kitchenTickets = kitchenTickets;
|
| 29 |
+
this.orderUpdates = orderUpdates;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
@Override
|
| 33 |
+
public String toString() {
|
| 34 |
+
StringBuilder stringBuilder = new StringBuilder("OrderEventResult{order=")
|
| 35 |
+
.append(order.getOrderId())
|
| 36 |
+
.append(", baristaTickets=[");
|
| 37 |
+
if(getBaristaTickets().isPresent()){
|
| 38 |
+
stringBuilder.append(
|
| 39 |
+
getBaristaTickets().get().stream()
|
| 40 |
+
.map(OrderIn::toString)
|
| 41 |
+
.collect(Collectors.joining(",")));
|
| 42 |
+
}
|
| 43 |
+
stringBuilder.append("], kitchenTickets=[");
|
| 44 |
+
if (getKitchenTickets().isPresent()) {
|
| 45 |
+
stringBuilder.append(
|
| 46 |
+
getKitchenTickets().get().stream()
|
| 47 |
+
.map(OrderIn::toString)
|
| 48 |
+
.collect(Collectors.joining(",")));
|
| 49 |
+
}
|
| 50 |
+
stringBuilder.append("]");
|
| 51 |
+
stringBuilder.append(getOrderUpdates().stream().map(OrderUpdate::toString).collect(Collectors.joining(",")))
|
| 52 |
+
.append("]}");
|
| 53 |
+
return stringBuilder.toString();
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
public void addUpdate(final OrderUpdate orderUpdate) {
|
| 57 |
+
if (this.orderUpdates == null) {
|
| 58 |
+
this.orderUpdates = new ArrayList<>();
|
| 59 |
+
}
|
| 60 |
+
this.orderUpdates.add(orderUpdate);
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
public void addBaristaTicket(final OrderIn orderIn) {
|
| 64 |
+
if (this.baristaTickets == null) {
|
| 65 |
+
this.baristaTickets = new ArrayList<>();
|
| 66 |
+
}
|
| 67 |
+
this.baristaTickets.add(orderIn);
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
public void addKitchenTicket(final OrderIn orderIn) {
|
| 71 |
+
if (this.kitchenTickets == null) {
|
| 72 |
+
this.kitchenTickets = new ArrayList<>();
|
| 73 |
+
}
|
| 74 |
+
this.kitchenTickets.add(orderIn);
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
public Optional<List<OrderIn>> getBaristaTickets() {
|
| 78 |
+
return Optional.ofNullable(baristaTickets);
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
public Optional<List<OrderIn>> getKitchenTickets() {
|
| 82 |
+
return Optional.ofNullable(kitchenTickets);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
// Generated
|
| 86 |
+
|
| 87 |
+
public Order getOrder() {
|
| 88 |
+
return order;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
public void setOrder(Order order) {
|
| 92 |
+
this.order = order;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
public void setBaristaTickets(List<OrderIn> baristaTickets) {
|
| 96 |
+
this.baristaTickets = baristaTickets;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
public void setKitchenTickets(List<OrderIn> kitchenTickets) {
|
| 100 |
+
this.kitchenTickets = kitchenTickets;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
public List<OrderUpdate> getOrderUpdates() {
|
| 104 |
+
return orderUpdates;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
public void setOrderUpdates(List<OrderUpdate> orderUpdates) {
|
| 108 |
+
this.orderUpdates = orderUpdates;
|
| 109 |
+
}
|
| 110 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/Beverage.java
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain;
|
| 2 |
+
|
| 3 |
+
public class Beverage {
|
| 4 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/Item.java
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain;
|
| 2 |
+
|
| 3 |
+
import java.math.BigDecimal;
|
| 4 |
+
|
| 5 |
+
public enum Item {
|
| 6 |
+
|
| 7 |
+
//Beverages
|
| 8 |
+
CAPPUCCINO(BigDecimal.valueOf(4.50)), COFFEE_BLACK(BigDecimal.valueOf(3.00)), COFFEE_WITH_ROOM(BigDecimal.valueOf(3.00)), ESPRESSO(BigDecimal.valueOf(3.50)), ESPRESSO_DOUBLE(BigDecimal.valueOf(4.50)), LATTE(BigDecimal.valueOf(4.50)),
|
| 9 |
+
|
| 10 |
+
//Food
|
| 11 |
+
CAKEPOP(BigDecimal.valueOf(2.50)), CROISSANT(BigDecimal.valueOf(3.25)), MUFFIN(BigDecimal.valueOf(3.00)), CROISSANT_CHOCOLATE(BigDecimal.valueOf(3.50));
|
| 12 |
+
|
| 13 |
+
private BigDecimal price;
|
| 14 |
+
|
| 15 |
+
public BigDecimal getPrice() {
|
| 16 |
+
return this.price;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
private Item(BigDecimal price) {
|
| 20 |
+
this.price = price;
|
| 21 |
+
}
|
| 22 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/ItemStatus.java
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain;
|
| 2 |
+
|
| 3 |
+
public enum ItemStatus {
|
| 4 |
+
|
| 5 |
+
PLACED, IN_PROGRESS, FULFILLED
|
| 6 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/LineItem.java
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain;
|
| 2 |
+
|
| 3 |
+
import com.fasterxml.jackson.annotation.JsonIgnore;
|
| 4 |
+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
| 5 |
+
import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
|
| 6 |
+
|
| 7 |
+
import jakarta.persistence.*;
|
| 8 |
+
import java.math.BigDecimal;
|
| 9 |
+
import java.util.UUID;
|
| 10 |
+
|
| 11 |
+
@JsonIgnoreProperties(value = { "orderId" })
|
| 12 |
+
@Entity
|
| 13 |
+
@Table(name = "items")
|
| 14 |
+
public class LineItem extends PanacheEntityBase {
|
| 15 |
+
|
| 16 |
+
@JsonIgnore
|
| 17 |
+
@ManyToOne(fetch = FetchType.EAGER)
|
| 18 |
+
@JoinColumn(name = "order_id", nullable = false)
|
| 19 |
+
Order order;
|
| 20 |
+
|
| 21 |
+
@Id
|
| 22 |
+
@Column(nullable = false, unique = true)
|
| 23 |
+
private String itemId;
|
| 24 |
+
|
| 25 |
+
@Enumerated(EnumType.STRING)
|
| 26 |
+
private Item item;
|
| 27 |
+
|
| 28 |
+
private String name;
|
| 29 |
+
|
| 30 |
+
private BigDecimal price;
|
| 31 |
+
|
| 32 |
+
@Enumerated(EnumType.STRING)
|
| 33 |
+
private ItemStatus itemStatus;
|
| 34 |
+
|
| 35 |
+
public LineItem(Item item, String name, BigDecimal price, ItemStatus itemStatus, Order order) {
|
| 36 |
+
this.item = item;
|
| 37 |
+
this.name = name;
|
| 38 |
+
this.price = price;
|
| 39 |
+
this.itemStatus = itemStatus;
|
| 40 |
+
this.order = order;
|
| 41 |
+
this.itemId = UUID.randomUUID().toString();
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
public LineItem() {
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
@Override
|
| 48 |
+
public String toString() {
|
| 49 |
+
return "LineItem{" +
|
| 50 |
+
"order=" + order.getOrderId() +
|
| 51 |
+
", itemId='" + itemId + '\'' +
|
| 52 |
+
", item=" + item +
|
| 53 |
+
", name='" + name + '\'' +
|
| 54 |
+
", price=" + price +
|
| 55 |
+
", itemStatus=" + itemStatus +
|
| 56 |
+
'}';
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
@Override
|
| 60 |
+
public boolean equals(Object o) {
|
| 61 |
+
if (this == o) return true;
|
| 62 |
+
if (o == null || getClass() != o.getClass()) return false;
|
| 63 |
+
|
| 64 |
+
LineItem lineItem = (LineItem) o;
|
| 65 |
+
|
| 66 |
+
if (order != null ? !order.equals(lineItem.order) : lineItem.order != null) return false;
|
| 67 |
+
if (itemId != null ? !itemId.equals(lineItem.itemId) : lineItem.itemId != null) return false;
|
| 68 |
+
if (item != lineItem.item) return false;
|
| 69 |
+
if (name != null ? !name.equals(lineItem.name) : lineItem.name != null) return false;
|
| 70 |
+
if (price != null ? !price.equals(lineItem.price) : lineItem.price != null) return false;
|
| 71 |
+
return itemStatus == lineItem.itemStatus;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
@Override
|
| 75 |
+
public int hashCode() {
|
| 76 |
+
int result = order != null ? order.hashCode() : 0;
|
| 77 |
+
result = 31 * result + (itemId != null ? itemId.hashCode() : 0);
|
| 78 |
+
result = 31 * result + (item != null ? item.hashCode() : 0);
|
| 79 |
+
result = 31 * result + (name != null ? name.hashCode() : 0);
|
| 80 |
+
result = 31 * result + (price != null ? price.hashCode() : 0);
|
| 81 |
+
result = 31 * result + (itemStatus != null ? itemStatus.hashCode() : 0);
|
| 82 |
+
return result;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
public Order getOrder() {
|
| 86 |
+
return order;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
public void setOrder(Order order) {
|
| 90 |
+
this.order = order;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
public String getItemId() {
|
| 94 |
+
return itemId;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
public void setItemId(String itemId) {
|
| 98 |
+
this.itemId = itemId;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
public Item getItem() {
|
| 102 |
+
return item;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
public void setItem(Item item) {
|
| 106 |
+
this.item = item;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
public String getName() {
|
| 110 |
+
return name;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
public void setName(String name) {
|
| 114 |
+
this.name = name;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
public BigDecimal getPrice() {
|
| 118 |
+
return price;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
public void setPrice(BigDecimal price) {
|
| 122 |
+
this.price = price;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
public ItemStatus getItemStatus() {
|
| 126 |
+
return itemStatus;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
public void setItemStatus(ItemStatus itemStatus) {
|
| 130 |
+
this.itemStatus = itemStatus;
|
| 131 |
+
}
|
| 132 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/Location.java
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain;
|
| 2 |
+
|
| 3 |
+
public enum Location {
|
| 4 |
+
|
| 5 |
+
ATLANTA, CHARLOTTE, RALEIGH;
|
| 6 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/Order.java
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain;
|
| 2 |
+
|
| 3 |
+
import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
|
| 4 |
+
import io.quarkuscoffeeshop.coffeeshop.counter.domain.OrderEventResult;
|
| 5 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.commands.PlaceOrderCommand;
|
| 6 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderIn;
|
| 7 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderUp;
|
| 8 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderUpdate;
|
| 9 |
+
import io.smallrye.mutiny.Uni;
|
| 10 |
+
import org.slf4j.Logger;
|
| 11 |
+
import org.slf4j.LoggerFactory;
|
| 12 |
+
|
| 13 |
+
import jakarta.persistence.*;
|
| 14 |
+
import java.time.Instant;
|
| 15 |
+
import java.util.ArrayList;
|
| 16 |
+
import java.util.List;
|
| 17 |
+
import java.util.Optional;
|
| 18 |
+
import java.util.stream.Collectors;
|
| 19 |
+
import java.util.stream.Stream;
|
| 20 |
+
|
| 21 |
+
@Entity
|
| 22 |
+
@Table(name = "Orders")
|
| 23 |
+
public class Order extends PanacheEntityBase {
|
| 24 |
+
|
| 25 |
+
@Transient
|
| 26 |
+
static Logger LOGGER = LoggerFactory.getLogger(Order.class);
|
| 27 |
+
|
| 28 |
+
@Id
|
| 29 |
+
@Column(nullable = false, unique = true, name = "order_id")
|
| 30 |
+
private String orderId;
|
| 31 |
+
|
| 32 |
+
@Enumerated(EnumType.STRING)
|
| 33 |
+
private OrderSource orderSource;
|
| 34 |
+
|
| 35 |
+
private String loyaltyMemberId;
|
| 36 |
+
|
| 37 |
+
private Instant timestamp;
|
| 38 |
+
|
| 39 |
+
@Enumerated(EnumType.STRING)
|
| 40 |
+
private OrderStatus orderStatus;
|
| 41 |
+
|
| 42 |
+
@Enumerated(EnumType.STRING)
|
| 43 |
+
private Location location;
|
| 44 |
+
|
| 45 |
+
@OneToMany(fetch = FetchType.EAGER, mappedBy = "order", cascade = CascadeType.ALL)
|
| 46 |
+
private List<LineItem> baristaLineItems;
|
| 47 |
+
|
| 48 |
+
@OneToMany(fetch = FetchType.EAGER, mappedBy = "order", cascade = CascadeType.ALL)
|
| 49 |
+
private List<LineItem> kitchenLineItems;
|
| 50 |
+
|
| 51 |
+
protected Order() {
|
| 52 |
+
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
private Order(String orderId) {
|
| 56 |
+
this.orderId = orderId;
|
| 57 |
+
this.timestamp = Instant.now();
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
public static Uni<OrderEventResult> fromAsync(final PlaceOrderCommand placeOrderCommand) {
|
| 61 |
+
return Uni.createFrom().item(from(placeOrderCommand));
|
| 62 |
+
}
|
| 63 |
+
/**
|
| 64 |
+
* Creates a new Order and corresponding updates from a PlaceOrderCommand
|
| 65 |
+
*
|
| 66 |
+
* @param placeOrderCommand
|
| 67 |
+
* @return OrderEventResult
|
| 68 |
+
* @see OrderEventResult
|
| 69 |
+
*/
|
| 70 |
+
public static OrderEventResult from(final PlaceOrderCommand placeOrderCommand) {
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
// build the order from the PlaceOrderCommand
|
| 74 |
+
Order order = new Order(placeOrderCommand.getId());
|
| 75 |
+
order.setOrderSource(placeOrderCommand.getOrderSource());
|
| 76 |
+
order.setLocation(placeOrderCommand.getLocation());
|
| 77 |
+
order.setTimestamp(placeOrderCommand.getTimestamp());
|
| 78 |
+
order.setOrderStatus(OrderStatus.IN_PROGRESS);
|
| 79 |
+
|
| 80 |
+
// create the return value
|
| 81 |
+
OrderEventResult orderEventResult = new OrderEventResult();
|
| 82 |
+
|
| 83 |
+
if (placeOrderCommand.getBaristaItems().isPresent()) {
|
| 84 |
+
LOGGER.debug("createOrderFromCommand adding beverages {}", placeOrderCommand.getBaristaItems().get().size());
|
| 85 |
+
|
| 86 |
+
LOGGER.debug("adding Barista LineItems");
|
| 87 |
+
placeOrderCommand.getBaristaItems().get().forEach(commandItem -> {
|
| 88 |
+
LOGGER.debug("createOrderFromCommand adding baristaItem from {}", commandItem.toString());
|
| 89 |
+
LineItem lineItem = new LineItem(commandItem.item, commandItem.name, commandItem.price, ItemStatus.IN_PROGRESS, order);
|
| 90 |
+
order.addBaristaLineItem(lineItem);
|
| 91 |
+
LOGGER.debug("added LineItem: {}", order.getBaristaLineItems().get().size());
|
| 92 |
+
orderEventResult.addBaristaTicket(new OrderIn(order.getOrderId(), lineItem.getItemId(), lineItem.getItem(), lineItem.getName()));
|
| 93 |
+
LOGGER.debug("Added Barista Ticket to OrderEventResult: {}", orderEventResult.getBaristaTickets().get().size());
|
| 94 |
+
orderEventResult.addUpdate(new OrderUpdate(order.getOrderId(), lineItem.getItemId(), lineItem.getName(), lineItem.getItem(), OrderStatus.IN_PROGRESS));
|
| 95 |
+
LOGGER.debug("Added Order Update to OrderEventResult: ", orderEventResult.getOrderUpdates().size());
|
| 96 |
+
});
|
| 97 |
+
}
|
| 98 |
+
LOGGER.debug("adding Kitchen LineItems");
|
| 99 |
+
if (placeOrderCommand.getKitchenItems().isPresent()) {
|
| 100 |
+
LOGGER.debug("createOrderFromCommand adding kitchenOrders {}", placeOrderCommand.getKitchenItems().get().size());
|
| 101 |
+
placeOrderCommand.getKitchenItems().get().forEach(commandItem -> {
|
| 102 |
+
LOGGER.debug("createOrderFromCommand adding kitchenItem from {}", commandItem.toString());
|
| 103 |
+
LineItem lineItem = new LineItem(commandItem.item, commandItem.name, commandItem.price, ItemStatus.IN_PROGRESS, order);
|
| 104 |
+
order.addKitchenLineItem(lineItem);
|
| 105 |
+
orderEventResult.addKitchenTicket(new OrderIn(order.getOrderId(), lineItem.getItemId(), lineItem.getItem(), lineItem.getName()));
|
| 106 |
+
orderEventResult.addUpdate(new OrderUpdate(order.getOrderId(), lineItem.getItemId(), lineItem.getName(), lineItem.getItem(), OrderStatus.IN_PROGRESS));
|
| 107 |
+
});
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
orderEventResult.setOrder(order);
|
| 111 |
+
LOGGER.debug("Added Order and OrderCreatedEvent to OrderEventResult: {}", orderEventResult);
|
| 112 |
+
|
| 113 |
+
LOGGER.debug("returning {}", orderEventResult);
|
| 114 |
+
return orderEventResult;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
public OrderEventResult apply(final OrderUp orderUp) {
|
| 118 |
+
|
| 119 |
+
LOGGER.debug("applying orderUp: {}", orderUp);
|
| 120 |
+
OrderEventResult orderEventResult = new OrderEventResult();
|
| 121 |
+
|
| 122 |
+
orderEventResult.addUpdate(new OrderUpdate(
|
| 123 |
+
orderUp.orderId,
|
| 124 |
+
orderUp.itemId,
|
| 125 |
+
orderUp.name,
|
| 126 |
+
orderUp.item,
|
| 127 |
+
OrderStatus.FULFILLED,
|
| 128 |
+
orderUp.madeBy));
|
| 129 |
+
|
| 130 |
+
// loop through barista tickets and update this line item
|
| 131 |
+
if (this.getBaristaLineItems().isPresent()) {
|
| 132 |
+
this.getBaristaLineItems().get().stream().forEach(baristaLineItem -> {
|
| 133 |
+
if (baristaLineItem.getItemId().equals(orderUp.itemId)) {
|
| 134 |
+
baristaLineItem.setItemStatus(ItemStatus.FULFILLED);
|
| 135 |
+
orderEventResult.addUpdate(new OrderUpdate(orderUp.orderId, orderUp.itemId, orderUp.name, orderUp.item, OrderStatus.FULFILLED, orderUp.madeBy));
|
| 136 |
+
}
|
| 137 |
+
});
|
| 138 |
+
}
|
| 139 |
+
if (this.getKitchenLineItems().isPresent()) {
|
| 140 |
+
this.getKitchenLineItems().get().stream().forEach(kitchenLineItem -> {
|
| 141 |
+
if (kitchenLineItem.getItemId().equals(orderUp.itemId)) {
|
| 142 |
+
kitchenLineItem.setItemStatus(ItemStatus.FULFILLED);
|
| 143 |
+
orderEventResult.addUpdate(new OrderUpdate(orderUp.orderId, orderUp.itemId, orderUp.name, orderUp.item, OrderStatus.FULFILLED, orderUp.madeBy));
|
| 144 |
+
}
|
| 145 |
+
});
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
// if there are both barista and kitchen items concatenate them before checking status
|
| 149 |
+
if (this.getBaristaLineItems().isPresent() && this.getKitchenLineItems().isPresent()) {
|
| 150 |
+
// check the status of the Order itself and update if necessary
|
| 151 |
+
if(Stream.concat(this.baristaLineItems.stream(), this.kitchenLineItems.stream())
|
| 152 |
+
.allMatch(lineItem -> {
|
| 153 |
+
return lineItem.getItemStatus().equals(ItemStatus.FULFILLED);
|
| 154 |
+
})){
|
| 155 |
+
this.setOrderStatus(OrderStatus.FULFILLED);
|
| 156 |
+
};
|
| 157 |
+
}else if (this.getBaristaLineItems().isPresent()) {
|
| 158 |
+
if(this.baristaLineItems.stream()
|
| 159 |
+
.allMatch(lineItem -> {
|
| 160 |
+
return lineItem.getItemStatus().equals(ItemStatus.FULFILLED);
|
| 161 |
+
})){
|
| 162 |
+
this.setOrderStatus(OrderStatus.FULFILLED);
|
| 163 |
+
};
|
| 164 |
+
}else if (this.getKitchenLineItems().isPresent()) {
|
| 165 |
+
if(this.kitchenLineItems.stream()
|
| 166 |
+
.allMatch(lineItem -> {
|
| 167 |
+
return lineItem.getItemStatus().equals(ItemStatus.FULFILLED);
|
| 168 |
+
})){
|
| 169 |
+
this.setOrderStatus(OrderStatus.FULFILLED);
|
| 170 |
+
};
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
LOGGER.debug("apply OrderUp event complete: {}", this);
|
| 174 |
+
orderEventResult.setOrder(this);
|
| 175 |
+
|
| 176 |
+
return orderEventResult;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
/**
|
| 180 |
+
* Convenience method to prevent Null Pointer Exceptions
|
| 181 |
+
*
|
| 182 |
+
* @param lineItem
|
| 183 |
+
*/
|
| 184 |
+
public void addBaristaLineItem(LineItem lineItem) {
|
| 185 |
+
if (this.baristaLineItems == null) {
|
| 186 |
+
this.baristaLineItems = new ArrayList<>();
|
| 187 |
+
}
|
| 188 |
+
lineItem.setOrder(this);
|
| 189 |
+
this.baristaLineItems.add(lineItem);
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
/**
|
| 193 |
+
* Convenience method to prevent Null Pointer Exceptions
|
| 194 |
+
*
|
| 195 |
+
* @param lineItem
|
| 196 |
+
*/
|
| 197 |
+
public void addKitchenLineItem(LineItem lineItem) {
|
| 198 |
+
if (this.kitchenLineItems == null) {
|
| 199 |
+
this.kitchenLineItems = new ArrayList<>();
|
| 200 |
+
}
|
| 201 |
+
lineItem.setOrder(this);
|
| 202 |
+
this.kitchenLineItems.add(lineItem);
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
/**
|
| 207 |
+
* Not all Orders come from Loyalty Members so this returns an Optional<String> of the Loyalty Member's Id
|
| 208 |
+
*
|
| 209 |
+
* @return Optional<String>
|
| 210 |
+
*/
|
| 211 |
+
public Optional<String> getLoyaltyMemberId() {
|
| 212 |
+
return Optional.ofNullable(loyaltyMemberId);
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
/**
|
| 216 |
+
* Most but not all Orders have barista items so this returns an Optional<List<LineItem>
|
| 217 |
+
*
|
| 218 |
+
* @return Optional<String>
|
| 219 |
+
*/
|
| 220 |
+
public Optional<List<LineItem>> getBaristaLineItems() {
|
| 221 |
+
return Optional.ofNullable(baristaLineItems);
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
/**
|
| 225 |
+
* Many orders do not contain kitchen items so this returns an Optional<List<LineItem>
|
| 226 |
+
*
|
| 227 |
+
* @return Optional<String>
|
| 228 |
+
*/
|
| 229 |
+
public Optional<List<LineItem>> getKitchenLineItems() {
|
| 230 |
+
return Optional.ofNullable(kitchenLineItems);
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
@Override
|
| 234 |
+
public String toString() {
|
| 235 |
+
final StringBuilder sb = new StringBuilder("Order{");
|
| 236 |
+
sb.append("orderId='").append(orderId).append('\'');
|
| 237 |
+
sb.append(", orderSource=").append(orderSource);
|
| 238 |
+
sb.append(", loyaltyMemberId='").append(loyaltyMemberId).append('\'');
|
| 239 |
+
sb.append(", timestamp=").append(timestamp);
|
| 240 |
+
sb.append(", orderStatus=").append(orderStatus);
|
| 241 |
+
sb.append(", location=").append(location);
|
| 242 |
+
sb.append(", baristaLineItems=[");
|
| 243 |
+
if (getBaristaLineItems().isPresent()) {
|
| 244 |
+
sb.append(baristaLineItems.stream().map(Object::toString).collect(Collectors.joining(", ")));
|
| 245 |
+
}else{
|
| 246 |
+
sb.append("]");
|
| 247 |
+
}
|
| 248 |
+
sb.append(", kitchenLineItems=[");
|
| 249 |
+
if (getKitchenLineItems().isPresent()) {
|
| 250 |
+
sb.append(kitchenLineItems.stream().map(Object::toString).collect(Collectors.joining(", ")));
|
| 251 |
+
}else{
|
| 252 |
+
sb.append("]");
|
| 253 |
+
}
|
| 254 |
+
sb.append('}');
|
| 255 |
+
return sb.toString();
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
// Generated
|
| 259 |
+
@Override
|
| 260 |
+
public boolean equals(Object o) {
|
| 261 |
+
if (this == o) return true;
|
| 262 |
+
if (o == null || getClass() != o.getClass()) return false;
|
| 263 |
+
|
| 264 |
+
Order order = (Order) o;
|
| 265 |
+
|
| 266 |
+
if (orderId != null ? !orderId.equals(order.orderId) : order.orderId != null) return false;
|
| 267 |
+
if (orderSource != order.orderSource) return false;
|
| 268 |
+
if (loyaltyMemberId != null ? !loyaltyMemberId.equals(order.loyaltyMemberId) : order.loyaltyMemberId != null)
|
| 269 |
+
return false;
|
| 270 |
+
if (timestamp != null ? !timestamp.equals(order.timestamp) : order.timestamp != null) return false;
|
| 271 |
+
if (orderStatus != order.orderStatus) return false;
|
| 272 |
+
if (location != order.location) return false;
|
| 273 |
+
if (baristaLineItems != null ? !baristaLineItems.equals(order.baristaLineItems) : order.baristaLineItems != null)
|
| 274 |
+
return false;
|
| 275 |
+
return kitchenLineItems != null ? kitchenLineItems.equals(order.kitchenLineItems) : order.kitchenLineItems == null;
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
@Override
|
| 279 |
+
public int hashCode() {
|
| 280 |
+
int result = orderId != null ? orderId.hashCode() : 0;
|
| 281 |
+
result = 31 * result + (orderSource != null ? orderSource.hashCode() : 0);
|
| 282 |
+
result = 31 * result + (loyaltyMemberId != null ? loyaltyMemberId.hashCode() : 0);
|
| 283 |
+
result = 31 * result + (timestamp != null ? timestamp.hashCode() : 0);
|
| 284 |
+
result = 31 * result + (orderStatus != null ? orderStatus.hashCode() : 0);
|
| 285 |
+
result = 31 * result + (location != null ? location.hashCode() : 0);
|
| 286 |
+
result = 31 * result + (baristaLineItems != null ? baristaLineItems.hashCode() : 0);
|
| 287 |
+
result = 31 * result + (kitchenLineItems != null ? kitchenLineItems.hashCode() : 0);
|
| 288 |
+
return result;
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
public String getOrderId() {
|
| 292 |
+
return orderId;
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
public void setOrderId(String orderId) {
|
| 296 |
+
this.orderId = orderId;
|
| 297 |
+
}
|
| 298 |
+
|
| 299 |
+
public OrderSource getOrderSource() {
|
| 300 |
+
return orderSource;
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
public void setOrderSource(OrderSource orderSource) {
|
| 304 |
+
this.orderSource = orderSource;
|
| 305 |
+
}
|
| 306 |
+
|
| 307 |
+
public void setLoyaltyMemberId(String loyaltyMemberId) {
|
| 308 |
+
this.loyaltyMemberId = loyaltyMemberId;
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
public Instant getTimestamp() {
|
| 312 |
+
return timestamp;
|
| 313 |
+
}
|
| 314 |
+
|
| 315 |
+
public void setTimestamp(Instant timestamp) {
|
| 316 |
+
this.timestamp = timestamp;
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
public OrderStatus getOrderStatus() {
|
| 320 |
+
return orderStatus;
|
| 321 |
+
}
|
| 322 |
+
|
| 323 |
+
public void setOrderStatus(OrderStatus orderStatus) {
|
| 324 |
+
this.orderStatus = orderStatus;
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
public Location getLocation() {
|
| 328 |
+
return location;
|
| 329 |
+
}
|
| 330 |
+
|
| 331 |
+
public void setLocation(Location location) {
|
| 332 |
+
this.location = location;
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
public void setBaristaLineItems(List<LineItem> baristaLineLineItems) {
|
| 336 |
+
this.baristaLineItems = baristaLineLineItems;
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
public void setKitchenLineItems(List<LineItem> kitchenLineLineItems) {
|
| 340 |
+
this.kitchenLineItems = kitchenLineLineItems;
|
| 341 |
+
}
|
| 342 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/OrderIn.java
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain;
|
| 2 |
+
|
| 3 |
+
public class OrderIn {
|
| 4 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/OrderSource.java
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain;
|
| 2 |
+
|
| 3 |
+
public enum OrderSource {
|
| 4 |
+
|
| 5 |
+
COUNTER, WEB;
|
| 6 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/OrderStatus.java
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain;
|
| 2 |
+
|
| 3 |
+
public enum OrderStatus {
|
| 4 |
+
|
| 5 |
+
PLACED, IN_PROGRESS, FULFILLED
|
| 6 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/commands/CommandItem.java
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain.commands;
|
| 2 |
+
|
| 3 |
+
import com.fasterxml.jackson.annotation.JsonProperty;
|
| 4 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Item;
|
| 5 |
+
|
| 6 |
+
import java.math.BigDecimal;
|
| 7 |
+
import java.util.StringJoiner;
|
| 8 |
+
|
| 9 |
+
/**
|
| 10 |
+
* Representst the individual line items in a PlaceOrderCommand
|
| 11 |
+
*/
|
| 12 |
+
public class CommandItem {
|
| 13 |
+
|
| 14 |
+
public final Item item;
|
| 15 |
+
|
| 16 |
+
public final String name;
|
| 17 |
+
|
| 18 |
+
public final BigDecimal price;
|
| 19 |
+
|
| 20 |
+
public CommandItem(
|
| 21 |
+
@JsonProperty("item") Item item,
|
| 22 |
+
@JsonProperty("name") String name,
|
| 23 |
+
@JsonProperty("price") BigDecimal price) {
|
| 24 |
+
this.item = item;
|
| 25 |
+
this.name = name;
|
| 26 |
+
this.price = price;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
@Override
|
| 30 |
+
public String toString() {
|
| 31 |
+
return new StringJoiner(", ", CommandItem.class.getSimpleName() + "[", "]")
|
| 32 |
+
.add("item=" + item)
|
| 33 |
+
.add("name='" + name + "'")
|
| 34 |
+
.add("price=" + price)
|
| 35 |
+
.toString();
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
@Override
|
| 39 |
+
public boolean equals(Object o) {
|
| 40 |
+
if (this == o) return true;
|
| 41 |
+
if (o == null || getClass() != o.getClass()) return false;
|
| 42 |
+
|
| 43 |
+
CommandItem that = (CommandItem) o;
|
| 44 |
+
|
| 45 |
+
if (item != that.item) return false;
|
| 46 |
+
if (name != null ? !name.equals(that.name) : that.name != null) return false;
|
| 47 |
+
return price != null ? price.equals(that.price) : that.price == null;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
@Override
|
| 51 |
+
public int hashCode() {
|
| 52 |
+
int result = item != null ? item.hashCode() : 0;
|
| 53 |
+
result = 31 * result + (name != null ? name.hashCode() : 0);
|
| 54 |
+
result = 31 * result + (price != null ? price.hashCode() : 0);
|
| 55 |
+
return result;
|
| 56 |
+
}
|
| 57 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/commands/CommandType.java
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain.commands;
|
| 2 |
+
|
| 3 |
+
public enum CommandType {
|
| 4 |
+
|
| 5 |
+
PLACE_ORDER;
|
| 6 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/commands/PlaceOrderCommand.java
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain.commands;
|
| 2 |
+
|
| 3 |
+
import com.fasterxml.jackson.annotation.JsonCreator;
|
| 4 |
+
import com.fasterxml.jackson.annotation.JsonIgnore;
|
| 5 |
+
import com.fasterxml.jackson.annotation.JsonProperty;
|
| 6 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Location;
|
| 7 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.OrderSource;
|
| 8 |
+
|
| 9 |
+
import java.time.Instant;
|
| 10 |
+
import java.util.List;
|
| 11 |
+
import java.util.Optional;
|
| 12 |
+
|
| 13 |
+
public class PlaceOrderCommand {
|
| 14 |
+
|
| 15 |
+
private final CommandType commandType = CommandType.PLACE_ORDER;
|
| 16 |
+
|
| 17 |
+
private final String id;
|
| 18 |
+
|
| 19 |
+
private final OrderSource orderSource;
|
| 20 |
+
|
| 21 |
+
private final Location location;
|
| 22 |
+
|
| 23 |
+
private final String loyaltyMemberId;
|
| 24 |
+
|
| 25 |
+
private final List<CommandItem> baristaItems;
|
| 26 |
+
|
| 27 |
+
private final List<CommandItem> kitchenItems;
|
| 28 |
+
|
| 29 |
+
private final Instant timestamp;
|
| 30 |
+
|
| 31 |
+
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
|
| 32 |
+
public PlaceOrderCommand(
|
| 33 |
+
@JsonProperty("id") final String id,
|
| 34 |
+
@JsonProperty("orderSource") final OrderSource orderSource,
|
| 35 |
+
@JsonProperty("storeId") final Location location,
|
| 36 |
+
@JsonProperty("rewardsId") final Optional<String> loyaltyMemberId,
|
| 37 |
+
@JsonProperty("baristaItems") Optional<List<CommandItem>> baristaItems,
|
| 38 |
+
@JsonProperty("kitchenItems") Optional<List<CommandItem>> kitchenItems,
|
| 39 |
+
@JsonProperty("commandType") final CommandType commandType) {
|
| 40 |
+
this.id = id;
|
| 41 |
+
this.orderSource = orderSource;
|
| 42 |
+
this.location = location;
|
| 43 |
+
if (loyaltyMemberId.isPresent()) {
|
| 44 |
+
this.loyaltyMemberId = loyaltyMemberId.get();
|
| 45 |
+
}else{
|
| 46 |
+
this.loyaltyMemberId = null;
|
| 47 |
+
}
|
| 48 |
+
if (baristaItems.isPresent()) {
|
| 49 |
+
this.baristaItems = baristaItems.get();
|
| 50 |
+
}else{
|
| 51 |
+
this.baristaItems = null;
|
| 52 |
+
}
|
| 53 |
+
if (kitchenItems.isPresent()) {
|
| 54 |
+
this.kitchenItems = kitchenItems.get();
|
| 55 |
+
}else{
|
| 56 |
+
this.kitchenItems = null;
|
| 57 |
+
}
|
| 58 |
+
this.timestamp = Instant.now();
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
@Override
|
| 62 |
+
public String toString() {
|
| 63 |
+
return "PlaceOrderCommand{" +
|
| 64 |
+
"id='" + id + '\'' +
|
| 65 |
+
", orderSource=" + orderSource +
|
| 66 |
+
", location=" + location +
|
| 67 |
+
", loyaltyMemberId='" + loyaltyMemberId + '\'' +
|
| 68 |
+
", baristaItems=" + baristaItems +
|
| 69 |
+
", kitchenItems=" + kitchenItems +
|
| 70 |
+
", timestamp=" + timestamp +
|
| 71 |
+
'}';
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
@Override
|
| 75 |
+
public boolean equals(Object o) {
|
| 76 |
+
if (this == o) return true;
|
| 77 |
+
if (o == null || getClass() != o.getClass()) return false;
|
| 78 |
+
|
| 79 |
+
PlaceOrderCommand that = (PlaceOrderCommand) o;
|
| 80 |
+
|
| 81 |
+
if (id != null ? !id.equals(that.id) : that.id != null) return false;
|
| 82 |
+
if (orderSource != that.orderSource) return false;
|
| 83 |
+
if (location != that.location) return false;
|
| 84 |
+
if (loyaltyMemberId != null ? !loyaltyMemberId.equals(that.loyaltyMemberId) : that.loyaltyMemberId != null)
|
| 85 |
+
return false;
|
| 86 |
+
if (baristaItems != null ? !baristaItems.equals(that.baristaItems) : that.baristaItems != null)
|
| 87 |
+
return false;
|
| 88 |
+
if (kitchenItems != null ? !kitchenItems.equals(that.kitchenItems) : that.kitchenItems != null)
|
| 89 |
+
return false;
|
| 90 |
+
return timestamp != null ? timestamp.equals(that.timestamp) : that.timestamp == null;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
@Override
|
| 94 |
+
public int hashCode() {
|
| 95 |
+
int result = id != null ? id.hashCode() : 0;
|
| 96 |
+
result = 31 * result + (orderSource != null ? orderSource.hashCode() : 0);
|
| 97 |
+
result = 31 * result + (location != null ? location.hashCode() : 0);
|
| 98 |
+
result = 31 * result + (loyaltyMemberId != null ? loyaltyMemberId.hashCode() : 0);
|
| 99 |
+
result = 31 * result + (baristaItems != null ? baristaItems.hashCode() : 0);
|
| 100 |
+
result = 31 * result + (kitchenItems != null ? kitchenItems.hashCode() : 0);
|
| 101 |
+
result = 31 * result + (timestamp != null ? timestamp.hashCode() : 0);
|
| 102 |
+
return result;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
public Optional<List<CommandItem>> getBaristaItems() {
|
| 106 |
+
return Optional.ofNullable(baristaItems);
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
public Optional<List<CommandItem>> getKitchenItems() {
|
| 110 |
+
return Optional.ofNullable(kitchenItems);
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
public Optional<String> getLoyaltyMemberId() {
|
| 114 |
+
return Optional.ofNullable(loyaltyMemberId);
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
public String getId() {
|
| 118 |
+
return id;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
public OrderSource getOrderSource() {
|
| 122 |
+
return orderSource;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
public Location getLocation() {
|
| 126 |
+
return location;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
public Instant getTimestamp() {
|
| 130 |
+
return timestamp;
|
| 131 |
+
}
|
| 132 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/valueobjects/OrderIn.java
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain.valueobjects;
|
| 2 |
+
|
| 3 |
+
import com.fasterxml.jackson.annotation.JsonCreator;
|
| 4 |
+
import com.fasterxml.jackson.annotation.JsonProperty;
|
| 5 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Item;
|
| 6 |
+
|
| 7 |
+
import java.time.Instant;
|
| 8 |
+
|
| 9 |
+
/**
|
| 10 |
+
* A value object encapsulating the information sent to Barista and Kitchen
|
| 11 |
+
*/
|
| 12 |
+
public class OrderIn {
|
| 13 |
+
|
| 14 |
+
public final String orderId;
|
| 15 |
+
|
| 16 |
+
public final String itemId;
|
| 17 |
+
|
| 18 |
+
public final Item item;
|
| 19 |
+
|
| 20 |
+
public final String name;
|
| 21 |
+
|
| 22 |
+
public final Instant timeIn;
|
| 23 |
+
|
| 24 |
+
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
|
| 25 |
+
public OrderIn(
|
| 26 |
+
@JsonProperty("orderId") String orderId,
|
| 27 |
+
@JsonProperty("lineItemId") String itemId,
|
| 28 |
+
@JsonProperty("item") Item item,
|
| 29 |
+
@JsonProperty("name") String name) {
|
| 30 |
+
this.orderId = orderId;
|
| 31 |
+
this.itemId = itemId;
|
| 32 |
+
this.item = item;
|
| 33 |
+
this.name = name;
|
| 34 |
+
this.timeIn = Instant.now();
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
@Override
|
| 38 |
+
public String toString() {
|
| 39 |
+
return "OrderTicket{" +
|
| 40 |
+
"orderId='" + orderId + '\'' +
|
| 41 |
+
", lineItemId='" + itemId + '\'' +
|
| 42 |
+
", item=" + item +
|
| 43 |
+
", name='" + name + '\'' +
|
| 44 |
+
", timestamp=" + timeIn +
|
| 45 |
+
'}';
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
@Override
|
| 49 |
+
public boolean equals(Object o) {
|
| 50 |
+
if (this == o) return true;
|
| 51 |
+
if (o == null || getClass() != o.getClass()) return false;
|
| 52 |
+
|
| 53 |
+
OrderIn that = (OrderIn) o;
|
| 54 |
+
|
| 55 |
+
if (orderId != null ? !orderId.equals(that.orderId) : that.orderId != null) return false;
|
| 56 |
+
if (itemId != null ? !itemId.equals(that.itemId) : that.itemId != null) return false;
|
| 57 |
+
if (item != that.item) return false;
|
| 58 |
+
if (name != null ? !name.equals(that.name) : that.name != null) return false;
|
| 59 |
+
return timeIn != null ? timeIn.equals(that.timeIn) : that.timeIn == null;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
@Override
|
| 63 |
+
public int hashCode() {
|
| 64 |
+
int result = orderId != null ? orderId.hashCode() : 0;
|
| 65 |
+
result = 31 * result + (itemId != null ? itemId.hashCode() : 0);
|
| 66 |
+
result = 31 * result + (item != null ? item.hashCode() : 0);
|
| 67 |
+
result = 31 * result + (name != null ? name.hashCode() : 0);
|
| 68 |
+
result = 31 * result + (timeIn != null ? timeIn.hashCode() : 0);
|
| 69 |
+
return result;
|
| 70 |
+
}
|
| 71 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/valueobjects/OrderUp.java
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain.valueobjects;
|
| 2 |
+
|
| 3 |
+
import com.fasterxml.jackson.annotation.JsonCreator;
|
| 4 |
+
import com.fasterxml.jackson.annotation.JsonProperty;
|
| 5 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Item;
|
| 6 |
+
|
| 7 |
+
import java.time.Instant;
|
| 8 |
+
|
| 9 |
+
public class OrderUp extends OrderIn{
|
| 10 |
+
|
| 11 |
+
public final String madeBy;
|
| 12 |
+
|
| 13 |
+
public final Instant timeUp;
|
| 14 |
+
|
| 15 |
+
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
|
| 16 |
+
public OrderUp(
|
| 17 |
+
@JsonProperty("orderId") String orderId,
|
| 18 |
+
@JsonProperty("lineItemId") String lineItemId,
|
| 19 |
+
@JsonProperty("item") Item item,
|
| 20 |
+
@JsonProperty("name") String name,
|
| 21 |
+
@JsonProperty("timestamp") Instant timeUp,
|
| 22 |
+
@JsonProperty("madeBy") String madeBy) {
|
| 23 |
+
super(orderId, lineItemId, item, name);
|
| 24 |
+
this.timeUp = timeUp;
|
| 25 |
+
this.madeBy = madeBy;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
@Override
|
| 29 |
+
public String toString() {
|
| 30 |
+
return "OrderUp{" +
|
| 31 |
+
"orderId='" + orderId + '\'' +
|
| 32 |
+
", lineItemId='" + itemId + '\'' +
|
| 33 |
+
", item=" + item +
|
| 34 |
+
", name='" + name + '\'' +
|
| 35 |
+
", timestamp=" + timeUp +
|
| 36 |
+
", madeBy='" + madeBy + '\'' +
|
| 37 |
+
'}';
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
@Override
|
| 41 |
+
public boolean equals(Object o) {
|
| 42 |
+
|
| 43 |
+
if (this == o) return true;
|
| 44 |
+
if (o == null || getClass() != o.getClass()) return false;
|
| 45 |
+
if (!super.equals(o)) return false;
|
| 46 |
+
|
| 47 |
+
OrderUp orderUp = (OrderUp) o;
|
| 48 |
+
|
| 49 |
+
return madeBy != null ? madeBy.equals(orderUp.madeBy) : orderUp.madeBy == null;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
@Override
|
| 53 |
+
public int hashCode() {
|
| 54 |
+
int result = super.hashCode();
|
| 55 |
+
result = 31 * result + (madeBy != null ? madeBy.hashCode() : 0);
|
| 56 |
+
return result;
|
| 57 |
+
}
|
| 58 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/domain/valueobjects/OrderUpdate.java
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.domain.valueobjects;
|
| 2 |
+
|
| 3 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Item;
|
| 4 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.OrderStatus;
|
| 5 |
+
|
| 6 |
+
public class OrderUpdate {
|
| 7 |
+
|
| 8 |
+
public final String orderId;
|
| 9 |
+
|
| 10 |
+
public final String itemId;
|
| 11 |
+
|
| 12 |
+
public final String name;
|
| 13 |
+
|
| 14 |
+
public final Item item;
|
| 15 |
+
|
| 16 |
+
public final OrderStatus status;
|
| 17 |
+
|
| 18 |
+
public final String madeBy;
|
| 19 |
+
|
| 20 |
+
public OrderUpdate(final String orderId, final String itemId, final String name, final Item item, final OrderStatus status) {
|
| 21 |
+
this.orderId = orderId;
|
| 22 |
+
this.itemId = itemId;
|
| 23 |
+
this.name = name;
|
| 24 |
+
this.item = item;
|
| 25 |
+
this.status = status;
|
| 26 |
+
this.madeBy = null;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
public OrderUpdate(final String orderId, final String itemId, final String name, final Item item, final OrderStatus status, final String madeBy) {
|
| 30 |
+
this.orderId = orderId;
|
| 31 |
+
this.itemId = itemId;
|
| 32 |
+
this.name = name;
|
| 33 |
+
this.item = item;
|
| 34 |
+
this.status = status;
|
| 35 |
+
this.madeBy = madeBy;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
@Override
|
| 39 |
+
public String toString() {
|
| 40 |
+
final StringBuilder sb = new StringBuilder("OrderUpdate{");
|
| 41 |
+
sb.append("orderId='").append(orderId).append('\'');
|
| 42 |
+
sb.append(", itemId='").append(itemId).append('\'');
|
| 43 |
+
sb.append(", name='").append(name).append('\'');
|
| 44 |
+
sb.append(", item=").append(item);
|
| 45 |
+
sb.append(", status=").append(status);
|
| 46 |
+
sb.append(", madeBy='").append(madeBy).append('\'');
|
| 47 |
+
sb.append('}');
|
| 48 |
+
return sb.toString();
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
@Override
|
| 52 |
+
public boolean equals(Object o) {
|
| 53 |
+
if (this == o) return true;
|
| 54 |
+
if (o == null || getClass() != o.getClass()) return false;
|
| 55 |
+
|
| 56 |
+
OrderUpdate that = (OrderUpdate) o;
|
| 57 |
+
|
| 58 |
+
if (orderId != null ? !orderId.equals(that.orderId) : that.orderId != null) return false;
|
| 59 |
+
if (itemId != null ? !itemId.equals(that.itemId) : that.itemId != null) return false;
|
| 60 |
+
if (name != null ? !name.equals(that.name) : that.name != null) return false;
|
| 61 |
+
if (item != that.item) return false;
|
| 62 |
+
if (status != that.status) return false;
|
| 63 |
+
return madeBy != null ? madeBy.equals(that.madeBy) : that.madeBy == null;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
@Override
|
| 67 |
+
public int hashCode() {
|
| 68 |
+
int result = orderId != null ? orderId.hashCode() : 0;
|
| 69 |
+
result = 31 * result + (itemId != null ? itemId.hashCode() : 0);
|
| 70 |
+
result = 31 * result + (name != null ? name.hashCode() : 0);
|
| 71 |
+
result = 31 * result + (item != null ? item.hashCode() : 0);
|
| 72 |
+
result = 31 * result + (status != null ? status.hashCode() : 0);
|
| 73 |
+
result = 31 * result + (madeBy != null ? madeBy.hashCode() : 0);
|
| 74 |
+
return result;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/infrastructure/EventBusTopics.java
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.infrastructure;
|
| 2 |
+
|
| 3 |
+
public class EventBusTopics {
|
| 4 |
+
|
| 5 |
+
public static final String WEB_UPDATES = "web-updates";
|
| 6 |
+
public static final String BARISTA_IN = "barista-in";
|
| 7 |
+
public static final String KITCHEN_IN = "kitchen-in";
|
| 8 |
+
public static final String ORDERS_UP = "orders-up";
|
| 9 |
+
|
| 10 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/infrastructure/OrderRepository.java
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.infrastructure;
|
| 2 |
+
|
| 3 |
+
import io.quarkus.hibernate.orm.panache.PanacheRepository;
|
| 4 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Order;
|
| 5 |
+
|
| 6 |
+
import jakarta.enterprise.context.ApplicationScoped;
|
| 7 |
+
|
| 8 |
+
@ApplicationScoped
|
| 9 |
+
public class OrderRepository implements PanacheRepository<Order> {
|
| 10 |
+
|
| 11 |
+
public Order findById(final String id) {
|
| 12 |
+
return Order.findById(id);
|
| 13 |
+
}
|
| 14 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/kitchen/Kitchen.java
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.kitchen;
|
| 2 |
+
|
| 3 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderIn;
|
| 4 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderUp;
|
| 5 |
+
import io.vertx.mutiny.core.eventbus.Message;
|
| 6 |
+
|
| 7 |
+
public interface Kitchen {
|
| 8 |
+
|
| 9 |
+
public void onOrderIn(Message message);
|
| 10 |
+
}
|
benchmark/whole_applications/coffee-shop/quarkus/src/main/java/io/quarkuscoffeeshop/coffeeshop/kitchen/KitchenImpl.java
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package io.quarkuscoffeeshop.coffeeshop.kitchen;
|
| 2 |
+
|
| 3 |
+
import io.quarkus.vertx.ConsumeEvent;
|
| 4 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.Item;
|
| 5 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderIn;
|
| 6 |
+
import io.quarkuscoffeeshop.coffeeshop.domain.valueobjects.OrderUp;
|
| 7 |
+
import io.quarkuscoffeeshop.coffeeshop.kitchen.domain.KitchenOrder;
|
| 8 |
+
import io.quarkuscoffeeshop.coffeeshop.kitchen.domain.KitchenOrderRepository;
|
| 9 |
+
import io.quarkuscoffeeshop.utils.JsonUtil;
|
| 10 |
+
import io.smallrye.common.annotation.Blocking;
|
| 11 |
+
import io.vertx.mutiny.core.eventbus.EventBus;
|
| 12 |
+
import io.vertx.mutiny.core.eventbus.Message;
|
| 13 |
+
import org.slf4j.Logger;
|
| 14 |
+
import org.slf4j.LoggerFactory;
|
| 15 |
+
|
| 16 |
+
import jakarta.enterprise.context.ApplicationScoped;
|
| 17 |
+
import jakarta.inject.Inject;
|
| 18 |
+
import jakarta.transaction.Transactional;
|
| 19 |
+
import java.time.Instant;
|
| 20 |
+
|
| 21 |
+
import static io.quarkuscoffeeshop.coffeeshop.infrastructure.EventBusTopics.*;
|
| 22 |
+
|
| 23 |
+
@ApplicationScoped
|
| 24 |
+
public class KitchenImpl implements Kitchen {
|
| 25 |
+
|
| 26 |
+
private static final Logger LOGGER = LoggerFactory.getLogger(KitchenImpl.class);
|
| 27 |
+
|
| 28 |
+
String madeBy = "Sulu";
|
| 29 |
+
|
| 30 |
+
@Inject
|
| 31 |
+
EventBus eventBus;
|
| 32 |
+
|
| 33 |
+
@Inject
|
| 34 |
+
KitchenOrderRepository kitchenOrderRepository;
|
| 35 |
+
|
| 36 |
+
@ConsumeEvent(KITCHEN_IN)
|
| 37 |
+
@Blocking
|
| 38 |
+
@Transactional
|
| 39 |
+
public void onOrderIn(final Message message) {
|
| 40 |
+
OrderIn orderIn = JsonUtil.fromJson(message.body().toString(), OrderIn.class);
|
| 41 |
+
KitchenOrder kitchenOrder = new KitchenOrder(orderIn.orderId, orderIn.item, Instant.now());
|
| 42 |
+
LOGGER.debug("order in : {}", orderIn);
|
| 43 |
+
try {
|
| 44 |
+
Thread.sleep(calculateDelay(orderIn.item));
|
| 45 |
+
} catch (InterruptedException e) {
|
| 46 |
+
e.printStackTrace();
|
| 47 |
+
}
|
| 48 |
+
OrderUp orderUp = new OrderUp(
|
| 49 |
+
orderIn.orderId,
|
| 50 |
+
orderIn.itemId,
|
| 51 |
+
orderIn.item,
|
| 52 |
+
orderIn.name,
|
| 53 |
+
Instant.now(),
|
| 54 |
+
madeBy);
|
| 55 |
+
kitchenOrder.setTimeUp(Instant.now());
|
| 56 |
+
kitchenOrderRepository.persist(kitchenOrder);
|
| 57 |
+
eventBus.<OrderUp>publish(ORDERS_UP, JsonUtil.toJson(orderUp));
|
| 58 |
+
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
private int calculateDelay(final Item item) {
|
| 62 |
+
switch (item) {
|
| 63 |
+
case CROISSANT:
|
| 64 |
+
return 7000;
|
| 65 |
+
case CROISSANT_CHOCOLATE:
|
| 66 |
+
return 7000;
|
| 67 |
+
case CAKEPOP:
|
| 68 |
+
return 5000;
|
| 69 |
+
case MUFFIN:
|
| 70 |
+
return 7000;
|
| 71 |
+
default:
|
| 72 |
+
return 3000;
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
}
|