Building multi-instance applications
The HealthVault global architecture is comprised of a number of instances distributed around the world each serving a broad population of users. This document provides an overview of building applications that connect to multiple instances within the HealthVault global architecture.
For detailed information about the architecture, see HealthVault global architecture.
Last updated: June 2013
This topic contains the following sections.
HealthVault PPE is setup with two instances to allow developers to test multi-instance scenarios. The two instances have the same user mapping rules as the production US and UK instances, and are referred to as the US PPE instance and the UK PPE instance. For information about these rules, see Mapping users to instances.
Each PPE instance includes a version of the HealthVault Application Configuration Center (ACC).
To provision a multi-instance app in PPE:
Visit the US PPE ACC and ensure your application's configuration is created or exists there.
On the Misc tab of ACC, select Multi-Instance Aware to indicate that the app supports both of the PPE instances (or unselect it to indicate support for only a single HealthVault instance).
Visit the UK PPE ACC and create your application's configuration exactly as it exists in the US PPE ACC. For example, the app ID, methods, auth rule data types and permissions fields, and so on should all match between both PPE instances.
On the Misc tab of ACC select Multi-Instance Aware to indicate that the app supports both of the PPE instances (or leave it unchecked to support only a single HealthVault instance).
HealthVault is considering ways to make it easier for developers to provision their applications in all PPE instances in a single step.
Many of the HealthVault SDKs provide built-in support for building multi-instance apps. The sample apps in the SDKs provide working examples of building multi-instance apps.
If you are using a HealthVault SDK that supports the HealthVault global architecture, then normally, your application will be multi-instance aware by following the earlier provisioning steps and following the respective SDK standard app development model. For the supported SDKs and sample applications that demonstrate building multi-instance apps, see HealthVault SDKs and samples for the global architecture.
If you are not using a HealthVault SDK with global architecture support but would like to build a multi-instance app, you can read HealthVault global architecture to learn the architecture and build your own mechanism to connect to multiple instances.
For specific guidelines for each application type, see the Application models and the global architecture section.
To test your multi-instance application in PPE:
Choose the US PPE as the default instance for the application by pointing the application's platform URL and Shell URL there to start. For more information, see HealthVault SDKs and samples for the global architecture.
Start the application
Begin the authorization process by first redirecting to Shell.
In Shell, create a new account and specify Germany as the account country, or sign-in with an existing account that exists in the UK PPE.
Continue until you reach the app-auth page. Select the records to authorize, and click to authorize.
Upon completion of app auth, HealthVault will redirect back to your application and the response URL will have the InstanceID of the UK PPE instance, which is the instance where the record was authorized.
Next, verify reading or writing data from the record that was just authorized to ensure the application can connect to the instance.
Repeat from step 3, except specify United States in step 4 as the account country when signing up for a new account, or sign-in with an existing account in the US PPE instance.
The production environment may have more instances than PPE. However, the mechanism for connecting to two instances like in PPE, is the same as for connecting to a multitude of instances.
During the HealthVault Go-live process, the app administrator will specify the instances that the app will support. The HealthVault go-live team will provision the application in these production instances. for information about choosing the supported instances for an application, see Multi-instance vs. single-instance applications.