Project

General

Profile

Actions

Feature #3216

open

Copy-on-write buffer abstraction and refactor Block

Added by Alex Afanasyev over 8 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Base
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Previously, we had an assumption that every element in the wire format is a TLV or is some other value.
With this assumption, we have created a Block abstraction that implements a copy-on-write buffer with TLV semantics.
However, we don't have implementation of copy-on-write buffer, which created issues when implementing NDNLP.

This a long-term task.
As part of this task we should:

  • create copy-on-write buffer abstraction
  • refactor Block implementation to use the new abstraction
  • if needed, update other parts of encoding

Related issues 2 (2 open0 closed)

Related to ndn-cxx - Feature #2999: Block scatter/gather supportNew

Actions
Blocks ndn-cxx - Feature #3217: Avoid memory copy when creating lp::Packet from FragmentNew

Actions
Actions #1

Updated by Alex Afanasyev over 8 years ago

  • Blocks Feature #3217: Avoid memory copy when creating lp::Packet from Fragment added
Actions #2

Updated by Junxiao Shi over 8 years ago

  • Tracker changed from Task to Feature
  • Subject changed from Implement a copy-on-write buffer abstraction and refactor Block to copy-on-write buffer abstraction and refactor Block
  • Description updated (diff)

What problem has NDNLP implementation encountered without a copy-on-write buffer?

How does a copy-on-write buffer help NDNLP implementation?

Actions #3

Updated by Alex Afanasyev over 8 years ago

During interest/data sending paths:

  1. construct packet wire (Block)
  2. ndnlp::Packet::add<Fragment> copies packet wire bytes into NDNLP/Fragment Block
  3. ndnlp::Packet::wireEncode() copies the whole thing again

With eliminated copy:

  1. construct packet wire (Block/Buffer)
  2. ndnlp::Packet::add<Fragment> assign (part of) packet wire as value of NDNLP/Fragment Block's value
  3. ndnlp::Packet::wireEncode() creates complete wire for the packet

The thirds step is part of a different future optimization.

Actions #4

Updated by Davide Pesavento over 6 years ago

  • Subject changed from copy-on-write buffer abstraction and refactor Block to Copy-on-write buffer abstraction and refactor Block
  • Target version deleted (v0.5)
Actions #5

Updated by Davide Pesavento about 5 years ago

Actions

Also available in: Atom PDF