• 0 Posts
  • 4 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle
  • To be honest, I never heard of it, and it is interesting, but the language isn’t the only factor, it’s the ecosystem as well. It says it’s an alternative to C, so I will just assume it can consume C libraries. But that still leaves you with using C libraries, which is not a great position to be in if you are looking to not use C.

    If you are looking for something that is actually in use, but not rust, look into Zig. Still would need to use a lot of C libraries, but it at least looks like it has momentum. Not to mention they seek to completely replace libc, which would actually be useful and an achievement, since that is the biggest problem C actually has.

    I am a rust fan myself, but if you are new to programming it’s not a great place to start due to its’ learning cliff.



  • Of the things people complain about that systemd brings in, this is among the least offensive. It makes sense for an init system to provide such functionality, the function of spawning new system processes.

    Additionally, in modern systems it doesn’t make sense to use such features. Spawning a new process per request or on demand doesn’t gain you much and does reduce performance.

    Spawning new processes on most OS is pretty slow compared to other operations. Additionally, there would also be an increase in latency as the new process needs to be loaded, whereas most software these days can handle the new request in more efficient ways.

    I think you can also try to reuse the same process for multiple requests, stopping it only once it has been quiet for a while. But this still doesn’t really help much.

    Historically, i think it was used to try to save memory. But today its a bigger nusance than it is worth. I just checked how much memory sshd is using, and i think it is less than 10mb.

    total kB 8508 6432 1160

    And to be clear, you theoretically can’t save much if any memory doing this because you must have enough memory available to be able to run the process, otherwise bad things will happen or some other process gets oomed.

    Additionally, spawning a new process per request can represent an availability violation. An attacker could launch a series of very slow connections to a server spawning a new process per request, causing a depletion of resources.

    With all that said, I wouldn’t say there are no uses at all for this, it can be useful to make very minimal network connected software that does some very basic stuff in a secure network.