The Archetypal Go Program: Servers, Goroutines, and Scheduling
This post gives an answer to the question: why Go is optimized for concurrent I/O-intensive systems such as network services. A programming language is not only syntax, but also a runtime implement...

Source: DEV Community
This post gives an answer to the question: why Go is optimized for concurrent I/O-intensive systems such as network services. A programming language is not only syntax, but also a runtime implementation. Runtime is the part of the executing program where data structures and algorithms that support syntactic constructs of the language are implemented. Namely, the implementation of dictionaries (maps), sets, asynchrony, parallelism, and concurrency (which are not the same thing). Golang is unique, and for the 2010s revolutionary, in its implementation of the Syntax + Runtime combination for an ARCHETYPICAL program design. An archetypical Go program is a server running in a single OS process on multiple OS threads, which handles a flood of HTTP requests while maximizing the utilization of OS threads. As is known, the execution of a program’s algorithm can be blocked algorithmically (something is waiting for a response), or physically when an OS thread waits for I/O. In Go, both types of b