Skip to content

sdatta25/SourenDatta_Mega-Java-Project_Distributed-Log-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Distributed Log Analytics Engine (Java)

A scalable backend-style Java application that simulates a distributed log analytics system.
It ingests raw log files, processes events, computes metrics, detects anomalies, and persists results.

Built using:

  • Core Java
  • Multi-package architecture
  • File I/O
  • Stream API
  • Thread-safe persistence

This project demonstrates real backend engineering practices such as modular design, analytics pipelines, and alerting systems.


🧠 Features

βœ” Log ingestion from files
βœ” Event parsing into structured objects
βœ” Metrics calculation (INFO / WARN / ERROR counts)
βœ” Anomaly detection with alerting
βœ” Thread-safe result persistence
βœ” Clean package-based architecture


πŸ“‚ Project Structure

distributed-log-engine/ β”‚ β”œβ”€β”€ .vscode/ β”‚ └── settings.json β”‚ β”œβ”€β”€ src/ β”‚ └── com/logengine/ β”‚ β”œβ”€β”€ app/ β†’ Application entry point β”‚ β”œβ”€β”€ analytics/ β†’ Metrics & anomaly detection β”‚ β”œβ”€β”€ alert/ β†’ Alert services β”‚ β”œβ”€β”€ model/ β†’ Data models β”‚ β”œβ”€β”€ parser/ β†’ Log ingestion β”‚ β”œβ”€β”€ processor/ β†’ Processing pipeline β”‚ └── persistence/ β†’ Storage layer β”‚ β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ sample-logs.txt β”‚ └── analytics-results.txt β”‚ └── README.md


▢️ How to Run

1️⃣ Compile the project

From the project root:

rm -rf bin
mkdir bin
javac -d bin $(find src -name "*.java")

2️⃣ Run the application
java -cp bin com.logengine.app.Main

πŸ“ Sample Input (data/sample-logs.txt)
INFO Application started
WARN Memory usage high
ERROR Null pointer exception
ERROR Database timeout
ERROR Disk failure
INFO User logged in

πŸ“Š Example Output
πŸš€ Distributed Log Analytics Engine Starting...
πŸ“Š Metrics Summary:
INFO  : 2
WARN  : 1
ERROR : 3
🚨 ALERT: High error rate detected: 3
βœ… Done. Check data/analytics-results.txt


Results are saved to:

data/analytics-results.txt

🧩 Architecture Overview
πŸ”Ή LogParser

Reads raw log files and returns lines.

πŸ”Ή LogProcessor

Transforms raw strings into structured LogEvent objects.

πŸ”Ή MetricsCalculator

Computes analytics metrics (INFO/WARN/ERROR counts).

πŸ”Ή AnomalyDetector

Detects high error rates and triggers alerts.

πŸ”Ή AlertService

Interface for alerting implementations (console-based for now).

πŸ”Ή ResultStore

Persists metrics and logs using thread-safe file writing.

πŸ§ͺ Technologies Used

Java 17+

Java Streams

File I/O (NIO)

Concurrency (ReentrantLock)

Modular package structure

VS Code Java tooling

πŸš€ Why This Project Matters

This project demonstrates:

Backend data pipelines

Analytics processing

Alerting systems

Clean object-oriented design

Real-world logging workflows

It reflects patterns used in:

Distributed systems

Observability platforms

Log monitoring tools

Enterprise backend services

About

A modular Java backend that processes log files into structured events, computes metrics, detects anomalies, and persists results. Demonstrates core backend concepts including data pipelines, analytics, alerting, and scalable system design.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages