Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero-copy Arrow data extraction: we should not be copying / converting the arrow data #27

Open
NHDaly opened this issue Aug 9, 2022 · 4 comments

Comments

@NHDaly
Copy link
Member

NHDaly commented Aug 9, 2022

The goal of the Arrow format is to support zero-copy data transfer over the protocol, so the client SDKs should take care not to copy the data once it's been read from the wire.

However, we don't currently understand how to do this with the Go SDK's API - it's not clear how best to retain the data, nor how best to pass it to users.

@bradlo
Copy link
Collaborator

bradlo commented Oct 17, 2022

with the updated interface, there is now a single copy, due to the fact that the multipart iterator discards the buffer when moving to the next part. i plan to look further into how to improve this, it should be possible to operate on this data with a single copy directly into userland memory.

@NHDaly
Copy link
Member Author

NHDaly commented Oct 18, 2022

Note that you won't be able to do it zero-copy yet anyway, since we still haven't implemented the changes in rai-server itself to write each of the parts word-aligned! 😿

So i think 1-copy is the best we'll be able to do in any of the SDKs right now. 💪 great work getting there in the go sdk! :) Thanks Brad!

@NHDaly
Copy link
Member Author

NHDaly commented Oct 18, 2022

Here's the github issue in raicode for this:
https://github.com/RelationalAI/raicloud-control-plane/issues/2290#issuecomment-1074211947

When/if we moved over to a different transport layer, like Arrow Flight, i think this would be done for us.

@billscheidel-rai
Copy link

Note: This issue has been migrated to https://relationalai.atlassian.net/browse/RAI-6340.

This link is only accessible to employees of RelationalAI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants