rustorb 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rustorb-0.1.0 → rustorb-0.1.1}/Cargo.lock +8 -8
- {rustorb-0.1.0 → rustorb-0.1.1}/Cargo.toml +5 -5
- {rustorb-0.1.0 → rustorb-0.1.1}/PKG-INFO +1 -1
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/orb.rs +24 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/server.rs +22 -19
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/server.rs +12 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/stress.rs +17 -2
- {rustorb-0.1.0 → rustorb-0.1.1}/pyproject.toml +1 -1
- {rustorb-0.1.0 → rustorb-0.1.1}/README.md +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/Cargo.toml +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/LICENSE-APACHE +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/LICENSE-MIT +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/README.md +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/src/decoder.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/src/encoder.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/src/error.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/src/lib.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/src/long_double.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/src/octets.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/src/traits.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/src/value.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-cdr/tests/cdr.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/Cargo.toml +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/LICENSE-APACHE +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/LICENSE-MIT +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/README.md +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/benches/throughput.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/codeset.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/connection.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/dii.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/dynany/mod.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/dynany/tests.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/exception.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/fixed.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/idl/mod.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/idl/tests.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/idl/value.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/lib.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/name.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/object.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/poa.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/policy.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/pool.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/servant.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/stream.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/timeout.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/tls.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/typecode/cdr.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/typecode/mod.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/typecode/tests.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/value.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/src/wire.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/any.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/async_api.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/client.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/dii.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/poa.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/policy.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/soak.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/ca.pem +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/client-bundle.pem +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/client.key +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/client.pem +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/make-certs.sh +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/other-ca.pem +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/other-server.key +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/other-server.pem +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/server-bundle.pem +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/server.key +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/server.pem +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/wrong-name.key +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls/wrong-name.pem +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/tls.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-core/tests/valuetype.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/Cargo.toml +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/LICENSE-APACHE +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/LICENSE-MIT +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/README.md +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/component.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/corbaloc.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/error.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/fragment.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/header.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/iiop.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/ior.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/lib.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/message.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/service_context.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/src/writer.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/tests/giop.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/tests/ior.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-giop/tests/omniorb_golden.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/Cargo.toml +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/LICENSE-APACHE +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/LICENSE-MIT +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/README.md +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/build.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/src/any.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/src/dii.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/src/dynany.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/src/error.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/src/lib.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/src/orb.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/src/poa.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/src/tc.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/crates/rustorb-python/src/value.rs +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/CORBA.py +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/DynamicAny.py +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/Messaging.py +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/PortableServer.py +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/PortableServer__POA.py +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/TimeBase.py +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/__init__.py +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/_native.pyi +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/_rt.py +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/_types.py +0 -0
- {rustorb-0.1.0 → rustorb-0.1.1}/rustorb/timeouts.py +0 -0
|
@@ -438,11 +438,11 @@ dependencies = [
|
|
|
438
438
|
|
|
439
439
|
[[package]]
|
|
440
440
|
name = "rustorb-cdr"
|
|
441
|
-
version = "0.1.
|
|
441
|
+
version = "0.1.1"
|
|
442
442
|
|
|
443
443
|
[[package]]
|
|
444
444
|
name = "rustorb-codegen"
|
|
445
|
-
version = "0.1.
|
|
445
|
+
version = "0.1.1"
|
|
446
446
|
dependencies = [
|
|
447
447
|
"rustorb-core",
|
|
448
448
|
"tokio",
|
|
@@ -450,7 +450,7 @@ dependencies = [
|
|
|
450
450
|
|
|
451
451
|
[[package]]
|
|
452
452
|
name = "rustorb-core"
|
|
453
|
-
version = "0.1.
|
|
453
|
+
version = "0.1.1"
|
|
454
454
|
dependencies = [
|
|
455
455
|
"criterion",
|
|
456
456
|
"libc",
|
|
@@ -464,7 +464,7 @@ dependencies = [
|
|
|
464
464
|
|
|
465
465
|
[[package]]
|
|
466
466
|
name = "rustorb-ffi"
|
|
467
|
-
version = "0.1.
|
|
467
|
+
version = "0.1.1"
|
|
468
468
|
dependencies = [
|
|
469
469
|
"rustorb-cdr",
|
|
470
470
|
"rustorb-core",
|
|
@@ -472,7 +472,7 @@ dependencies = [
|
|
|
472
472
|
|
|
473
473
|
[[package]]
|
|
474
474
|
name = "rustorb-giop"
|
|
475
|
-
version = "0.1.
|
|
475
|
+
version = "0.1.1"
|
|
476
476
|
dependencies = [
|
|
477
477
|
"rustorb-cdr",
|
|
478
478
|
"serde_json",
|
|
@@ -480,7 +480,7 @@ dependencies = [
|
|
|
480
480
|
|
|
481
481
|
[[package]]
|
|
482
482
|
name = "rustorb-interop"
|
|
483
|
-
version = "0.1.
|
|
483
|
+
version = "0.1.1"
|
|
484
484
|
dependencies = [
|
|
485
485
|
"rustorb-core",
|
|
486
486
|
"rustorb-naming",
|
|
@@ -488,14 +488,14 @@ dependencies = [
|
|
|
488
488
|
|
|
489
489
|
[[package]]
|
|
490
490
|
name = "rustorb-naming"
|
|
491
|
-
version = "0.1.
|
|
491
|
+
version = "0.1.1"
|
|
492
492
|
dependencies = [
|
|
493
493
|
"rustorb-core",
|
|
494
494
|
]
|
|
495
495
|
|
|
496
496
|
[[package]]
|
|
497
497
|
name = "rustorb-python"
|
|
498
|
-
version = "0.1.
|
|
498
|
+
version = "0.1.1"
|
|
499
499
|
dependencies = [
|
|
500
500
|
"pyo3",
|
|
501
501
|
"pyo3-build-config",
|
|
@@ -3,7 +3,7 @@ resolver = "3"
|
|
|
3
3
|
members = ["crates/rustorb-cdr", "crates/rustorb-giop", "crates/rustorb-core", "crates/rustorb-python"]
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "0.1.
|
|
6
|
+
version = "0.1.1"
|
|
7
7
|
edition = "2024"
|
|
8
8
|
rust-version = "1.85"
|
|
9
9
|
license = "MIT OR Apache-2.0"
|
|
@@ -13,10 +13,10 @@ keywords = ["corba", "giop", "iiop", "orb", "rpc"]
|
|
|
13
13
|
categories = ["network-programming"]
|
|
14
14
|
|
|
15
15
|
[workspace.dependencies]
|
|
16
|
-
rustorb-cdr = { path = "crates/rustorb-cdr", version = "0.1.
|
|
17
|
-
rustorb-giop = { path = "crates/rustorb-giop", version = "0.1.
|
|
18
|
-
rustorb-core = { path = "crates/rustorb-core", version = "0.1.
|
|
19
|
-
rustorb-naming = { path = "crates/rustorb-naming", version = "0.1.
|
|
16
|
+
rustorb-cdr = { path = "crates/rustorb-cdr", version = "0.1.1" }
|
|
17
|
+
rustorb-giop = { path = "crates/rustorb-giop", version = "0.1.1" }
|
|
18
|
+
rustorb-core = { path = "crates/rustorb-core", version = "0.1.1" }
|
|
19
|
+
rustorb-naming = { path = "crates/rustorb-naming", version = "0.1.1" }
|
|
20
20
|
tokio = { version = "1", default-features = false }
|
|
21
21
|
|
|
22
22
|
[workspace.lints.rust]
|
|
@@ -68,6 +68,15 @@ pub struct OrbOptions {
|
|
|
68
68
|
/// How long an upcall thread beyond `min_server_threads` waits for work
|
|
69
69
|
/// before it ends.
|
|
70
70
|
pub server_thread_idle_timeout: Duration,
|
|
71
|
+
/// How long an upcall thread that answered a request waits for the
|
|
72
|
+
/// next request of the same connection, to read and run it itself
|
|
73
|
+
/// (`-ORBfollowLinger US`, in microseconds; docs/read-ownership.md).
|
|
74
|
+
/// Zero turns this off: the I/O task reads every request.
|
|
75
|
+
pub follow_linger: Duration,
|
|
76
|
+
/// How many requests of one connection an upcall thread reads in a
|
|
77
|
+
/// row before it lets the I/O task read again (`-ORBfollowLimit N`).
|
|
78
|
+
/// Zero turns this off.
|
|
79
|
+
pub follow_limit: usize,
|
|
71
80
|
/// Requests of one connection that may wait or run at once. Beyond
|
|
72
81
|
/// that the connection is not read until one completes.
|
|
73
82
|
pub max_requests_per_connection: usize,
|
|
@@ -203,6 +212,8 @@ impl Default for OrbOptions {
|
|
|
203
212
|
min_server_threads: 4,
|
|
204
213
|
max_server_threads: 100,
|
|
205
214
|
server_thread_idle_timeout: Duration::from_secs(60),
|
|
215
|
+
follow_linger: Duration::from_millis(1),
|
|
216
|
+
follow_limit: 64,
|
|
206
217
|
max_requests_per_connection: 256,
|
|
207
218
|
socket_send_buffer: None,
|
|
208
219
|
socket_receive_buffer: None,
|
|
@@ -228,6 +239,8 @@ impl OrbOptions {
|
|
|
228
239
|
/// | `-ORBendPoint giop:tcp:HOST:PORT` | [`endpoints`](OrbOptions::endpoints) (repeatable) |
|
|
229
240
|
/// | `-ORBendPointPublish giop:tcp:HOST:PORT` | [`endpoint_publish`](OrbOptions::endpoint_publish) (`all(addr)` for the default) |
|
|
230
241
|
/// | `-ORBmaxServerThreadPoolSize N` | [`max_server_threads`](OrbOptions::max_server_threads) |
|
|
242
|
+
/// | `-ORBfollowLinger US` | [`follow_linger`](OrbOptions::follow_linger), in microseconds |
|
|
243
|
+
/// | `-ORBfollowLimit N` | [`follow_limit`](OrbOptions::follow_limit) |
|
|
231
244
|
/// | `-ORBendPoint giop:ssl:HOST:PORT` | [`tls_endpoints`](OrbOptions::tls_endpoints) (repeatable) |
|
|
232
245
|
/// | `-ORBendPointPublish giop:ssl:HOST:PORT` | [`tls_endpoint_publish`](OrbOptions::tls_endpoint_publish) |
|
|
233
246
|
/// | `-ORBsslCAFile PATH` | [`TlsOptions::ca_file`] |
|
|
@@ -255,6 +268,8 @@ impl OrbOptions {
|
|
|
255
268
|
| "clientCallTimeOutPeriod"
|
|
256
269
|
| "supportPerThreadTimeOut"
|
|
257
270
|
| "maxServerThreadPoolSize"
|
|
271
|
+
| "followLinger"
|
|
272
|
+
| "followLimit"
|
|
258
273
|
| "sslCAFile"
|
|
259
274
|
| "sslCertFile"
|
|
260
275
|
| "sslKeyFile"
|
|
@@ -277,6 +292,8 @@ impl OrbOptions {
|
|
|
277
292
|
| "endPoint"
|
|
278
293
|
| "endPointPublish"
|
|
279
294
|
| "maxServerThreadPoolSize"
|
|
295
|
+
| "followLinger"
|
|
296
|
+
| "followLimit"
|
|
280
297
|
| "sslCAFile"
|
|
281
298
|
| "sslCertFile"
|
|
282
299
|
| "sslKeyFile"
|
|
@@ -339,6 +356,13 @@ impl OrbOptions {
|
|
|
339
356
|
}
|
|
340
357
|
self.max_server_threads = n;
|
|
341
358
|
}
|
|
359
|
+
"followLinger" => {
|
|
360
|
+
let us: u64 = value.parse().map_err(|_| bad_option())?;
|
|
361
|
+
self.follow_linger = Duration::from_micros(us);
|
|
362
|
+
}
|
|
363
|
+
"followLimit" => {
|
|
364
|
+
self.follow_limit = value.parse().map_err(|_| bad_option())?;
|
|
365
|
+
}
|
|
342
366
|
"sslCAFile" => self.tls.ca_file = Some(value.into()),
|
|
343
367
|
"sslCertFile" => self.tls.cert_file = Some(value.into()),
|
|
344
368
|
"sslKeyFile" => self.tls.key_file = Some(value.into()),
|
|
@@ -74,6 +74,9 @@ pub(crate) struct Server {
|
|
|
74
74
|
order: ByteOrder,
|
|
75
75
|
max_message_size: usize,
|
|
76
76
|
max_requests: usize,
|
|
77
|
+
/// [`crate::OrbOptions::follow_linger`] and [`crate::OrbOptions::follow_limit`].
|
|
78
|
+
follow_linger: Duration,
|
|
79
|
+
follow_limit: usize,
|
|
77
80
|
root: OnceLock<Arc<PoaInner>>,
|
|
78
81
|
/// Simple object keys registered with `Orb::register_object_key`, and
|
|
79
82
|
/// the POA keys they stand for.
|
|
@@ -234,6 +237,12 @@ impl Server {
|
|
|
234
237
|
order: options.byte_order,
|
|
235
238
|
max_message_size: options.max_message_size,
|
|
236
239
|
max_requests: options.max_requests_per_connection.max(1),
|
|
240
|
+
follow_linger: options.follow_linger,
|
|
241
|
+
follow_limit: if options.follow_linger.is_zero() {
|
|
242
|
+
0
|
|
243
|
+
} else {
|
|
244
|
+
options.follow_limit
|
|
245
|
+
},
|
|
237
246
|
root: OnceLock::new(),
|
|
238
247
|
simple_keys: Mutex::new(HashMap::new()),
|
|
239
248
|
pool: Mutex::new(Some(Pool::new(
|
|
@@ -574,12 +583,13 @@ impl Server {
|
|
|
574
583
|
/// Leader / follower: an upcall thread that answered a request of
|
|
575
584
|
/// `conn` reads the connection's next request itself and runs it, so
|
|
576
585
|
/// that the request needs no hand-over from the I/O task to the pool.
|
|
577
|
-
/// The thread waits [`
|
|
578
|
-
/// when the pool has queued work (which other
|
|
579
|
-
/// after [`
|
|
580
|
-
/// connection. See
|
|
586
|
+
/// The thread waits [`crate::OrbOptions::follow_linger`] at most for a
|
|
587
|
+
/// request, and stops when the pool has queued work (which other
|
|
588
|
+
/// connections wait for), after [`crate::OrbOptions::follow_limit`] requests,
|
|
589
|
+
/// or when the I/O task reads the connection. See
|
|
590
|
+
/// docs/read-ownership.md.
|
|
581
591
|
fn follow(self: &Arc<Self>, conn: &Arc<ServerConn>) {
|
|
582
|
-
for _ in 0..
|
|
592
|
+
for _ in 0..self.follow_limit {
|
|
583
593
|
if self.is_shutting_down() || self.pool_has_queued() {
|
|
584
594
|
break;
|
|
585
595
|
}
|
|
@@ -589,11 +599,13 @@ impl Server {
|
|
|
589
599
|
if !conn.inbound.claim() {
|
|
590
600
|
return;
|
|
591
601
|
}
|
|
592
|
-
let (version, message) =
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
602
|
+
let (version, message) = match conn
|
|
603
|
+
.inbound
|
|
604
|
+
.read_here(Some(Instant::now() + self.follow_linger))
|
|
605
|
+
{
|
|
606
|
+
Here::Message(version, message) => (version, message),
|
|
607
|
+
Here::TimedOut | Here::HandedBack => return,
|
|
608
|
+
};
|
|
597
609
|
let keep = match message {
|
|
598
610
|
Message::Request { header, body } => {
|
|
599
611
|
let keep = conn.inbound.busy();
|
|
@@ -1057,15 +1069,6 @@ impl Server {
|
|
|
1057
1069
|
/// `IOV_MAX` is 1024).
|
|
1058
1070
|
const MAX_SLICES: usize = 64;
|
|
1059
1071
|
|
|
1060
|
-
/// How long an upcall thread waits for the next request of the connection
|
|
1061
|
-
/// it answered (see [`Server::follow`]). A client calling one request after
|
|
1062
|
-
/// another sends the next within a round trip.
|
|
1063
|
-
const FOLLOW_LINGER: Duration = Duration::from_millis(1);
|
|
1064
|
-
|
|
1065
|
-
/// How many requests of one connection an upcall thread reads in a row
|
|
1066
|
-
/// before it lets the I/O task read again.
|
|
1067
|
-
const FOLLOW_LIMIT: usize = 64;
|
|
1068
|
-
|
|
1069
1072
|
/// A request that [`Server::route_here`] runs on its own thread if the
|
|
1070
1073
|
/// manager lets it run before `dispatch` returns.
|
|
1071
1074
|
struct RunHere {
|
|
@@ -873,6 +873,18 @@ fn endpoint_options() {
|
|
|
873
873
|
assert!(args.is_empty());
|
|
874
874
|
assert_eq!(options.endpoint_publish, None);
|
|
875
875
|
|
|
876
|
+
// The leader / follower settings (docs/read-ownership.md).
|
|
877
|
+
let mut args: Vec<String> = ["-ORBfollowLinger=250", "-ORBfollowLimit", "8"]
|
|
878
|
+
.iter()
|
|
879
|
+
.map(|s| (*s).to_owned())
|
|
880
|
+
.collect();
|
|
881
|
+
options.parse_args(&mut args).unwrap();
|
|
882
|
+
assert!(args.is_empty());
|
|
883
|
+
assert_eq!(options.follow_linger, std::time::Duration::from_micros(250));
|
|
884
|
+
assert_eq!(options.follow_limit, 8);
|
|
885
|
+
let mut args = vec!["-ORBfollowLimit".to_owned(), "many".to_owned()];
|
|
886
|
+
assert!(options.parse_args(&mut args).is_err());
|
|
887
|
+
|
|
876
888
|
assert_eq!(
|
|
877
889
|
EndpointAddr::parse("giop:tcp::"),
|
|
878
890
|
Some(EndpointAddr {
|
|
@@ -307,7 +307,22 @@ fn many_clients_each_on_its_own_connection() {
|
|
|
307
307
|
/// up as `TIMEOUT`.
|
|
308
308
|
#[test]
|
|
309
309
|
fn back_to_back_calls_hand_the_reading_over() {
|
|
310
|
-
|
|
310
|
+
back_to_back(server_options(0), "");
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/// The same, with the server's upcall threads never reading
|
|
314
|
+
/// (`follow_linger` zero): the I/O task reads every request.
|
|
315
|
+
#[test]
|
|
316
|
+
fn back_to_back_calls_without_follow() {
|
|
317
|
+
let options = OrbOptions {
|
|
318
|
+
follow_linger: Duration::ZERO,
|
|
319
|
+
..server_options(0)
|
|
320
|
+
};
|
|
321
|
+
back_to_back(options, " (no follow)");
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
fn back_to_back(server_options: OrbOptions, label: &str) {
|
|
325
|
+
let server = Orb::with_options(server_options).unwrap();
|
|
311
326
|
let servant = Arc::new(LoadServant::default());
|
|
312
327
|
let obj = serve(&server, servant.clone());
|
|
313
328
|
let ior = server.object_to_string(Some(&obj)).unwrap();
|
|
@@ -333,7 +348,7 @@ fn back_to_back_calls_hand_the_reading_over() {
|
|
|
333
348
|
t.join().unwrap();
|
|
334
349
|
}
|
|
335
350
|
eprintln!(
|
|
336
|
-
"{clients} connections back to back: {}",
|
|
351
|
+
"{clients} connections back to back{label}: {}",
|
|
337
352
|
rate(clients * calls, start.elapsed())
|
|
338
353
|
);
|
|
339
354
|
assert_eq!(servant.calls.load(Ordering::Relaxed), clients * calls);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|