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

Implement Python runtime crate and shared socket #1399

Merged
merged 38 commits into from
May 20, 2022
Merged

Conversation

crisidev
Copy link
Contributor

@crisidev crisidev commented May 18, 2022

Motivation and Context

Continue on #1367

Description

  • Add the Python runtime crate.
  • Implement SharedSocket support.
  • Implement logging to tracing support.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@crisidev crisidev requested a review from a team as a code owner May 18, 2022 14:38
@crisidev crisidev added enhancement New feature or request server Rust server SDK labels May 18, 2022
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec 4.95% 39647.24 37777.96
Total requests 4.97% 3569791 3400702
Total errors NaN% 0 0
Total successes 4.97% 3569791 3400702
Average latency ms -3.49% 0.83 0.86
Minimum latency ms 50.00% 0.03 0.02
Maximum latency ms -13.47% 16.77 19.38
Stdev latency ms 12.00% 0.56 0.5
Transfer Mb 4.97% 371.08 353.5
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec 1.94% 84491.06 82885.18
Total requests 1.85% 7606034 7467652
Total errors NaN% 0 0
Total successes 1.85% 7606034 7467652
Average latency ms 4.07% 1.28 1.23
Minimum latency ms 0.00% 0.02 0.02
Maximum latency ms 16.80% 28.02 23.99
Stdev latency ms 2.74% 2.25 2.19
Transfer Mb 1.85% 790.65 776.27
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

Comment on lines 1 to 4
edition = "2021"
max_width = 120
# Prevent carriage returns
newline_style = "Unix"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm kind of surprised we haven't had any issues with the aws-smithy-server crate failing lints where rustfmt formatted it properly according to this config (see https://github.com/awslabs/smithy-rs/blob/a0539e20b069a7de021c84521d8f3c7ba098ad6d/tools/ci-build/scripts/check-style-and-lints#L14-L13) since the default max_width is 100. Or maybe we have and I just haven't noticed.

I'm completely onboard with making these settings apply to all of our Rust crates if you want. We should probably be consistent about it though to keep CI simpler.

No need to block on this--just be aware that CI may give you some grief while it remains inconsistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am happy to remove this and make it consistent. I am a fan of 120 chars, but I am ok also with 100 :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm also a fan of 120, so either way

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec -8.25% 35159.31 38319.58
Total requests -8.18% 3166884 3448918
Total errors NaN% 0 0
Total successes -8.18% 3166884 3448918
Average latency ms 5.49% 0.96 0.91
Minimum latency ms 50.00% 0.03 0.02
Maximum latency ms 11.70% 22.72 20.34
Stdev latency ms -7.50% 0.74 0.8
Transfer Mb -8.18% 329.2 358.52
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec 10.25% 80181.3 72727.5
Total requests 10.28% 7223834 6550718
Total errors NaN% 0 0
Total successes 10.28% 7223834 6550718
Average latency ms 75.00% 0.98 0.56
Minimum latency ms 0.00% 0.02 0.02
Maximum latency ms 36.52% 23.14 16.95
Stdev latency ms 118.18% 1.68 0.77
Transfer Mb 10.28% 750.92 680.95
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec -15.90% 64777.25 77027.07
Total requests -15.87% 5836156 6937086
Total errors NaN% 0 0
Total successes -15.87% 5836156 6937086
Average latency ms -7.78% 0.83 0.9
Minimum latency ms 0.00% 0.02 0.02
Maximum latency ms 14.96% 23.98 20.86
Stdev latency ms -16.45% 1.27 1.52
Transfer Mb -15.87% 606.67 721.11
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

@crisidev crisidev requested a review from a team as a code owner May 19, 2022 16:43
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec -5.71% 43590.34 46228.9
Total requests -5.64% 3926773 4161552
Total errors NaN% 0 0
Total successes -5.64% 3926773 4161552
Average latency ms -4.90% 0.97 1.02
Minimum latency ms 0.00% 0.02 0.02
Maximum latency ms 4.49% 21.43 20.51
Stdev latency ms -12.21% 1.15 1.31
Transfer Mb -5.64% 408.19 432.6
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec -0.22% 84461.03 84649.15
Total requests -0.20% 7606203 7621255
Total errors NaN% 0 0
Total successes -0.20% 7606203 7621255
Average latency ms 0.00% 1.28 1.28
Minimum latency ms 0.00% 0.02 0.02
Maximum latency ms 2.23% 25.71 25.15
Stdev latency ms 0.00% 2.25 2.25
Transfer Mb -0.20% 790.67 792.23
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

Server libraries for smithy-rs generated servers, targeting pure Python business logic.

<!-- anchor_start:footer -->
This crate is part of the [AWS SDK for Rust](https://awslabs.github.io/aws-sdk-rust/) and the [smithy-rs](https://github.com/awslabs/smithy-rs) code generator. In most cases, it should not be used directly.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not part of the AWS Rust SDK. We have the same phrase in aws-smithy-http-server.

rust-runtime/aws-smithy-http-server-python/src/lib.rs Outdated Show resolved Hide resolved
@@ -3,3 +3,4 @@ velfi
jdisanti
crisidev
david-perez
82marbag
Copy link
Contributor

Choose a reason for hiding this comment

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

This should go in a separate PR.

@crisidev crisidev enabled auto-merge (squash) May 20, 2022 15:24
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec 2.27% 58965.93 57659.89
Total requests 2.27% 5309140 5191508
Total errors NaN% 0 0
Total successes 2.27% 5309140 5191508
Average latency ms 6.10% 0.87 0.82
Minimum latency ms 0.00% 0.02 0.02
Maximum latency ms -12.32% 20.56 23.45
Stdev latency ms 15.32% 1.28 1.11
Transfer Mb 2.27% 551.89 539.66
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec -1.86% 77174.97 78641.23
Total requests -1.81% 6952974 7081302
Total errors NaN% 0 0
Total successes -1.81% 6952974 7081302
Average latency ms -5.94% 0.95 1.01
Minimum latency ms 0.00% 0.02 0.02
Maximum latency ms -0.19% 21.25 21.29
Stdev latency ms -8.77% 1.56 1.71
Transfer Mb -1.81% 722.77 736.1
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

@crisidev crisidev merged commit ebabb98 into main May 20, 2022
@crisidev crisidev deleted the oxipy-shared-socket branch May 20, 2022 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server Rust server SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants