-
Notifications
You must be signed in to change notification settings - Fork 641
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
KREST-10286 Example python code for produce streaming V3 API #1163
KREST-10286 Example python code for produce streaming V3 API #1163
Conversation
This will use the HTTP connection in a fully duplex mode.
examples/produce_v3/python/http_parser_chunked/http_response.py
Outdated
Show resolved
Hide resolved
@msn-tldr what is the motivation of copying the code from http_parser? Why can't we use the library directly? Could you also share the original problem (with example code) that we encounter that requires us to go to low level handling of socket? |
@trnguyencflt Thanks for suggesting |
examples/produce_v3/python/README.md
Outdated
Now run the main driver script: | ||
`python3 streaming_produce_v3_main.py` | ||
|
||
**This scipt will work with python-version >= 3.0** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo scipt -> script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a minor comment on typo
The CI job failure is due to missing downstream dep, which is
|
This will use the HTTP connection in a fully duplex mode.
Following is the output of
streaming_produce_v3_main.py
, writing 5 records. It demonstrates the connection is being used in full-duplex mode, i.e. record-receipt is read for 1st record even before then 2nd record is written to the connection.Vs the this example(&output) demonstrate that idiomatic http request-response is half-duplex, i.e all records must be written to the wire, and then only record-receipts can be read for all records.
#1164 (comment)