Sender | Message | Time |
---|---|---|
11 Sep 2023 | ||
I don't think it's that bad: I mean, if we'd talk about the sizes of *-packages.nix, then I'd agree (because most editors and LSPs are getting horribly slow then), but this doesn't seem to be the case here. Also, in languages with rather underdeveloped editor integrations I think splitting things off prematurely only makes it harder to find stuff IMHO. I think there's a reasonable boundary though: the current module is responsible for setting up synapse itself (including workers) which is tightly coupled (because e.g. the systemd units are quite similar). If we come up with a good design for setting up load balancing w/ nginx of HTTP locations to workers and/or the main process, then we'd have something that clearly belongs into its own file. Also, if the module becomes too complex eventually, we can also consider moving the options into its own file (right now we wouldn't gain much from it because the majority of the file consists of options).
It used to be a level deeper, but I suggested to remove it (there was an enable option as well, but instead I'm still interested in your additional patches (just declaring that one needs N workers doing X and M workers doing Y seems pretty cool. Not sure if we'll find a reasonable abstraction for the nginx part w/o rfc42 for nginx, but we'll see and I'm happy to discuss this in a github issue first if you're not sure - asynchronous discussion is preferred over chat for that). I think this is a very big step forward now (after supporting synapse for a long time, one can trivially set up workers on NixOS now without knowledge about the inner workings of the synapse module - knowing how to write Nix and (basic) knowledge about synapse configuration is sufficient; it's type-checked, validated & well-documented) and these kinds of ideas are clearly follow-up work, so I'll stick to my plan and merge. | 19:27:53 | |
16 Sep 2023 | ||
TIL: https://github.com/matrix-org/synapse/blob/develop/flake.nix | 17:18:04 | |
created by anoadragon453 | 17:18:38 | |
Yeah. It's kinda a weird setup for dev tbh. But if you modify a couple things it's usable. | 17:31:45 | |
18 Sep 2023 | ||
worker support 👏 | 17:54:49 | |
thanks everyone | 17:55:09 | |
now, who will manage that nasty nginx vhost for me? 🤡 | 17:55:35 | |
I'm sure there are at least three people with config for that :> | 17:59:07 | |
I think Ma27 seemed quite negative about this generally, But personally I think just putting the maps inside But I'll be changing my module to match the nixpkgs implementation and work towards upstreaming the autoconfig stuff | 18:01:57 | |
I think it is much more straightforward than nextcloud 😄 | 18:02:44 | |
and maintaining the map in nixpkgs would require a fair amount of testing and attention when updating the package | 18:03:22 | |
worst case it just falls back to the main process | 18:03:51 | |
it'd be additive in any case really | 18:04:04 | |
Oh yeah, that should work for most cases, except for enable_media_repo = false or send_federation = false | 18:04:43 | |
also stream writers are a bit more complex with the different types they can be configured to handle | 18:05:58 | |
stream writers are problematic yep | 18:06:17 | |
or, at least, slightly annoying | 18:06:31 | |
events can be striped across multiple workers, most other things (typing, to_device, account_data, receipts, presence) cannot | 18:07:06 | |
synapse will fail to boot when you configure a list where it expects a string, ask me how I know | 18:07:55 | |
* synapse will fail to boot when you configure a list of workers where it expects a just a single one, ask me how I know | 18:08:13 | |
that's right, it's also why my module only supports event persisters for now | 18:09:00 | |
In reply to @hexa:lossy.networkoh, you too :D | 18:09:04 | |
currently on the phone, will respond later | 18:09:16 | |
since abstracting the other stream writers required a little more work at the time | 18:09:33 | |
* since abstracting the other stream writers properly required a little more work at the time | 18:09:45 | |
as the worker setup is very brittle, we should probably try to co-maintain most of the thing | 18:12:06 | |
* as the worker setup is very brittle, we should probably try to co-maintain most of the code | 18:12:12 | |
* as the worker setup is very brittle, we should probably try to co-maintain most of the code required for a productive worker setup | 18:12:43 | |
and not let everyone come up with a weird downstream solution | 18:12:50 | |
* and not let everyone come up with an even weirder downstream solution | 18:13:07 |