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

Adding HTTP sources & sinks #977

Merged
merged 168 commits into from
Aug 24, 2023

Conversation

dagardner-nv
Copy link
Contributor

@dagardner-nv dagardner-nv commented Jun 8, 2023

Description

  • Adds four new stages ([FEA]: Create REST Source/Sink Stages #864):
    1. HttpServerSourceStage - Spins up a rest server to listen for incoming POSTS
    2. HttpClientSourceStage - Source that polls a remote HTTP server for incoming data
    3. HttpClientSinkStage - Sink that POSTS data to a remote HTTP server
    4. HttpServerSinkStage - Sink that statrs a rest server listening for GET requests
  • Fix TensorIndex usage for the stop_after feature of the KafkaSourceStage

fixes #864

Currently HttpServerSourceStage is the only one of the four with a C++ impl. The rest server itself is written in C++ with Python bindings and is used by both C++ & Python stages.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@cwharris
Copy link
Contributor

cwharris commented Aug 23, 2023

I was thinking we could consider the following names.

RestSourceStage       -> HttpHookSourceStage
RestClientSourceStage -> HttpRequestSourceStage
WriteToRestStage      -> HttpRequestSinkStage
RestServerSinkStage   -> HttpHookSinkStage

"Hook" meaning "I'm awaiting a request" and "Request" meaning "I'm performing a request"

I know HttpRequestSinkStage differs from "WriteTo*", but it's very explicit about what it's doing, and creates good uniformity between the different HTTP-related stages.

edit:

After discussing, we landed on

RestSourceStage       -> HttpServerSourceStage
RestClientSourceStage -> HttpClientSourceStage
WriteToRestStage      -> HttpClientSinkStage
RestServerSinkStage   -> HttpServerSinkStage

Copy link
Contributor

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets make an issue to add C++ implementations using the REST client loader

morpheus/stages/input/rest_source_stage.py Outdated Show resolved Hide resolved
morpheus/stages/input/rest_source_stage.py Outdated Show resolved Hide resolved
morpheus/stages/output/rest_server_sink_stage.py Outdated Show resolved Hide resolved
morpheus/stages/output/rest_server_sink_stage.py Outdated Show resolved Hide resolved
tests/test_rest_client_source_stage_pipe.py Outdated Show resolved Hide resolved
@dagardner-nv
Copy link
Contributor Author

Lets make an issue to add C++ implementations using the REST client loader

Done #1150

@dagardner-nv
Copy link
Contributor Author

/merge

@dagardner-nv dagardner-nv changed the title Adding REST sources & sinks Adding HTTP sources & sinks Aug 24, 2023
@dagardner-nv
Copy link
Contributor Author

/merge

1 similar comment
@dagardner-nv
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 913fdfb into nv-morpheus:branch-23.11 Aug 24, 2023
@dagardner-nv dagardner-nv deleted the david-rest-source-sink branch August 24, 2023 17:30
tzemicheal added a commit to tzemicheal/Morpheus that referenced this pull request Aug 25, 2023
* Adds four new stages (nv-morpheus#864):
  1. HttpServerSourceStage - Spins up a rest server to listen for incoming POSTS
  2. HttpClientSourceStage - Source that polls a remote HTTP server for incoming data
  3. HttpClientSinkStage - Sink that POSTS data to a remote HTTP server
  4. HttpServerSinkStage - Sink that statrs a rest server listening for GET requests
* Fix `TensorIndex` usage for the `stop_after` feature of the KafkaSourceStage

fixes nv-morpheus#864

Currently `HttpServerSourceStage` is the only one of the four with a C++ impl. The rest server itself is written in C++ with Python bindings and is used by both C++ & Python stages.

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: nv-morpheus#977
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement to existing functionality non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[FEA]: Create REST Source/Sink Stages
3 participants