I just recently found out about these two types of system. It's strange how people (like shown in the article) don't emphasize(know) it when talking about types in languages.
Interestingly, python has included structural subtyping in 3.8[1] as part of the typing module.
> NGINX scales very well to support hundreds of thousands of connections per worker process. Each new connection creates another file descriptor and consumes a small amount of additional memory in the worker process. There is very little additional overhead per connection. NGINX processes can remain pinned to CPUs. Context switches are relatively infrequent and occur when there is no work to be done.
> In the blocking, connection‑per‑process approach, each connection requires a large amount of additional resources and overhead, and context switches (swapping from one process to another) are very frequent.
This is their explanation on events vs threading approach. Still, a lot of web servers today use a thread-per-connection which is acceptable since a database(e.g. postgres) performance degrades slowly as more active connections are introduced.[1]
I also think it's fine to change the code someone wrote. Just because someone wrote it, doesn't mean it's the right way to do it. I often find myself rewriting the code, it's the natural process of code evolution. It just feels that it should be more readable, efficient etc.
Although, if the change is essential or it requires more pair of eyes, I'll just make a PR(MR) and let the people review it.
Reminds of a movie from Andrei Tarkovsky, Stalker. The guy may be the Stalker, leading people to the center of the Zone - the elephant foot in this case.
Interestingly, python has included structural subtyping in 3.8[1] as part of the typing module.
[1] https://www.python.org/dev/peps/pep-0544/