How can azure stream return the processed data in real-time? I see most examples pushing processed data back to a DB or dashboard. I need everything to happen in real-time for a single request (step 4). How do you achieve this with minimal latency? Example below:
1) Page requested by client 2) Page sends some data to azure stream 3) Azure Stream does logic and calculations with data and data from 5 second window 4) Sends result back to Page so it can perform some IMMEDIATE action 5) Stores result in database for reporting
You can set the output to be an Azure Service Bus EventHub, Queue, or Topic and have your application monitoring one of those outputs. The workflow would be something like:
You can find some example code on the Microsoft Connect the Dots example. In this example IoT devices are sending weather data to an Azure EventHub and there is an ASP.NET site that is monitoring that EventHub and through websockets updating the clients.