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

Async IStreamable support #161

Closed
2 tasks
ganeshnj opened this issue Feb 14, 2023 · 3 comments
Closed
2 tasks

Async IStreamable support #161

ganeshnj opened this issue Feb 14, 2023 · 3 comments
Labels
feature-request A feature should be added or improved. needs-discussion This issue/PR requires more discussion with community.

Comments

@ganeshnj
Copy link
Contributor

ganeshnj commented Feb 14, 2023

Describe the feature

IStreamable protocol currently seeks and writes synchronously which works for pure request/response but same model can't be applied to event streaming where events come asynchronously.

Use Case

Event Streams.

Proposed Solution

Adapt IStreamble to async conventions

public protocol IStreamable {
    func length() throws -> UInt64
    func seek(offset: Int64, streamSeekType: StreamSeekType) throws
    func read(buffer: UnsafeMutableBufferPointer<UInt8>) async throws -> Int?
}

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@ganeshnj ganeshnj added needs-triage This issue or PR still needs to be triaged. feature-request A feature should be added or improved. needs-investigation This issue needs investigation. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 14, 2023
@ganeshnj
Copy link
Contributor Author

We don't need this at this point as we have H2 async API.

We need to have a doc with more concrete use cases.

@ganeshnj ganeshnj added needs-discussion This issue/PR requires more discussion with community. and removed needs-investigation This issue needs investigation. labels Feb 20, 2023
@waahm7
Copy link
Contributor

waahm7 commented Jan 23, 2024

Closing for now. We can revisit this when we have a more concrete use case.

@waahm7 waahm7 closed this as completed Jan 23, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-discussion This issue/PR requires more discussion with community.
Projects
None yet
Development

No branches or pull requests

2 participants