Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdecker-mobilecomputing/maven_springboot_linkshortener
Link shortener with Java and Kafka; demo for microservice architecture
https://github.com/mdecker-mobilecomputing/maven_springboot_linkshortener
demo docker github-actions h2-database java kafka maven microservices spring-boot
Last synced: 7 days ago
JSON representation
Link shortener with Java and Kafka; demo for microservice architecture
- Host: GitHub
- URL: https://github.com/mdecker-mobilecomputing/maven_springboot_linkshortener
- Owner: MDecker-MobileComputing
- License: bsd-3-clause
- Created: 2023-12-23T20:06:13.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-04-12T12:47:06.000Z (7 months ago)
- Last Synced: 2024-04-13T20:01:47.938Z (7 months ago)
- Topics: demo, docker, github-actions, h2-database, java, kafka, maven, microservices, spring-boot
- Language: Java
- Homepage:
- Size: 261 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# URL Shortener with Microservices #
This repository contains the source code for a [URL Shortener Service](https://en.wikipedia.org/wiki/URL_shortening)
implemented by several Java microservices (Maven and Spring Boot) with an embedded [H2 database](https://www.h2database.com).
A similar application with Nodejs (but still Microservices and Kafka) can be found [here](https://github.com/MDecker-MobileComputing/Nodejs_Express_LinkShortenerMitKafka).
----
## Overview ##
Before starting the microservices the Kafka server must be started using the `docker-compose.yml`
in [this folder](./Kafka/).
This file will also start a container with a simple load balancer for the two instances
of microservice 2 (resolver).
**[Microservice 1 (Short Link Definition)](Microservice1_Definition/):**
* [The only Instance: `localhost:8080`](http://localhost:8080)
* DAO: `JdbcTemplate`
**[Microservice 2: (Link Resolver)](Microservice2_Resolver/):**
* Instances:
* [Instance 1: `localhost:8000`](http://localhost:8000)
* [Instance 2: `localhost:8010`](http://localhost:8010)
* [Load Balancer (nginx): `localhost:8123`](http://localhost:8123)
* DAO: `JdbcTemplate` and `NamedParameterJdbcTemplate`
**[Microservice 3: (Usage Statistics)](Microservice3_LinkStatistics/):**
* [The only Instance: `localhost:8050`](http://localhost:8050)
* DAO: `EntityManager` of *Jakarta Persistence API (JPA)*
DAO: **D**atabase **A**ccess **O**bject
----
## License ##
See the [LICENSE file](LICENSE.md) for license rights and limitations (BSD 3-Clause License).