Skip to content

πŸš€ gRPC microservice example with spring-boot 2 REST application which handles user events πŸ‘₯

Notifications You must be signed in to change notification settings

JudeNiroshan/audit-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Audit Server πŸ›‚

Build Status Codacy Badge codecov Known Vulnerabilities Docker Image Size (latest by date) Docker Pulls

audit-server is a spring-boot REST API which accepts user events as JSON objects and delegates them to a remote server to handle it appropriately.

Sample JSON payload (endpoint: /api/user/event, Method: POST) :

{
 "timestamp": 15623276532,
 "userId": 1029,
 "event": "something happened. Please log this in a file"
}

Configurations πŸ› οΈ

  • Eureka server endpoint in application.properties (Default http://localhost:8761/eureka)

How to run πŸƒπŸ½β€β™‚οΈ

Prerequisite:

Ensure logger-eureka-server instance is up and running on your local machine. Then,

  • clone the repository to your machine [git clone https://github.com/JudeNiroshan/audit-server.git]
  • move to audit-server [cd audit-server]
  • execute ./mvnw install
  • execute ./mvnw spring-boot:run (submit POST request to http://localhost:8080/api/user/event)

Developer Notes

  • Application is using google protocol buffers as protocol for calling remote servers. There are several frameworks available which uses .protoc as protocol. By default audit-server is using gRPC. It is possible to change it by implementing Meditator interface and configuring relevant type in application.properties file. (Default gpb.type=grpc)
  • audit-server is performing application load-balancing by using client service discovery through an Eureka server.

About

πŸš€ gRPC microservice example with spring-boot 2 REST application which handles user events πŸ‘₯

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published