{"id":15068950,"url":"https://github.com/fworks/algorithms-spring-boot","last_synced_at":"2025-04-10T16:51:33.729Z","repository":{"id":75431537,"uuid":"136994377","full_name":"fworks/algorithms-spring-boot","owner":"fworks","description":"An implementation of the basics algorithms and data structures on micro services / spring boot applications. (WIP)","archived":false,"fork":false,"pushed_at":"2019-02-04T12:14:55.000Z","size":451,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T14:44:23.969Z","etag":null,"topics":["algorithms","docker","java11","jdk11","junit5","microservices","spring-admin","spring-boot","spring-cloud"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-06-12T00:07:19.000Z","updated_at":"2025-01-30T05:11:43.000Z","dependencies_parsed_at":"2023-03-11T19:50:13.248Z","dependency_job_id":null,"html_url":"https://github.com/fworks/algorithms-spring-boot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fworks%2Falgorithms-spring-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fworks%2Falgorithms-spring-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fworks%2Falgorithms-spring-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fworks%2Falgorithms-spring-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fworks","download_url":"https://codeload.github.com/fworks/algorithms-spring-boot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248256007,"owners_count":21073438,"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","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":["algorithms","docker","java11","jdk11","junit5","microservices","spring-admin","spring-boot","spring-cloud"],"created_at":"2024-09-25T01:39:49.234Z","updated_at":"2025-04-10T16:51:33.721Z","avatar_url":"https://github.com/fworks.png","language":"Java","readme":"## Algorithms Microservices Spring Boot Application \r\n[![CircleCI](https://circleci.com/gh/fworks/algorithms-spring-boot.svg?style=svg)](https://circleci.com/gh/fworks/algorithms-spring-boot) [![Build Status](https://travis-ci.org/fworks/algorithms-spring-boot.svg?branch=master)](https://travis-ci.org/fworks/algorithms-spring-boot) [![codecov](https://codecov.io/gh/fworks/algorithms-spring-boot/branch/master/graph/badge.svg)](https://codecov.io/gh/fworks/algorithms-spring-boot)\r\n\r\nThis project is a test bed for microservices applications running on the latest technologies around Java + Spring + Containers.\r\n\r\n## Keys focus\r\n1) all microservices\r\n2) all containerized\r\n3) latest versions\r\n4) multiple databases\r\n5) code coverage \u003e 90%\r\n6) clear code\r\n7) build always passing\r\n8) always a work in progress\r\n \r\n## Techs\r\n- [x] Java 11\r\n- [x] Spring Boot 2.1.0\r\n- [x] Spring Web (using tomcat at moment, thinking about moving to undertow -[because of that](https://examples.javacodegeeks.com/enterprise-java/spring/tomcat-vs-jetty-vs-undertow-comparison-of-spring-boot-embedded-servlet-containers/))\r\n- [x] Spring Cloud (eureka, zuul, etc.)\r\n- [x] Spring DevTool / Actuator (for speeding up the development/restart, etc)\r\n- [x] Spring Admin (for monitoring)\r\n- [ ] Spring Security / Oauth2 (for authentication)\r\n- [x] Lombok (for avoiding boilerplate code)\r\n- [x] Swagger-ui / OpenApi (for exposing the rest services in an easy/user-friendly web page)\r\n- [x] Log4j2 (for logging)\r\n- [x] jUnit5 (for testing)\r\n- [x] Docker (generate docker image for the microservices, run the application, etc)\r\n- [ ] Kubernetes (run in a k8s cluster)\r\n- [x] MongoDB\r\n- [x] Mysql\r\n- [ ] Postgresql\r\n\r\n## Subject\r\nFor avoiding having a poor example of data, the subject of the microservices will be around Algorithms and Data Structures.\r\nSo, the microservices will implement a few of the basic algorithms (search, sorting, common problems, etc.).\r\nI'm using the book [Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne](https://algs4.cs.princeton.edu/home/), as a base for the algorithms and data structures.\r\n\r\n## Implementation Notes\r\n1) I know that most of the implementation of the algorithms could be done in static methods, utility classes, etc. However, I will use spring services just to show how that works.\r\n2) I could copy and paste the code from the book and use them.\r\nBut I will be testing myself to create them and code them in a way which they will be easier to understand (code style, comments, etc).\r\n\r\n## Code Structure / Subprojects\r\nFor making things easier, all microservices projects are subproject/modules from this maven project. That will make things easier than have separated git repositories for each one.\r\n\r\nI've also added some module prefix for a better understanding:\r\n- __ms-__ : for microservices\r\n- __lib-__ : for library/jar \r\n- __server-__ : for servers\r\n- __app-__: for app gateway\r\n\r\n## Subprojects\r\n[__app-algorithms__](https://github.com/fworks/algorithms-spring-boot/tree/master/app-algorithms) \u003e Subproject for the app gateway microservice project.\r\n\r\n[__lib-core__](https://github.com/fworks/algorithms-spring-boot/tree/master/lib-core) \u003e Subproject with few reusable codes for the microservices implementation. Just a library.\r\n\r\n[__lib-data-structures__](https://github.com/fworks/algorithms-spring-boot/tree/master/lib-data-structures) \u003e Subproject with data structures implementation. Just a library.\r\n\r\n[__ms-problems-service__](https://github.com/fworks/algorithms-spring-boot/tree/master/ms-problems-service) \u003e Subproject for the problems microservice.\r\n\r\n[__ms-searching-service__](https://github.com/fworks/algorithms-spring-boot/tree/master/ms-searching-service) \u003e Subproject for the searching microservice.\r\n\r\n[__ms-sorting-service__](https://github.com/fworks/algorithms-spring-boot/tree/master/ms-sorting-service) \u003e Subproject for the sorting microservice.\r\n\r\n[__server-admin__](https://github.com/fworks/algorithms-spring-boot/tree/master/server-admin) \u003e Subproject for the server admin.\r\n\r\n[__server-eureka__](https://github.com/fworks/algorithms-spring-boot/tree/master/server-eureka) \u003e Subproject for the service discovery - eureka server/service.\r\n\r\n## See it running\r\nThe apps are deployed as containers on the cloud. Please feel free to test it.\r\n\r\nEureka Server:\r\n[![Website](https://img.shields.io/website-up-down-green-red/http/algorithms-spring-boot.fworks.tech:8761.svg)](http://algorithms-spring-boot.fworks.tech:8761/)\r\n\r\nAdmin Server:\r\n[![Website](https://img.shields.io/website-up-down-green-red/http/algorithms-spring-boot.fworks.tech:9000.svg)](http://algorithms-spring-boot.fworks.tech:9000/)\r\n\r\nApp Algorithms:\r\n[![Website](https://img.shields.io/website-up-down-green-red/http/algorithms-spring-boot.fworks.tech:8080/swagger-ui.html.svg)](http://algorithms-spring-boot.fworks.tech:8080/swagger-ui.html)\r\n\r\nSearching Service:\r\n[![Website](https://img.shields.io/website-up-down-green-red/http/algorithms-spring-boot.fworks.tech:8081/swagger-ui.html.svg)](http://algorithms-spring-boot.fworks.tech:8081/swagger-ui.html)\r\n\r\nSorting Service:\r\n[![Website](https://img.shields.io/website-up-down-green-red/http/algorithms-spring-boot.fworks.tech:8082/swagger-ui.html.svg)](http://algorithms-spring-boot.fworks.tech:8082/swagger-ui.html)\r\n\r\nProblems Service:\r\n[![Website](https://img.shields.io/website-up-down-green-red/http/algorithms-spring-boot.fworks.tech:8083/swagger-ui.html.svg)](http://algorithms-spring-boot.fworks.tech:8083/swagger-ui.html)\r\n\r\n## Running\r\n\r\n#### Option A) \r\n\r\nThe faster way, running using the docker images that the last successful build generated.\r\n###### Step 1) Download the file docker-compose.yml\r\n###### Step 2) Open a terminal/powershell, go to the directory of the docker-compose.yml file and run:\r\n\r\n```\r\ndocker-compose up\r\n```\r\n\r\nIt should start up all the services.\r\nThat is it. Play around and have fun! :)\r\n\r\n\r\n#### Option B)\r\n\r\nGetting the code and compiling and running it.\r\n###### Step 1) Clone the code\r\n###### Step 2) Open a terminal/powershell, go to project root directory and run maven to generate the jars\r\n\r\n```\r\n.\\mvnw install docker:build -D maven.test.skip=true\r\n```\r\nNote: skipping the testing for speeding up\r\n\r\n###### Step 3) Run docker compose to start up all the services  \r\n\r\n```\r\ndocker-compose up\r\n```\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffworks%2Falgorithms-spring-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffworks%2Falgorithms-spring-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffworks%2Falgorithms-spring-boot/lists"}