Giter VIP home page Giter VIP logo

raga70 / openvidstreamer Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 7.28 MB

OpenVidStreamer is a video sharing platform operating with its own unique economy, offering a monthly subscription model for users to access content. To incentivize content creation, the platform rewards users who upload videos by monetarily compensating them based on the watch time their uploads accumulate from other viewers.

C# 67.15% Dockerfile 4.35% Shell 0.54% JavaScript 2.30% TypeScript 24.11% HTML 0.16% CSS 1.40%

openvidstreamer's Introduction

OpenVidStreamer

OpenVidStreamer is a video-sharing platform operating with its own unique economy, offering a monthly subscription model for users to access content. To incentivize content creation, the platform rewards users who upload videos by monetarily compensating them based on the watch time their uploads accumulate from other viewers. This system encourages active participation and content generation, enhancing the platform's value and diversity. The platform features a recommendation algorithm that identifies videos a user likes and finds other users with similar tastes. It calculates a popularity score for each video based on likes, dislikes, and watch time. The algorithm also determines the user's top five preferred video categories. It combines these factors to rank videos, and the top-rated videos are then recommended to the user.

Features:

  1. Subscription Services:
    • Users can activate or renew subscriptions through a payment portal.
    • The system handles subscription payments and provides confirmation of successful transactions.
    • An active subscription is required to consume content.
  2. Content Upload and Management:
    • Any user can upload videos.
    • The platform supports entering metadata.
  3. Video Recommendations:
    • Personalized video recommendations are generated based on users' watch history, liked videos, and preferred genres.
    • The recommendation algorithm considers user interactions to refine future suggestions.
  4. Video Playback:
    • Interactions during playback, such as liking or disliking a video, are recorded and affect recommendations.
  5. Technical Architecture and Performance:
    • The platform uses a microservices architecture, ensuring scalability and efficient management of services.
    • .NET, Kubernetes, and React are used.
    • API Gateway and microservice management tools like Ocelot and Consul are used for routing and service discovery.
  6. High Availability and Load Handling:
    • Designed to handle significant loads, such as 10,000 video chunks per second for streaming.
    • Video uploads, logins, and other account activities are optimized for high concurrent user access.

Demo of the platform: DemoVideoOfTheUI


Architecture:

C2: C2WithBackgroud

Getting Started

Installation

Download the latest OVF template from the releases section of this repository to deploy on your preferred cloud provider or deploy our Kubernetes files (mandatory for large-scale deployments), (frontend not built in the Kubernetes files, just preform a vite build and deploy it, ex. via nginx ). OVF image: OpenVidStreamerExampleVMrelese Kubernetes files: OpenVidStreamerKubernetesFiles

Designed for Kubernetes environments, the microservices' container images are available at our Docker Hub repository.

Prerequisites

  • Kubernetes engine (e.g., MicroK8s)
  • Modify account-deployment.yaml as per the following (location in OVF ~/OpenVidStreamerKubernetesFiles/account-deployment.yaml):
    • StripeSecretKey: Obtain from Stripe API keys
    • StripeRedirectUrl: Update with your domain and port
    • JwtSecret: Generate a secure base64 string (Generate Plus)
    • JwtExpiration: Set the session duration in hours image

port forwarding

Adjust port forwarding settings as necessary to ensure proper routing of service traffic. portForwards


Databases (skip for OVF)

SQL files for empty databases: https://gist.github.com/raga70/175fe4ae885c2d644cd4f96616697659

need to scale up?

I will recommend using a managed database simply do not use Kubernetes files for the databases, and modify the other ones to point to your managed database provider


Storage bucket (skip for OVF)

the Kubernetes deployment relies on an NFS server on the host machine, to store video files (do not spin it up in a pod you will have permissions problems!!!)

  1. install an nfs server
  2. modify the nfs Kubernetes files if necessary

need to scale up?

I will recommend to switch to a cloud storage bucket (AWS S3, Azure Blob)


OVF built-in perks

the only thing you need to do to get it running is port forward, and input your data (steps 1 and 2) the VM comes with the Observability stack so you can monitor your resource usage example https://youtu.be/9J7ks5oLtI8 , you can also monitor the service discovery through Consul

if you encounter any problems: SSH into your VM -> and delete all pods in the default namespace: microk8s kubectl delete pods --all


notice: the VM has only 50GB assigned for video storage, so you might hit the limit pretty quickly, you can add an extra virtual hard drive and mount it to /

notice: the OVF template is just a starting example, it is of course recommended to host directly on AKS/GKS, use a managed database, and a storage bucket from your cloud platform. furthermore, if you are really getting a lot of traffic use your cloud provider`s API gateway (you will need to re-engineer auth), Ocelot (the project`s API gateway) is the slowest link in the system


Development

to run the microservices on bear metal you will need: Consul Service Discovery, Docker container with Redis, RabbitMQ, Mysql <- create Databases and run dotnet ef database update (refer to C2)

openvidstreamer's People

Contributors

raga70 avatar

Stargazers

 avatar

Watchers

 avatar

openvidstreamer's Issues

ZAP Scan Baseline Report

View the following link to download the report.
RunnerID:9453934800


ZAP is supported by the Crash Override Open Source Fellowship

ZAP Scan Baseline Report

View the following link to download the report.
RunnerID:9453915398


ZAP is supported by the Crash Override Open Source Fellowship

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.