Figure 5 outlines the process that the Tailspin Surveys service uses to identify which devices to notify when a subscriber adds a new survey.
Identifying which devices to notify when a tenant adds a new survey requires two queries. The first query gets the list of users who are interested in that particular survey and this query uses a filtering service to build this list of users based on user preferences stored in Windows Azure table storage.
The second query uses the list of users to find a list of devices to notify, again using data stored in Windows Azure table storage that maps users to devices.