Skip to content

Commit

Permalink
Refactor $evaluate-measure Execution
Browse files Browse the repository at this point in the history
We now use completable futures instead of reducers to evaluate CQL
expressions parallel.

This commit also brings a performance boost because the new parallel
execution architecture doesn't keep the order of evaluation results
in sync with the initial patient order. Because we don't need to keep
the order of the evaluation results, the worker threads can be utilized
better and so the performance increases. For 32 core systems the
performance increase is about 50%. For systems with letter cores, the
increase is less.

Closes #1032 because we no longer use reducers at all.
  • Loading branch information
alexanderkiel committed Dec 11, 2023
1 parent 433b850 commit fbbc78c
Show file tree
Hide file tree
Showing 74 changed files with 964 additions and 891 deletions.
46 changes: 21 additions & 25 deletions docs/deployment/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,38 +70,34 @@ More information about distributed deployment are available [here](distributed.m

### Other Environment Variables

| Name | Default | Since | Depr ¹ | Description |
|:----------------------------------------|:---------------------------|:-------|--------|:-----------------------------------------------------------------------------------------------|
| PROXY_HOST || v0.6 || REMOVED: use -Dhttp.proxyHost |
| PROXY_PORT || v0.6 || REMOVED: use -Dhttp.proxyPort |
| PROXY_USER || v0.6.1 || REMOVED: try [SOCKS Options][1] |
| PROXY_PASSWORD || v0.6.1 || REMOVED: try [SOCKS Options][1] |
| CONNECTION_TIMEOUT | 5 s | v0.6.3 || connection timeout for outbound HTTP requests |
| REQUEST_TIMEOUT | 30 s | v0.6.3 || REMOVED |
| TERM_SERVICE_URI | [http://tx.fhir.org/r4][6] | v0.6 | v0.11 | Base URI of the terminology service |
| BASE_URL | `http://localhost:8080` ||| The URL under which Blaze is accessible by clients. |
| CONTEXT_PATH | /fhir | v0.11 || Context path under which the FHIR RESTful API will be accessible. |
| SERVER_PORT | 8080 ||| The port of the main HTTP server |
| METRICS_SERVER_PORT | 8081 | v0.6 || The port of the Prometheus metrics server |
| LOG_LEVEL | info | v0.6 || one of trace, debug, info, warn or error |
| JAVA_TOOL_OPTIONS |||| JVM options \(Docker only\) |
| FHIR_OPERATION_EVALUATE_MEASURE_THREADS | 4 | v0.8 | | The maximum number of parallel $evaluate-measure executions. |
| FHIR_OPERATION_EVALUATE_MEASURE_TIMEOUT | 3600000 (1h) | v0.19 || Timeout in milliseconds for $evaluate-measure executions. |
| OPENID_PROVIDER_URL || v0.11 || [OpenID Connect][4] provider URL to enable [authentication][5] |
| ENFORCE_REFERENTIAL_INTEGRITY | true | v0.14 || Enforce referential integrity on resource create, update and delete. |
| DB_SYNC_TIMEOUT | 10000 | v0.15 || Timeout in milliseconds for all reading FHIR interactions acquiring the newest database state. |
| DB_SEARCH_PARAM_BUNDLE || v0.21 || Name of a custom search parameter bundle file. |
| Name | Default | Since | Depr ¹ | Description |
|:----------------------------------------|:---------------------------|:-------|---------|:-----------------------------------------------------------------------------------------------|
| PROXY_HOST || v0.6 | | REMOVED: use -Dhttp.proxyHost |
| PROXY_PORT || v0.6 | | REMOVED: use -Dhttp.proxyPort |
| PROXY_USER || v0.6.1 | | REMOVED: try [SOCKS Options][1] |
| PROXY_PASSWORD || v0.6.1 | | REMOVED: try [SOCKS Options][1] |
| CONNECTION_TIMEOUT | 5 s | v0.6.3 | | connection timeout for outbound HTTP requests |
| REQUEST_TIMEOUT | 30 s | v0.6.3 | | REMOVED |
| TERM_SERVICE_URI | [http://tx.fhir.org/r4][6] | v0.6 | v0.11 | Base URI of the terminology service |
| BASE_URL | `http://localhost:8080` || | The URL under which Blaze is accessible by clients. |
| CONTEXT_PATH | /fhir | v0.11 | | Context path under which the FHIR RESTful API will be accessible. |
| SERVER_PORT | 8080 || | The port of the main HTTP server |
| METRICS_SERVER_PORT | 8081 | v0.6 | | The port of the Prometheus metrics server |
| LOG_LEVEL | info | v0.6 | | one of trace, debug, info, warn or error |
| JAVA_TOOL_OPTIONS ||| | JVM options \(Docker only\) |
| FHIR_OPERATION_EVALUATE_MEASURE_THREADS | | v0.8 | v0.23.3 | The number threads used for $evaluate-measure executions. |
| FHIR_OPERATION_EVALUATE_MEASURE_TIMEOUT | 3600000 (1h) | v0.19 | | Timeout in milliseconds for $evaluate-measure executions. |
| OPENID_PROVIDER_URL || v0.11 | | [OpenID Connect][4] provider URL to enable [authentication][5] |
| ENFORCE_REFERENTIAL_INTEGRITY | true | v0.14 | | Enforce referential integrity on resource create, update and delete. |
| DB_SYNC_TIMEOUT | 10000 | v0.15 | | Timeout in milliseconds for all reading FHIR interactions acquiring the newest database state. |
| DB_SEARCH_PARAM_BUNDLE || v0.21 | | Name of a custom search parameter bundle file. |

¹ Deprecated

#### BASE_URL

The [FHIR RESTful API](https://www.hl7.org/fhir/http.html) will be accessible under `BASE_URL/CONTEXT_PATH`. Possible X-Forwarded-Host, X-Forwarded-Proto and Forwarded request headers will override this URL.

#### FHIR_OPERATION_EVALUATE_MEASURE_THREADS

Not the same as the number of threads used for measure evaluation which equal to the number of available processors.

#### ENFORCE_REFERENTIAL_INTEGRITY

It's enabled by default but can be disabled on proxy/middleware/secondary systems were a primary system ensures referential integrity.
Expand Down
Loading

0 comments on commit fbbc78c

Please sign in to comment.