ok lol my synapse-media-proxy project in progress is apparently the new code thing I brainstorm about in bed and under the shower
Remote media download just works (tm) too, very easy to get the remote homeserver base url properly with https://www.npmjs.com/package/@modular-matrix/autodiscover-client-configuration
and initial commit published!
https://git.pixie.town/f0x/synapse-media-proxy
:O I think I implemented the whole https://spec.matrix.org/unstable/server-server-api/#server-discovery Matrix server discovery flow!!! It's rather complex, with .well-knowns and SRV records and combinations of those.
Also nice that I could fork of the client-spec counterpart already made by someone else :) https://www.npmjs.com/package/@modular-matrix/autodiscover-client-configuration
@f0x what does it do?
@haskal so the pixie.town matrix server is hosted at my home, which is nice and all, but for media both uploading and downloading has to go through my rather limited VDSL bandwidth. Currently I have caching on the vps nginx proxy which helps a bit but only after a request has finished, so when a media link gets accessed the first few times they still all pull from my home simultaneously.
My media proxy will run on the vps and get all media requests proxied to it instead of Synapse, allowing it to handle both upload and download in an in-memory cache + filesystem cache on the fast network machine, while still forwarding requests to Synapse as well so the media proxy could be removed and redirected back to Synapse and still have all the media
@haskal tl;dr it make cat pic go fast
@f0x Your database doesn’t want to hurt you. It’ll only bite if it thinks you’re threatening it or its cluster
@vy good to know :3
@f0x hell yeah f0x that's really cool!
wonder if this structure will work nicely, a local component that runs on the Synapse machine with filesystem and database access, and a remote component that caches files and handles user requests