The stability and the predictability of a computer network algorithm's performance are as important as themain functional purpose of networking software. However, asserting or deriving such properties from thefinite state machine implementations of protocols is hard and, except for singular cases like TCP, is notdone today. In this paper, we propose to design and study run-time environments for networking protocolswhich inherently enforce desirable, predictable global dynamics. To this end we merge two complementarydesign approaches: (i) A design-time and bottom up approach that enables us to engineer algorithms basedon an analyzable (reaction) flow model. (ii) A run-time and top-down approach based on an autonomousstack composition framework, which switches among implementation alternatives to find optimal operationconfigurations. We demonstrate the feasibility of our self-optimizing system in both simulations and real-world Internet setups