{"id":15667531,"url":"https://github.com/mathisburger/gendev2024","last_synced_at":"2026-01-28T05:52:55.097Z","repository":{"id":242517838,"uuid":"784648968","full_name":"MathisBurger/genDev2024","owner":"MathisBurger","description":"My personal approach for genDev 2024","archived":false,"fork":false,"pushed_at":"2024-05-15T15:34:31.000Z","size":327,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T09:15:17.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/MathisBurger.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":"2024-04-10T09:15:47.000Z","updated_at":"2024-06-03T11:20:46.000Z","dependencies_parsed_at":"2024-06-03T14:22:23.044Z","dependency_job_id":"9bfc70d0-d733-4489-a822-6c6fc8f929ef","html_url":"https://github.com/MathisBurger/genDev2024","commit_stats":null,"previous_names":["mathisburger/gendev2024"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/MathisBurger/genDev2024","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathisBurger%2FgenDev2024","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathisBurger%2FgenDev2024/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathisBurger%2FgenDev2024/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathisBurger%2FgenDev2024/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MathisBurger","download_url":"https://codeload.github.com/MathisBurger/genDev2024/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathisBurger%2FgenDev2024/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28840237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T05:50:12.573Z","status":"ssl_error","status_checked_at":"2026-01-28T05:49:54.528Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-03T14:04:07.923Z","updated_at":"2026-01-28T05:52:55.070Z","avatar_url":"https://github.com/MathisBurger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GenDev\n\n***NOTE: This project approach has not been submitted. But it is not build to be used by other people who want to apply for the scholarship***\n\nThis is my project approach for the [GenDev](https://www.talents.check24.de/gendev) scholarship 2024.\n\n- [Technology and framework choice](#technology-and-framework-choice)\n- [Project in action](#project-in-action)\n- [Deployment](#deployment)\n- [Application scaling](#application-scaling)\n- [Possible improvements](#possible-improvements)\n\n## Technology and framework choice\n\nI've selected Kotlin as my backend programming language and Quarkus as my preferred framework for backend development.\nMy familiarity with Quarkus is quite extensive. Initially, I considered using PHP in conjunction with the\nSymfony framework. However, given PHP's subpar performance in handling WebSocket connections, I opted for the former options.\n\nI utilized both WebSockets and polling technology for real-time updates to showcase my proficiency in implementing both methods.\nI selected WebSockets for the community and global leaderboard, as it efficiently handles large data transfers particularly when users expand it rapidly.\nHence, WebSockets was the optimal choice for this feature. Conversely, I opted for polling for the live updates of games\nand the dashboard. This is because these requests yield a limited amount of data, which is more manageable through \nsimple polling due to its lower complexity compared to a WebSocket connection.\n\nFor the frontend of the application, I selected Next.JS, which is a superset of React. I also employed TypeScript to ensure nearly typesafe\nsystem implementation in my frontend, effectively minimizing the risk of type errors. For the UI,\nI utilized a library called Joy UI, which bears similarity to Material UI. This significantly simplified the process of designing\nthe application's user interface, even though I am well-versed in CSS. \n\n## Project in action\n\nYou can find the YouTube video which is an introduction into the project and my local setup [here](Link).\n\n## Deployment\n\nThis application uses docker for deployment, because I am very familiar with Docker and docker compose.\nYou can pull the image with following command:\n```shell\ndocker pull ghcr.io/MathisBurger/genDev2024:latest\n```\n\nIf you want to start the application just run the application with the provided `docker-compose.yml`:\n```shell\ndocker-compose up -d\n```\n\n## Load testing\n\nDue to the need for 2,000,000 active users and an additional 10,000 currently active individuals, it was necessary for me to thoroughly\ntest the application and check its scaling capabilities. I established a Kubernetes environment with a standalone PostgreSQL database and five\ninstances of the server container. All websocket connections were redirected to the first instance, while other web requests were load balanced.\nI tested a variety of scenarios with 100, 1,000, 10,000, and 100,000 users, monitoring the CPU and RAM usage of my docker cluster throughout.\nSubsequently, I defined a mathematical function to depict the incremental requirement for resources. The results indicated that the application\nis capable of supporting 2,000,000 users. However, this requires considerable memory that my laptop cannot provide, though a robust server can.\n\n## Possible improvements\n\nEven though the Docker container is capable of handling 10,000 WebSocket connections and 2,000,000 active users, it uses a considerable amount\nof RAM and is currently confined to a single physical server for proper operation. Though it's possible to scale\nhorizontally using services such as Kubernetes or Docker Swarm, not all WebSocket connections would provide real-time\nupdates in this scenario. Consequently, the website would need to be refreshed, although the dashboard would still provide real-time updates, given that\nthe polling requests are stateless. This issue could be resolved by implementing a messaging microservice, like Apache Kafka. \nThis would prompt all active instances of the backend to send updates through the WebSockets to the clients.\n\nFurthermore, the game update functionality takes a lot of time and resources which could be optimized by implementing multithreading\nfor the sort and database transactions.\n\nSome of the database queries are not fully optimized. There is potential to prevent the fetching of unnecessary data and eliminate\nredundant `WHERE` clauses. Implementing these changes could decrease database load and reduce query complexity.\n\nFurthermore, I should have implemented caching for load-heavy requests to improve the overall performance of the application.\nAlthough it seemed too complex to implement caching for these highly user-individual queries, this could be a challenge \nto tackle in the future.\n\nWhile the application's frontend is somewhat responsive, certain components aren't optimized for mobile devices. \nTherefore, there could be a mobile app or a better-optimized web application. In the case of building a mobile app, I would use \nReact Native due to its cross-platform capability (both iOS and Android), and the fact that core components, like the APIService\nof the web application, can still be reused.\n\nFurthermore, to ensure that the application functions correctly even after updating\nsome software components, I would carry out testing through both UnitTests and end-to-end (e2e) tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathisburger%2Fgendev2024","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathisburger%2Fgendev2024","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathisburger%2Fgendev2024/lists"}