Giter Site home page Giter Site logo

dyte-sde1-assignment's Introduction

Log Searcher 10k

Dyte SDE Assessment Project

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact

About The Project

Log Searcher 10K

Log Ingester and Query Tool built using Django for Dyte SDE Assessment.

(back to top)

Built With

  • Python
  • Django
  • PostgreSQL
  • SQLite3
  • Docker

(back to top)

Getting Started

The project can be run using a local SQLite database, or using Docker. Both methods are described below.

Prerequisites

  • Python 3.10 or higher
  • Docker (optional)

Installation

Without Docker

  1. Clone the repo

    git clone https://github.com/dyte-submissions/november-2023-hiring-Enhancifire.git
  2. Create virtual environment

    python -m venv .env
  3. Activate the environment

    source .env/bin/activate.fish # for fish shell
  4. Install requirements

     pip install -r requirements.txt
  5. Run migrations

     python manage.py migrate
  6. Run the server

     python manage.py runserver 3000

With Docker

  1. Clone the repo

    git clone https://github.com/dyte-submissions/november-2023-hiring-Enhancifire.git
  2. Switch branch to docker

    git checkout docker
  3. Start DB and build docker image

    docker compose up db -d
  4. Build and Start the server

    docker compose up server --build
  5. Run migrations

    docker compose exec server python manage.py migrate
  6. Access the server at localhost:3000

(back to top)

Usage

Access the server at localhost:3000

Endpoints:

  • '/': Home page Query interface is accessible here

  • '/logs/': Ingest point for logs POST request to add individual logs to the database

  • '/logsearch/': Search endpoint for logs Query interface accesses this endpoint to search for logs

(back to top)

System Design

DB Diagram

(back to top)

Features Implemented

Ingestor:

  • Develop a mechanism to ingest logs in the provided format.
  • Ensure scalability to handle high volumes of logs efficiently.
  • Mitigate potential bottlenecks such as I/O operations, database write speeds, etc.
  • Make sure that the logs are ingested via an HTTP server, which runs on port 3000 by default.

Query Interface:

  • Offer a user interface (Web UI or CLI) for full-text search across logs.
  • Include filters based on:
    • level
    • message
    • resourceId
    • timestamp
    • traceId
    • spanId
    • commit
    • metadata.parentResourceId
  • Aim for efficient and quick search results.

Advanced Features:

  • Allow combining multiple filters.
  • Provide real-time log ingestion and searching capabilities.
  • Distributed systems or cloud-based solutions can ensure robust scalability.
  • Implement role-based access to the query interface.
  • Implement search within specific date ranges.
  • Utilize regular expressions for search.

Identified Issues

  • Manual migration for Postgres required in docker usecase.
  • Possible bottleneck of single threaded django instance.
  • Static metadata field parameter. Adding additional data to metadata requires conversion from foreign key to BSON.

Contact

Faiz Saiyad - +91 8177941560 - [email protected]

Project Link: https://github.com/dyte-submissions/november-2023-hiring-Enhancifire

(back to top)

dyte-sde1-assignment's People

Contributors

enhancifire avatar github-classroom[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.