Search code examples
mrtk

What is the difference between Services and Providers?


The MRTK has both Services (possibly also called Systems) and Providers. What is the difference? What do each of them do?


Solution

  • Services and providers are both quite similar. Below is a brief description of the service and provider concepts in MRTK. A technical architecture document is being written and will be published on https://microsoft.github.io/MixedRealityToolkit-Unity once complete (the link will be posted here).

    Services There are two types of services: IMixedRealityService and IMixedRealityExtensionService. Services that implement IMixedRealityService directly are often called "systems". Systems are services that form the foundation of MRTK (Input, Spatial Awareness, etc.). Developers enable or disable services in the Mixed Reality Toolkit Configuration profile.

    Extension services implement IMixedRealityExtensionService are configured in the Mixed Reality Registered Components profile (an old name that may change in the future). A Extension services are one way that the MRTK can acquire new functionality.

    Providers Providers are a special case of a service (they implement IMixedRealityDataProvider) in that they "belong" to another service. For example, the WindowsMixedReality Device Manager is a data provider for the input system. Providers are registered and unregistered at the direction of the service.

    Hopefully this helps. If there are more questions, please do not hesitate to ask.