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

[Bundle] Bundle Orchestrator - Batches #3260

Merged
merged 63 commits into from
May 26, 2023
Merged

Conversation

fhibf
Copy link
Contributor

@fhibf fhibf commented Apr 25, 2023

Description

In Bundle Orchestrator Part 1, resources in bundles of type "batch" are processed in parallel.
As soon as the bundle is received, resources are grouped by the respective operation type assigned and then processed in parallel.

Bundle Orchestrator is responsible for orchestrating/aggregating those resources on the fly and sending all them in a single operation to the database.

image

Some important changes made in this PR:

  • New class DataStoreOperationIdentifier: this is a new class that encapsulates the Resource Key and other additional attributes used to identify globally a single resource in the middle of a collection of resources processed by MergeAsync.

  • New Bundle Configuration: I've added a new flag to enable/disable Bundle Orchestrator.

  • BundleHandler: making BundleHandler class thread-safe.

  • Modifying MergeAsync signature: modifying MergeAsync returned data type to use DataStoreOperationIdentifier and better identify the resource submitted in the middle of all resources processed.

  • Bundle Orchestrator Operation ID: I've changed multiple parts of the code to propagate the Bundle Orchestrator Operation ID, to allow the data store layer to recognize that a resource is part of a bundle.

  • New HTTP Header tag: new HTTP header tag to allow customers running bundles sequentially or in parallel.

  • New Bundle validation: new validation to avoid duplicated resources in the same bundle.

Related issues

Addresses [issue #].

Testing

Describe how this change was tested.

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)

@fhibf fhibf added Enhancement Enhancement on existing functionality. Enhancement-Optimization Optimization on existing functionality. Azure API for FHIR Label denotes that the issue or PR is relevant to the Azure API for FHIR Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs labels Apr 25, 2023
@fhibf fhibf added this to the S113 milestone Apr 25, 2023
@fhibf fhibf requested a review from a team as a code owner April 25, 2023 21:52
Making BundleConfiguration a dependency of BundleOrchestrator.
Adding a new configuration to AppSettings allowing BundleOrchestrator to be configurable.
Copy link
Collaborator

@LTA-Thinking LTA-Thinking left a comment

Choose a reason for hiding this comment

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

I've been through the non-test files.

Copy link
Contributor

@SergeyGaluzo SergeyGaluzo left a comment

Choose a reason for hiding this comment

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

:shipit:

@fhibf fhibf merged commit 0bdea5e into main May 26, 2023
@fhibf fhibf deleted the personal/fhibf/batchOrchestrator branch May 26, 2023 23:06
fhibf added a commit that referenced this pull request Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure API for FHIR Label denotes that the issue or PR is relevant to the Azure API for FHIR Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Enhancement Enhancement on existing functionality. Enhancement-Optimization Optimization on existing functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants