Programs involving communication over a network are the best examples of asynchronicity. Once a request is sent over a network, waiting for the response by blocking is bad design. Instead, programs must be able to execute other code fragments during this wait period. This design is particularly essential in web-servers. How can we achieve this? Non-blocking IO is the answer.
Communications is error prone. Connections time out, servers fail to respond, returned data can be incomplete or corrupted. Bnd, the OSGi tooling project, has an HttpClient class which is used for communications including with remote repositories like Maven/Nexus and P2 repositories. The Bnd CI builds started having significant failures due to communications problems with the Eclipse download servers, so with some light code restructuring, I was able to add retry support to HttpClient using the Promises package from OSGi.