documentation/content/docs/architecture/index.md

44 lines
1.4 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)
2023-08-04 19:22:02 +00:00
- [A backend in Java](https://github.com/TeamPiped/Piped-Backend) which uses [NewPipeExtractor](https://github.com/TeamNewPipe/NewPipeExtractor)
- [A proxy in Rust](https://github.com/FireMasterK/piped-proxy)
2021-02-06 15:59:00 +00:00
## Frontend
2021-02-07 15:38:23 +00:00
2023-08-04 19:22:02 +00:00
- Uses shaka-player for streaming.
2021-02-07 15:38:23 +00:00
- 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
2023-08-04 19:22:02 +00:00
- Uses Java 17
- Uses a JNI wrapper around [Reqwest](https://github.com/seanmonstar/reqwest), a Rust HTTP client.
- Uses ActiveJ to achieve maximum performance. Which is [really fast](https://web-frameworks-benchmark.netlify.app/result)
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
2023-08-04 19:22:02 +00:00
- Uses Rust.
- Has HTTP/2 support.
- Uses [actix-web](https://github.com/actix/actix-web) and [reqwest](https://github.com/seanmonstar/reqwest) for maximum performance.
2021-02-07 15:38:23 +00:00
- Low memory footprint and high throughput.
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
2023-08-04 19:22:02 +00:00
LBRY streams are automatically used to stream content via LBRY if the same video is available there.