赞
踩
What does “level-based” and “edge-based” mean in general?
I read “In other words, the system’s behavior is level-based rather than edge-based” from kubernetes documentation: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md
with Google, I only find: http://www.keil.com/forum/9423/edge-based-vs-level-based-interrupt/
Thank you.
It also has a more general definition (at least the way we tend to use it in the documentation). A piece of logic is “level based” if it only depends on the current state. A piece of logic is “edge-based” if it depends on history/transitions in addition to the current state.
“Level based” components are more resilient because if they crash, they can come back up and just look at the current state. “Edge-based” components must store the history they rely on (or depend on some other component that stores it), so that when they come back up they can look at the current state and the history. Also, if there is some kind of temporary network partition and an edge-based component misses some of the updates, then it will compute the wrong output.
However, “level based” components are usually less efficient, because they may need to scan a lot of state in order to compute an output, rather than just reading deltas.
Many components are a mixture of the two.
Simple example: You want to build a component that reports the number of pods in READY state. A level-based implementation would fetch all the pods from etcd (or the API server) and count. An edge-based implementation would do that once at startup, and then just watch for pods entering and exiting READY state.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。