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

New crate: apply a user-supplied function to a Stream of buffers #26

Closed
1 task done
JackKelly opened this issue Jan 20, 2024 · 3 comments
Closed
1 task done

New crate: apply a user-supplied function to a Stream of buffers #26

JackKelly opened this issue Jan 20, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@JackKelly
Copy link
Owner

JackKelly commented Jan 20, 2024

Each item will be a

struct<T> Item {
    buffer: &[u8], 
    user_data: T, 
} 

User data is required to allow users to identify the buffers after they've been compressed because the order might change

Update: Framed might already do this: https://docs.rs/async-codec/latest/async_codec/

Related

todo

@JackKelly
Copy link
Owner Author

JackKelly commented Jan 20, 2024

But remember that, per chunk, we want all processing to happen in one go, so that the data for that chunk is still in cpu cache.

Instead of a compression crate, Maybe make a "datastream" crate. The user provides a processing function (which might include compression). And the crate runs that function in a rayon thread pool. The crate could still provide hooks for common compression libs. Or maybe that should be another crate

JackKelly added a commit that referenced this issue Jan 23, 2024
@JackKelly JackKelly changed the title Create a crate which (de)compresses a stream of buffers Create a crate which applies a user-supplied function to a Stream of buffers Jan 30, 2024
@JackKelly JackKelly added the enhancement New feature or request label Jan 30, 2024
@JackKelly
Copy link
Owner Author

JackKelly commented Feb 29, 2024

And maybe make a wrapper which can pull object_store data into a Stream, so folks can use this parallel-processing crate with object_store.

UPDATE: See #107

@JackKelly JackKelly changed the title Create a crate which applies a user-supplied function to a Stream of buffers New crate: apply a user-supplied function to a Stream of buffers Mar 15, 2024
@JackKelly
Copy link
Owner Author

This issue is superseded by #106

@JackKelly JackKelly closed this as not planned Won't fix, can't repro, duplicate, stale Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant