Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 2.57 KB

README.md

File metadata and controls

49 lines (35 loc) · 2.57 KB

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.