NetworkDesign: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>StephenIerodiaconou
Fixed Polling link
Line 46: Line 46:
The read operation is a blocking type operation so we have two options, either Polling (i.e. continually checking if data is there) or Blocking (i.e. only processing when data is actually available, otherwise sleeping).
The read operation is a blocking type operation so we have two options, either Polling (i.e. continually checking if data is there) or Blocking (i.e. only processing when data is actually available, otherwise sleeping).


(<i>Polling is "the sequential interrogation of devices for various purposes, such as avoiding contention, determining operational status, or determining readiness to send or receive data." - Wikipedia (http://en.wikipedia.org/wiki/Polling)</i>)
(<i>Polling is "the sequential interrogation of devices for various purposes, such as avoiding contention, determining operational status, or determining readiness to send or receive data." - Wikipedia ( http://en.wikipedia.org/wiki/Polling )</i>)


We choose Blocking because we don't want to waste CPU time Polling the network for messages, we just want to sleep until messages are available. Hence we create a Thread to read from the Network, let's call it Network Manager Read.
We choose Blocking because we don't want to waste CPU time Polling the network for messages, we just want to sleep until messages are available. Hence we create a Thread to read from the Network, let's call it Network Manager Read.