Promises

Asynchronous network programming with promises and futures

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.

Experience level: 
Beginner
Community Voting: 
0

Log in here to vote

Session Type: 
Standard

Promises in Java: Using Promises to Recover from Failure

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.

Experience level: 
Intermediate
Community Voting: 
0

Log in here to vote

Session Type: 
Standard

Our Other Events

Eclipse events are hosted all over the world!

  • EclipseCon Europe 2019