Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

github.com/SurajKadam7/leaderboard_microservice

Package Overview
Dependencies
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/SurajKadam7/leaderboard_microservice

Source
Go Modules
Version
v0.0.0-20231211193520-bc9e29271ba8
Version published
Created
Source

Lifetime and Daily Leaderboard for streaming application

Overview

This repository contains a backend service built in Go for video streaming leaderboard. It implements a leaderboard functionality to track both daily and lifetime views of videos. The architecture follows the Onion pattern and draws inspiration from Go-Kit for its design.

Features

  • Daily and Lifetime Views: Tracks views of videos on a daily and overall (lifetime) basis.
  • Scalable & Distributed: Utilizes Redis for caching and Consul for service discovery, making it scalable and easy to manage.
  • Onion Architecture: Organized in layers for modularity and ease of maintenance.

Tech Stack

  • Go (Golang): Main programming language used for development.
  • Redis: Used for caching video views and leaderboard scores.
  • Docker: Enables containerization for easy deployment and portability.
  • Consul: Configuration loading for distributed architecture

Architecture

The project is structured based on the Onion architecture, promoting clean and maintainable code. It's divided into layers:

  • Core: Contains the business logic and domain models.
  • Repositories: Handles data access and interactions with Redis.
  • Services: Implements service-level logic.
  • Transport: Manages HTTP endpoints.

Setup

  • Clone the Repository:
git clone https://github.com/SurajKadam7/leaderboard_microservice.git
  • Build & Run Using Docker:
docker compose up -d

Consul Configurations

{
      "key":"",
      "port":":",
      "address" : "",
      "poolSize":0,
      "username":"",
      "password": ""
}

FAQs

Package last updated on 11 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts