Skip to content

musabbozkurt/live-data-service

Repository files navigation

Table of Contents

  1. Summary
  2. Prerequisites and Installation
  3. How To Run And Test Application
  4. Tech Stack
  5. Redis Commands
  6. Google Play Integrity API
  7. References

Summary

live-data-service is providing CRUD operations to process live events


Prerequisites

  • Docker needs to be installed
  • Clone or checkout the project from version control system (git) and follow below steps
  • For local development only (not needed for Docker-based workflows):
    • Java 25+ needs to be installed export JAVA_HOME=$(/usr/libexec/java_home -v 25)
    • Maven needs to be installed (or use the included Maven wrapper ./mvnw)
    • Install any Java IDE (Eclipse, STS, Intellij etc..)

How_To_Run_And_Test_Application

  • The Dockerfile uses a multi-stage build with Maven cache mounts and a jlink custom runtime, so you do not need to build the JAR locally first. Docker handles the full build (compile + package) inside the container.
  • Tests are skipped during the Docker build because Testcontainers requires a Docker daemon which is not available inside docker build. Run tests on the host before building.
  • The start_application profile builds the app image and starts it together with all infrastructure services (Redis, Kafka, Elasticsearch, ActiveMQ, Mailpit, Zipkin, Jaeger, etc.). Services with healthchecks (Elasticsearch, Kafka) must be healthy before the app starts.
  • Docker -> Preferences -> Resources -> File sharing -> click add button and select prometheus folder under the /src/main/resources or just add /etc/prometheus path -> Apply & Restart
    • img.png
cd live-data-service

# Run tests on the host (requires Docker for Testcontainers)
mvn clean verify

# Build and start the application together with all infrastructure services
docker compose --profile start_application up -d --build

# Start only infrastructure services (Redis, Kafka, Elasticsearch, etc.)
docker compose up -d

# For local development without Docker (requires infrastructure services running via docker compose up -d)
./mvnw spring-boot:run   # or: mvn spring-boot:run

Tech_Stack


Redis

  • The following command returns all matched data by 'keyPattern:*' pattern

    • redis-cli --scan --pattern 'keyPattern:*'
  • The following command deletes all matched data by 'keyPattern:*' pattern

    • redis-cli KEYS 'keyPattern:*' | xargs redis-cli DEL
  • The following command finds TYPE in redis with KEY

    • TYPE key -> TYPE xxx:hashedIdOrSomethingElse
  • The following commands search by TYPE

    • for "string" TYPE: get key
    • for "hash" TYPE: hgetall key
    • for "list" TYPE: lrange key 0 -1
    • for "set" TYPE: smembers key
    • for "zset" TYPE: zrange key 0 -1 withScores

Google_Play_Integrity_API


References

About

Spring gRPC, GraphQL, Prometheus, Grafana, Kafka, Zipkin, Redis, Elasticsearch and Logstash Integrations with Spring Boot 4, Java 25 and Docker. Integration Tests with Testcontainers for Controller. Unit Tests for Controller, Service, and Mapper with Junit 5, and Mockito

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors