Skip to content

Zero-Copy buffer pool between java/python and native layer. #37

@ashione

Description

@ashione

We'd better avoid duplicated copy from JNI/Cython to cpp objects.

Current data transporting pipeline:

  • User writes a object in any schema, invoking collect and passing a bytes format data to Data Writer
  • Data Writer copy and move them to transporting, then send bytes data to other process.

image

There are two copy operations.

Actually, we don't need copy them between transfer and data writer, which is why we proposal zero-copy buffer pool.
How buffer pool works:

  • Get a fixed data buffer and wrap them in cython or java ByteBuffer
  • User function can serilize their data to ByteBuffer directly
  • Data Writer only capture data's pointer and transfer them in pointer
  • Release them after upstream consumed and recevied a notification from peer target.

image

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions