{"id":22249543,"url":"https://github.com/theodo/quarkusdemo","last_synced_at":"2025-07-23T18:03:33.026Z","repository":{"id":44275630,"uuid":"229147307","full_name":"theodo/QuarkusDemo","owner":"theodo","description":"Java Quarkus Framework Demo - Java Scale Ready","archived":false,"fork":false,"pushed_at":"2023-07-08T00:05:15.000Z","size":4098,"stargazers_count":8,"open_issues_count":7,"forks_count":1,"subscribers_count":6,"default_branch":"RabbitMQ_KUB","last_synced_at":"2025-04-04T14:21:25.455Z","etag":null,"topics":["amqp","java","quarkus","quarkus-native","reactive-programming","rest"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theodo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-19T22:15:52.000Z","updated_at":"2024-04-29T20:22:06.000Z","dependencies_parsed_at":"2024-12-03T06:38:32.565Z","dependency_job_id":null,"html_url":"https://github.com/theodo/QuarkusDemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theodo/QuarkusDemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodo%2FQuarkusDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodo%2FQuarkusDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodo%2FQuarkusDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodo%2FQuarkusDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theodo","download_url":"https://codeload.github.com/theodo/QuarkusDemo/tar.gz/refs/heads/RabbitMQ_KUB","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodo%2FQuarkusDemo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266726539,"owners_count":23974922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amqp","java","quarkus","quarkus-native","reactive-programming","rest"],"created_at":"2024-12-03T06:27:23.596Z","updated_at":"2025-07-23T18:03:32.942Z","avatar_url":"https://github.com/theodo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## JAVA QUARKUS DEMO: UFOs versus RADARs  \n  \n![alt text](./docs/quarkus.png \"Quarkus Logo\")\n\n### Purposes  \n- Demonstrate usages of Quarkus framework.  (https://quarkus.io/) \n- Demonstrate how to create REST APIs.  (https://quarkus.io/guides/rest-json)\n- Demonstrate how to call REST APIs (local or external) (https://quarkus.io/guides/rest-client)\n- Use JAVA Reactive Programming (https://smallrye.io/smallrye-reactive-messaging/#_getting_started)\n- Produce AMQP messages on topics  (https://quarkus.io/guides/amqp)\n- Consume AMQP messages from queues (broadcast or anycast) (https://quarkus.io/guides/amqp)  \n- Broadcast SSE (Server Sent Events) to Web browser  (https://quarkus.io/guides/amqp)\n- Consume SSE using JS React Application  \n- Launch microservices with JVM with dev mode\n- Launch same microservices with JVM in Dockers containers  \n- Launch same microservices without JVM (native mode) in Dockers containers \n- Use SSL in REST APIs \n- Use Fault Tolerant library\n  \n### Branches\n- https://github.com/theodo/QuarkusDemo/tree/master: version with APACHE ARTEMIS AMQP Broker (using docker-compose)\n- https://github.com/theodo/QuarkusDemo/tree/RabbitMQ: version with RABBITMQ AMQP Broker (using docker-compose) \n- https://github.com/theodo/QuarkusDemo/tree/ActiveMQ: version with ACTIVEMQ AMQP Broker (using docker-compose)\n- https://github.com/theodo/QuarkusDemo: KUBERNETES on EKS version with RABBITMQ AMQP Broker\n  \n### Story  \n- UFOs are created by the users (initial position and destination are random)  \n- RADARs are created by the users by clicking on the map  \n- When RADARs detect UFOs, UFOs are highlighted on the map  \n  \n### Architecture  \n- Microservice `ufo-generator`: Manage list of UFOs and UFOs positions  \n  - Expose REST API to Get all UFOs  \n  - Expose REST API to Create (POST) new UFOs in the game  \n  - Send UFO new positions every 50ms on an AMQP Topic (broadcasted to many queues) named `ufos`  \n  - Created UFOs are named using the /pokemon API (to demonstrate external REST HTTPS Calls)  \nFor more details on this micro-service see [UFO-GENERATOR README](./ufo-generator/README.md)\n  \n- Microservice `ufo-radar`: Manage list of RADARs and RADARs positions  \n  - Expose REST API to Get all current Radars positions  \n  - Expose REST API to Create a new RADAR in the game  \n  - Send RADAR creation message on an AMQP Topic (broadcasted to many queues) named `radars`  \nFor more details on this micro-service see [UFO-RADAR README](./ufo-radar/README.md)\n\n- Microservice `ufo-radar-detection`: Compute Detection  \n  - Listen to UFO position messages (listen to `ufos-detection`queue (*))  \n  - Listen to RADAR creation messages (listen to `radars` queue)  \n  - Detect intersection of RADAR and UFO  \n  - Emit an AMQP HIT message for each UFO Detected named `hits`  \n  - At startup of the microservice, retrieve the list of current RADARs from `ufo-radar` API.  \nMultiple instances of this service can be deployed. A UFO message will be consumed by only one.  \nFor more details on this micro-service see [RADAR-DETECTION README](./ufo-radar-detection/README.md)\n    \n\n(*): `ufos-detection` queue is a queue diverted from `ufos` (broadcasted). A message published on `ufos` queue will be duplicated (by the AMQP broker) to `ufos-detection` In `ufos-detection` this message will be consumed by only one consumer.\nSee snipets files (in snipets directory) that describe AMQP brokers settings.\n  \n- Microservice `ufo-sse`: Manage SSE (Server Sent Stream) to Browsers  \n  - Expose REST API to Create a new UFO positions STREAM (to the browser)  \n  - Listen to UFO position messages (listen to `ufos`queue)  \n  - Group UFO position by packet (125ms approx.) to be sent by packet to Browser on SSE  \nFor more details on this micro-service see [UFO-SSE README](./ufo-sse/README.md)\n  \n### Architecture Diagram  \n  \n![alt text](./docs/schema-ufos.png \"System schema\")  \n  \n### Prerequisites for KUB EKS version\n\n1) Having an AWS account\n- Install AWS CLI Version 1. [Install AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-macos.html)\n- Configure AWS CLI credential. [Credential](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-metadata.html)\n\n        aws configure\n\nFill in the `AWS Access Key ID` and `AWS Secret Access Key`\n\n2) Create an EKS Kubernetes Cluster\n- Install `eksctl` tool. [Install eksctl](https://eksctl.io/introduction/installation/)\n\n- Create an EKS cluster\n\n        eksctl create cluster --name ufo-quarkus\n    \n    ![alt text](./docs/create-cluster.png \"Create Cluster\")  \n\n    \n3) After creation, you can check the status of the nodes in the cluster using:\n\n        kubectl get nodes\n\n    ![alt text](./docs/cluster-nodes.png \"Check Nodes\")  \n\n\n4) You can use `k9s` tool to navigate in the cluster (see: `https://github.com/derailed/k9s`)\n  \n  \nWATCH OUT !!!!: \nDO NOT FORGET TO DESTROY YOUR CLUSTER AFTER THE TEST IF YOU DO NOT WANT TO BE CHARGED TOO MUCH BY AWS  \n\n    eksctl delete cluster --name ufo-quarkus\n    \nDouble check in AWS Console if you do not have any ghost EC2 instances, ghost EKS cluster, ghost VPC.\nIf so, you can use the AWS console to terminate all ghosts components.      \n \n### Install and Start JVM Mode\nIn ufo root directory:\n\n    ./push-docker-jvm.sh  \n    ./push-in-kub.sh\n\n##### To start FRONT WebPage  \nFirst Get the Public IP of the HTTPD in EKS:\n\n    kubectl get svc ufo-httpd -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'\n    \nCopy this address in file  `config-devops.js` (copy of the `config-devops-template.js` file)  \nCopy also the Google API KEY for GoogleMap\n\nIn ufo-front directory:  \n  \n    yarn install  \n    yarn start\n    \nNavigate to: http://localhost:3000\nYou can create radars by clicking in the map.\n\n### Install  NATIVE Mode\nYou need to have GraalVM installed on your computer.\nSee here: [https://www.graalvm.org/](https://www.graalvm.org/)\n\nThis is the Quarkus NATIVE way of deploying application. \nThe build phase will create an EXECUTABLE file (including an embedded application server). This is not JAVA anymore.\nThe deploy phase is based on a LINUX docker image (fedora-minimal). The binary application is put inside the container. \n\n    ./push-docker-native.sh  \n    ./push-in-kub.sh\n\n![alt text](./docs/quarkus-native.png \"Native Compilation\")  \n\n### Explore KUB Pods using K9S\n\n![alt text](./docs/k9s-pods.png \"Pods\")  \n![alt text](./docs/k9s-logs.png \"Logs of one pod\")  \n\nNative `ufo-generator` application startup in less than 7ms.\n\n##### To start FRONT WebPage  \nFirst Get the Public IP of the HTTPD in EKS:\n\n    kubectl get svc ufo-httpd -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'\n    \nCopy this address in file  `config-devops.js` (copy of the `config-devops-template.js` file)  \nCopy also the Google API KEY for GoogleMap\n\nIn ufo-front directory:  \n\n    yarn install  \n    yarn start\nNavigate to: http://localhost:3000\nYou can create radars by clicking in the map.\n\n![alt text](./docs/demo.png \"Quarkus Demo\")  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodo%2Fquarkusdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheodo%2Fquarkusdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodo%2Fquarkusdemo/lists"}