Hacker News new | ask | show | jobs
by lanstin 1903 days ago
I find my thinking when I did a lot of C network servers was mostly on the state machine. What msgs are needed to do this task and what state needs to be changed to track the piece of work. In Go I design it as a data flow, what inputs, outputs, what channels and go routine pools, etc. the state can be implicit in the local block of the go routine due to the excellence of the run time. And all the cores for free, no sync except to edit hash maps, so design those to be used not per request but less often.