Hello All
Today we are going to see, how presence works in Microsoft teams in the backend process and what are the components are involved for the whole process
Presence is working in two mechanism.
- Publishing Process - Push Method
- Watching Process -Pull Method
Backend Component
Presence front End Service:
This component will update the current
presence to database. This is common for publishing the watching process 
Presence Store Database
This is kind of backed database which stores all the users Presence status
Change Feed Service & Notification Center
This tool is playing in between Trouter and Presence Store database which covey the presence to the Trouter
Trouter Service
This is key components will have the information of Org ID, Tenant ID, All end point Connections ( it will collect all the information of the users Org ID , Tenant ID , Current Presence, end point URL’s )
Trouter Client or Queue - This is Internal component will send the notification to the MS Teams Clients
Presence subscriptions store – Will pull and store the information of presence whenever needed.
            User A wants to see
the presence Status of User B 
User A initiate a new chat and check the presence bubble of the user B and pull the presence information and stored it here from the Trouter service
Permission Store – It checks for permission, whether the concerned person having enough permission to see my presence. (Particularly in between Tenants – External Domains)
Publishing Process:
- Machine/App State Changes
- Presence Client sends publish Presence request to
     Presence Service
- Presence Service creates aggregated Teams Presence
- Presence Service stores new presence state to Presence
     DB
- Change feed triggers and fans out notifications to
     Trouter Service for subscribers
- Trouter Service sends batch notifications to each
     subscriber's Trouter Client
- Trouter Client receives the update and passes it to
     Presence Client
- Presence Client confirms delivery, Trouter Client sends
     response to Trouter Service
Watching Process:
- User
     A wants to see the presence Status of User B – watching Process
- Presence bubbles subscribe for presence updates
- Presence stack sends MRIs and Trouter URL to Presence
     Service to subscribe
- Presence Service checks permissions and limits.
- Presence Service stores subscriptions for the
     subscriber and registers with publishers
- Presence Service gets a snapshot of subscribed presence.
- Presence Service sends the snapshot to Trouter Service
     for the subscriber
- Trouter Service sends the snapshot to the subscriber's
     Trouter Client.
- Trouter Client receives the snapshot and passes it to
     Presence Stack. Need snapshot so you see original presence you subscribed
     and see difference.
- Presence stack confirms delivery, Trouter Client sends
     response to Trouter Service. Service will send batch again until receives
     response back from the client.
Time for Presence status Change. – 5 to 7 Min 
Troubleshooting the presence issue
1.     
Clear the MS Teams cache in
Windows Client
2.     
Check the MS Teams presence in MS
Teams on web
Collect the diagnostic and fiddler logs and search for the presence on it
Hope everyone understand the bankend process of Microsoft Teams Presence. Happy Learning 😃
Comments
Post a Comment