From d8b1a662fa79476034179fc9b6e197ce426cbee6 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 10 Sep 2024 15:28:53 -0700 Subject: [PATCH 1/5] Updated Experiment JVM doc --- content/collections/experiment-sdks/en/experiment-jvm.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content/collections/experiment-sdks/en/experiment-jvm.md b/content/collections/experiment-sdks/en/experiment-jvm.md index ebd55b053..8154a7703 100644 --- a/content/collections/experiment-sdks/en/experiment-jvm.md +++ b/content/collections/experiment-sdks/en/experiment-jvm.md @@ -369,8 +369,8 @@ public LocalEvaluationClient initializeLocal( | `apiKey` | required | The server [deployment key](/docs/experiment/data-model#deployments) which authorizes fetch requests and determines which flags should be evaluated for the user. | | `config` | optional | The client [configuration](#configuration) used to customize SDK client behavior. | -{{partial:admonition type="tip" heading="Flag polling interval"}} -Use the `flagConfigPollingIntervalMillis` [configuration](#configuration-1) to determine the time flag configs take to update once modified (default 30s). +{{partial:admonition type="tip" heading="Flag streaming"}} +Use the `streamUpdates` [configuration](#configuration-1) to get flag config updates pushed to SDK (default false), instead of polling every `flagConfigPollingIntervalMillis` milliseconds. The time for SDK to receive the update after saving is generally under 1 second. It will fallback to polling if streaming failed. Configure `flagConfigPollingIntervalMillis` [configuration](#configuration-1) to determine the time flag configs take to update once modified (default 30s) as well for fallback. {{/partial:admonition}} #### Configuration @@ -391,6 +391,9 @@ If you're using Amplitude's EU data center, configure the `serverZone` option on | `flagConfigPollingIntervalMillis` | The interval to poll for updated flag configs after callingĀ [`Start()`](#start) | `30000` | | `flagConfigPollerRequestTimeoutMillis` | The timeout for the request made by the flag config poller | `10000` | | `assignmentConfiguration` | Enable automatic assignment tracking for local evaluations. | `null` | +| `streamUpdates` | Enable streaming to replace polling for receiving flag config updates. Instead of polling every second, our servers push updates to SDK generally within a second. If stream fails for any reason, it will fallback to polling automatically and retry streaming after some interval. | `false` | +| `streamServerUrl` | The stream server url to stream from. | `https://stream.lab.amplitude.com` | +| `streamFlagConnTimeoutMillis` | The timeout for establishing a valid flag config stream. This includes time for a connection to be established to stream server and time for receiving initial flag configs. | `1500` | | `cohortSyncConfig` | Configuration to enable cohort downloading for [local evaluation cohort targeting](#local-evaluation-cohort-targeting). | `null` | **AssignmentConfiguration** From 30f65b036af6a11bc5e4f9c73994bb62fce281e2 Mon Sep 17 00:00:00 2001 From: Peter Zhu <7332407+zhukaihan@users.noreply.github.com> Date: Wed, 11 Sep 2024 15:33:22 -0700 Subject: [PATCH 2/5] Update content/collections/experiment-sdks/en/experiment-jvm.md Co-authored-by: SpencerFleury <159941756+SpencerFleury@users.noreply.github.com> --- content/collections/experiment-sdks/en/experiment-jvm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/collections/experiment-sdks/en/experiment-jvm.md b/content/collections/experiment-sdks/en/experiment-jvm.md index 8154a7703..4da671369 100644 --- a/content/collections/experiment-sdks/en/experiment-jvm.md +++ b/content/collections/experiment-sdks/en/experiment-jvm.md @@ -370,7 +370,7 @@ public LocalEvaluationClient initializeLocal( | `config` | optional | The client [configuration](#configuration) used to customize SDK client behavior. | {{partial:admonition type="tip" heading="Flag streaming"}} -Use the `streamUpdates` [configuration](#configuration-1) to get flag config updates pushed to SDK (default false), instead of polling every `flagConfigPollingIntervalMillis` milliseconds. The time for SDK to receive the update after saving is generally under 1 second. It will fallback to polling if streaming failed. Configure `flagConfigPollingIntervalMillis` [configuration](#configuration-1) to determine the time flag configs take to update once modified (default 30s) as well for fallback. +Use the `streamUpdates` [configuration](#configuration-1) to push flag config updates to the SDK (default `false`), instead of polling every `flagConfigPollingIntervalMillis` milliseconds. The time for SDK to receive the update after saving is generally under one second. It will revert to polling if streaming fails. Configure `flagConfigPollingIntervalMillis` [configuration](#configuration-1) to set the time flag configs take to update once modified (default 30s), as well for fallback. {{/partial:admonition}} #### Configuration From dad38b9bbd07078207c0649d20ee0154af162ef1 Mon Sep 17 00:00:00 2001 From: Peter Zhu <7332407+zhukaihan@users.noreply.github.com> Date: Wed, 11 Sep 2024 15:33:31 -0700 Subject: [PATCH 3/5] Update content/collections/experiment-sdks/en/experiment-jvm.md Co-authored-by: SpencerFleury <159941756+SpencerFleury@users.noreply.github.com> --- content/collections/experiment-sdks/en/experiment-jvm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/collections/experiment-sdks/en/experiment-jvm.md b/content/collections/experiment-sdks/en/experiment-jvm.md index 4da671369..7f6043a0b 100644 --- a/content/collections/experiment-sdks/en/experiment-jvm.md +++ b/content/collections/experiment-sdks/en/experiment-jvm.md @@ -391,7 +391,7 @@ If you're using Amplitude's EU data center, configure the `serverZone` option on | `flagConfigPollingIntervalMillis` | The interval to poll for updated flag configs after callingĀ [`Start()`](#start) | `30000` | | `flagConfigPollerRequestTimeoutMillis` | The timeout for the request made by the flag config poller | `10000` | | `assignmentConfiguration` | Enable automatic assignment tracking for local evaluations. | `null` | -| `streamUpdates` | Enable streaming to replace polling for receiving flag config updates. Instead of polling every second, our servers push updates to SDK generally within a second. If stream fails for any reason, it will fallback to polling automatically and retry streaming after some interval. | `false` | +| `streamUpdates` | Enable streaming to replace polling for receiving flag config updates. Instead of polling every second, Amplitude servers push updates to SDK generally within one second. If the stream fails for any reason, it will revert to polling automatically and retry streaming after some interval. | `false` | | `streamServerUrl` | The stream server url to stream from. | `https://stream.lab.amplitude.com` | | `streamFlagConnTimeoutMillis` | The timeout for establishing a valid flag config stream. This includes time for a connection to be established to stream server and time for receiving initial flag configs. | `1500` | | `cohortSyncConfig` | Configuration to enable cohort downloading for [local evaluation cohort targeting](#local-evaluation-cohort-targeting). | `null` | From bb44453b4e828dc8d4ac86d02be589b862cb4519 Mon Sep 17 00:00:00 2001 From: Peter Zhu <7332407+zhukaihan@users.noreply.github.com> Date: Wed, 11 Sep 2024 15:33:36 -0700 Subject: [PATCH 4/5] Update content/collections/experiment-sdks/en/experiment-jvm.md Co-authored-by: SpencerFleury <159941756+SpencerFleury@users.noreply.github.com> --- content/collections/experiment-sdks/en/experiment-jvm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/collections/experiment-sdks/en/experiment-jvm.md b/content/collections/experiment-sdks/en/experiment-jvm.md index 7f6043a0b..4e6de88a7 100644 --- a/content/collections/experiment-sdks/en/experiment-jvm.md +++ b/content/collections/experiment-sdks/en/experiment-jvm.md @@ -393,7 +393,7 @@ If you're using Amplitude's EU data center, configure the `serverZone` option on | `assignmentConfiguration` | Enable automatic assignment tracking for local evaluations. | `null` | | `streamUpdates` | Enable streaming to replace polling for receiving flag config updates. Instead of polling every second, Amplitude servers push updates to SDK generally within one second. If the stream fails for any reason, it will revert to polling automatically and retry streaming after some interval. | `false` | | `streamServerUrl` | The stream server url to stream from. | `https://stream.lab.amplitude.com` | -| `streamFlagConnTimeoutMillis` | The timeout for establishing a valid flag config stream. This includes time for a connection to be established to stream server and time for receiving initial flag configs. | `1500` | +| `streamFlagConnTimeoutMillis` | The timeout for establishing a valid flag config stream. This includes time for establishing a connection to stream server and time for receiving initial flag configs. | `1500` | | `cohortSyncConfig` | Configuration to enable cohort downloading for [local evaluation cohort targeting](#local-evaluation-cohort-targeting). | `null` | **AssignmentConfiguration** From a0aaca5b67401b9edb6886a7ce6face6e527d52f Mon Sep 17 00:00:00 2001 From: Peter Zhu <7332407+zhukaihan@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:38:16 -0700 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: markzegarelli --- content/collections/experiment-sdks/en/experiment-jvm.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/collections/experiment-sdks/en/experiment-jvm.md b/content/collections/experiment-sdks/en/experiment-jvm.md index 4e6de88a7..acb5706d4 100644 --- a/content/collections/experiment-sdks/en/experiment-jvm.md +++ b/content/collections/experiment-sdks/en/experiment-jvm.md @@ -370,7 +370,7 @@ public LocalEvaluationClient initializeLocal( | `config` | optional | The client [configuration](#configuration) used to customize SDK client behavior. | {{partial:admonition type="tip" heading="Flag streaming"}} -Use the `streamUpdates` [configuration](#configuration-1) to push flag config updates to the SDK (default `false`), instead of polling every `flagConfigPollingIntervalMillis` milliseconds. The time for SDK to receive the update after saving is generally under one second. It will revert to polling if streaming fails. Configure `flagConfigPollingIntervalMillis` [configuration](#configuration-1) to set the time flag configs take to update once modified (default 30s), as well for fallback. +Use the `streamUpdates` [configuration](#configuration-1) to push flag config updates to the SDK (default `false`), instead of polling every `flagConfigPollingIntervalMillis` milliseconds. The time for SDK to receive the update after saving is generally under one second. It reverts to polling if streaming fails. Configure `flagConfigPollingIntervalMillis` [configuration](#configuration-1) to set the time flag configs take to update once modified (default 30s), as well for fallback. {{/partial:admonition}} #### Configuration @@ -391,8 +391,8 @@ If you're using Amplitude's EU data center, configure the `serverZone` option on | `flagConfigPollingIntervalMillis` | The interval to poll for updated flag configs after callingĀ [`Start()`](#start) | `30000` | | `flagConfigPollerRequestTimeoutMillis` | The timeout for the request made by the flag config poller | `10000` | | `assignmentConfiguration` | Enable automatic assignment tracking for local evaluations. | `null` | -| `streamUpdates` | Enable streaming to replace polling for receiving flag config updates. Instead of polling every second, Amplitude servers push updates to SDK generally within one second. If the stream fails for any reason, it will revert to polling automatically and retry streaming after some interval. | `false` | -| `streamServerUrl` | The stream server url to stream from. | `https://stream.lab.amplitude.com` | +| `streamUpdates` | Enable streaming to replace polling for receiving flag config updates. Instead of polling every second, Amplitude servers push updates to SDK generally within one second. If the stream fails for any reason, it reverts to polling automatically and retry streaming after some interval. | `false` | +| `streamServerUrl` | The URL of the stream server. | `https://stream.lab.amplitude.com` | | `streamFlagConnTimeoutMillis` | The timeout for establishing a valid flag config stream. This includes time for establishing a connection to stream server and time for receiving initial flag configs. | `1500` | | `cohortSyncConfig` | Configuration to enable cohort downloading for [local evaluation cohort targeting](#local-evaluation-cohort-targeting). | `null` |