Project

General

Profile

Actions

Task #2860

closed

expressInterest should queue interests while async I/O is connecting

Added by Anonymous almost 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
06/08/2015
Due date:
% Done:

0%

Estimated time:

Description

If an application calls expressInterest several times, the library needs to connect on the first call. With blocking I/O the connection is complete before sending the first interest. But with async I/O, the connection happens on another thread while expressInterest is called several more times, and these cannot yet send the interest. Also, the interest timeout should measure from the time that the interest is sent, not from when expressInterest is called.

Therefore, expressInterest should internally queue the interests while async I/O is connecting. (The library should also queue calls to removePendingInterest.) When the library receives the async I/O onConnected callback, then it can put the interests in the PIT (if the application did not cancel with removePendingInterest), start the timeout timers and send the interests.

We already do this in NDN-JS (which always had async I/O). But I opened this issue so we could discuss the approach before implementing in Java, etc. Shall I proceed to implement this approach? Here is the NDN-JS onConnected callback:
https://github.com/named-data/ndn-js/blob/c0ebbe5954c0ae7dbee80dcf20d9c58a0b8145b5/js/face.js#L634


Related issues 1 (0 open1 closed)

Blocks jndn - Feature #2565: Implement async operations for Face.processEventsClosed

Actions
Actions

Also available in: Atom PDF