documentation/content/docs/architecture/index.md

44 lines
1.2 KiB
Markdown
Raw Normal View History

2021-02-06 15:59:00 +00:00
---
2021-02-07 15:38:23 +00:00
title: "Architecture"
2021-02-06 15:59:00 +00:00
weight: 4
2021-02-07 15:38:23 +00:00
summary: How is Piped architectured?
2021-02-06 15:59:00 +00:00
---
2021-02-07 15:38:23 +00:00
## How is Piped's architecture?
2021-02-06 15:59:00 +00:00
Piped has 3 components:
- [A frontend in VueJS](https://github.com/TeamPiped/Piped)
- [A backend in Java which uses NewPipeExtractor](https://github.com/TeamPiped/Piped-Backend)
- [A proxy in Golang](https://github.com/FireMasterK/http3-ytproxy)
2021-02-06 15:59:00 +00:00
## Frontend
2021-02-07 15:38:23 +00:00
- Uses videojs
- Uses a router for a single page application.
2021-02-06 15:59:00 +00:00
## Backend
2021-02-07 15:38:23 +00:00
- Uses Java 11
- Uses the native HTTP client introduced in Java 9
2021-02-10 19:34:53 +00:00
- Uses netty-reactor to achieve maximum performance and a low footprint.
2021-02-07 15:38:23 +00:00
- Supports OpenJ9
- Each running instance should configure their own proxy, thus allowing multi-gigabit content delivery.
- Uses ~70-130 MB of ram. (on OpenJ9)
2021-02-06 15:59:00 +00:00
# Proxy
2021-02-07 15:38:23 +00:00
- Uses Golang
- Has HTTP/2 support. (HTTP/3 is unstable in the current library)
- Low memory footprint and high throughput.
- Can be used to replace the proxy in various other frontends.
2021-02-06 15:59:00 +00:00
# Server-Side Caching
Caching is done at a Reverse-Proxy/CDN level to reduce the load to the backend. This also makes it more scalable.
# LBRY
2021-02-07 15:38:23 +00:00
LBRY streams are automatically added to stream content via LBRY if the same video is available there.