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 #1

Updated by Anonymous almost 9 years ago

  • Blocks Feature #2565: Implement async operations for Face.processEvents added
Actions #2

Updated by Anonymous almost 9 years ago

  • Description updated (diff)
Actions #3

Updated by Anonymous almost 9 years ago

  • Status changed from New to In Progress

See the the following commit. In expressInterest, save interests in onConnectedCallbacks_ while connecting and send them in the onConnected callback from the Transport.
https://github.com/named-data/jndn/commit/79686b8daafe73ff9fe441402423b70ca9f8e020

Actions #4

Updated by Anonymous about 8 years ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF