1

What are the options to integrate/connect Azure Digital Twin with an existing cloud environment?

We have a cloud environment, and we would like to consume the data from the Azure Digital Twin.

  1. Is it possible for Azure Digital Twin to send an event to an external cloud environment whenever there is an update in the data? Any reference how to do this?

  2. Is it possible for an external cloud environment to periodically query the data in the Azure Digital Twin? Any reference how to do this?

TylerH
  • 20,799
  • 66
  • 75
  • 101
angin
  • 23
  • 3

1 Answers1

2

Both scenarios are possible, Azure Digital Twins is pretty flexible.

Sending events to an external cloud environment

Azure Digital Twins currently supports event routing to three different services:

  • Event Grid
  • Event Hub
  • Service Bus

You could route your updates there and have external systems in your other cloud environment listen to the messages. Alternatively, you could use a component like Azure Functions to consume the messages and send them to your cloud environment.

Periodically query ADT from an external cloud environment

Querying ADT is done through the API, any service that can authenticate with this API can query for the data. ADT uses OAUTH 2.0 for authentication, there are some docs for authentication. But if you want to do this from an external system, look into the various options for authentication here

Matthijs van der Veer
  • 3,865
  • 2
  • 12
  • 22
  • regarding sending events to an external cloud environment and the three supported endpoints, how to choose among the event grid, the event hub, and the service bus? – angin Feb 15 '21 at 14:34
  • 1
    That completely depends on the external systems, the number of messages and what features you need. A good place to start is [this document](https://learn.microsoft.com/en-us/azure/event-grid/compare-messaging-services?WT.mc_id=IoT-MVP-5004034). – Matthijs van der Veer Feb 15 '21 at 14:45
  • Regarding sending events to an external cloud environment, one of the suggestions is to use a component like Azure Functions to consume the messages and send them to our cloud environment. Any suggested reference concerning using Azure function to send messages to an external cloud environment that mostly based on java? Maybe can we just send and HTTP message from Azure function to a certain end point? – angin Feb 16 '21 at 11:34
  • That code is the same regardless of where the events come from, so I'd recommend starting at the Functions docs for those different messaging services. [Here is the Event Grid example in java for reference.](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-grid-trigger?tabs=java%2Cbash) – Alex Karcher - msft Feb 16 '21 at 23:29