Ping-pong scheme
From Wikipedia, the free encyclopedia
This article is orphaned as few or no other articles link to it. Please help introduce links in articles on related topics. (January 2008) |
A Ping-Pong scheme is a simple algorithm for distributing data packets across two paths.
If you had two paths A
and B
, then the algorithm would randomly start with 1 of the paths and then switch back and forth between the two.
If you were to get the next path from a function call, it would look like this in Python:
get_next_path(): while True: yield 'A' yield 'B'