Trioxidation / Triox

A free file hosting server that focuses on speed, reliability and security.
GNU Affero General Public License v3.0
102 stars 14 forks source link

Add WASM based Frontent #3

Open AaronErhardt opened 4 years ago

AaronErhardt commented 4 years ago

The backend is already in a good shape with basic functionality, but we still need a frontend for the server! We implemented a basic frontend in JavaScript to have an orientation for the actual frontend. But now we'd like to use something more efficient and also something written in Rust.

Currently the following functionality needs to be added:

Any help on this issue would be much appreciated!

realaravinth commented 3 years ago

Cool project! I've been meaning to work on a cloud drive software but never got around to actually doing it 😂

What are your goals for this project? I see that you are focussing on performance but WASM is (currently)slower for DOM manipulations than vanilla JavaScript.

Also, served-side rendered webpages tend to load faster than something that uses DOM manipulations for first paint. I encourage you to try Miniflux, an online feed reader written in Go that uses vanilla JS and is heavily server-side rendered. It is an absolute pleasure to use and it completely changed the way I want to build web services.

But if you plan on including compute-heavy features like encryption, then WASM makes perfect sense.

AaronErhardt commented 3 years ago

@realaravinth thanks for your feedback on this issue. You are partially right with your statement that WASM-based frameworks are usually slower but that seems to be caused by their design rather than the limitations of WASM. Dom-diffing is very important and if not used to its full potential WASM isn't a bit win. The sauron framework seems to be pretty fast which proofs that WASM can actually be fast, only that most frameworks are too immature or not focusing on performance yet.

I'll have a look at Miniflux. I hope by the time I'll come back to work on the frontend the frameworks for Rust have improved enough to be suitable for this project. In the meantime I'll focus on my exams and try adding WebDAV support first.

Actually, I could imagine that Triox could be less "frontend heavy" but rather implement standardized protocols like WebDAV or Matrix on the backend which then could by used by third party apps. Nevertheless a frontend is still needed for some features and at some point my unsophisticated vanilla JS code will need be replaced.

Thanks again for your suggestion, any help on this project is welcome - and good advice always in demand :)