Cookie Preference Centre

Your Privacy
Strictly Necessary Cookies
Performance Cookies
Functional Cookies
Targeting Cookies

Your Privacy

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences, your device or used to make the site work as you expect it to. The information does not usually identify you directly, but it can give you a more personalized web experience. You can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, you should know that blocking some types of cookies may impact your experience on the site and the services we are able to offer.

Strictly Necessary Cookies

These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site may not work then.

Cookies used

Performance Cookies

These cookies allow us to count visits and traffic sources, so we can measure and improve the performance of our site. They help us know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies, we will not know when you have visited our site.

Cookies used

Google Analytics

Functional Cookies

These cookies allow the provision of enhance functionality and personalization, such as videos and live chats. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies, then some or all of these functionalities may not function properly.

Cookies used




Targeting Cookies

These cookies are set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant ads on other sites. They work by uniquely identifying your browser and device. If you do not allow these cookies, you will not experience our targeted advertising across different websites.

Cookies used


This site uses cookies and other tracking technologies to assist with navigation and your ability to provide feedback, analyse your use of our products and services, assist with our promotional and marketing efforts, and provide content from third parties


Upcoming Events


How To Enter the 2020 Members' Choice Awards - For Vendors




Presence updates and multiple application pools - Clarity Connect - Blog

Presence updates and multiple application pools

In Lync development, as in many other areas of life, things get much more complicated when you have more than one application pool. You need to start thinking about scenarios that previously weren't possible. One important case your application needs to account for if it may be deployed across more than one pool of servers is receiving presence updates from different pools of Front End servers. You can often get away with ignoring this effect, but you risk running into strange and seemingly inexplicable behaviour once in a while. This post explains the issue and what you can do about it. The first concept that's important to this discussion is that each pool of application servers is associated with a single pool of Front End servers as its next hop, as shown in the diagram below. When an application server sends a SIP message, it will always go to that particular Front End pool as the first step.

In addition, every single Lync user in a Lync environment is "homed" on exactly one pool of Front End servers. This is the pool that user's Lync client communicates with when it signs in (registers) to Lync Server, and the pool where all SIP messages are sent first on their way to other endpoints. (There are some more details about how the client picks which specific server in the pool to sign in to, but those aren't really relevant here.) The diagram below illustrates this.

Where things get interesting is when a user changes his or her presence, and an application located on both app servers is subscribed to the presence of that user. Here's an illustration of what happens:

To sum up: the user sends a presence update to his/her home server. The app pool associated with that same Front End  pool receives the update directly. To get the update to the other application pool, which is associated with a different Front End pool, the home server needs to send it first to the other Front End pool. This extra hop generally introduces a bit of delay between when the first (nearer) application pool gets the update and when the second one gets the update. This delay can be lengthened if there is a lot of latency on the network link between the two pools.

If there are more than two Front End and application pools, then this process is repeated for the other pools as well.

This delay in when the application pools pick up the presence updates can be problematic if the different instances of the application are sharing state information, or if they need to coordinate in some way among themselves when taking action on the updates. The servers may receive the same update at different times, causing servers to have mismatched in-memory data about users, or causing presence updates to be stored out-of-order in a common data store.

Thankfully, each presence update has a time stamp built into the message, generated when the update is published, so that each server receiving the update can see the same time stamp and use it to ensure messages are handled in the right order across multiple servers. To see this time stamp, you need to dig a bit into the category data in the presence notification objects, rather than using the strongly-typed category classes like AggregatedPresenceState. But you can still use the strongly-typed classes to get the actual data once you've found the time stamp.

When handling presence updates from a RemotePresenceView object, you get a collection of RemotePresentityNotification objects in the event arguments. To get the time stamp, look at one of the objects in the Categories collection on the RemotePresentityNotification, and check the PublishTime property.

[csharp] if (notification.Categories.Count > 0) { DateTime publishTime = notification.Categories[0].PublishTime; } [/csharp]

All the category objects in a single notification should have the same publish time, so it doesn't make much difference which one you look at within a single notification.

If you store data from the presence updates somewhere, or pass it between instances of the application, it's a good idea to use this publish time rather than a time stamp generated by your application. This will help you avoid time synchronization or ordering issues like the ones described above.


Publish Date: September 11, 2015 5:00 AM

2020 Buyers Guide Computer Telephony Integration

Call Center Studio

Call Center Studio
Call Center Studio is the world’s first call center built on Google and is one of the most secure and stable systems with some of the industry’s best reporting. It is one of the most full-featured enterprise grade systems (with the most calling features, one of the best call distribution, outbound dialing features and integrations—including IVR, AI Speech Recognition, blended inbound/outbound calling and includes Google’s new Dialogflow and Speech API. Call Center Studio is the absolute easiest to use (with a 10 minute setup), and is the price performance leader with lower equipment cost and less setup time.
PH: +1 512-872-7565

ComSys S.A.

CLink for CRM and Call Center Integration
CLink by Comsys is a middleware that connects in real-time the CRM and the contact center applications. CLink enhances the CRM with interaction management capabilities from the contact center that allow agents to work more productively across all communication channels.
Comsys is a provider of οmnichannel customer engagement solutions that assist companies around the world in delivering unique customer experiences. For the last 15 years, Comsys designs and implements complex projects for clients from the outsourcing, financial services, telecommunications, and retail sectors. Comsys enjoys strategic partnerships with technology vendors like Cisco®, Aspect Software®, and Microsoft® for the delivery of innovative interaction management and contact center optimization solutions.
PH: +302109241486

IntraNext Systems

IntraNext Systems develops agent efficiency tools and data security software solutions for medium-to-large contact centers. Our Event Intelligence® Platform solutions include SmartCTI™, iGuard®, and SmartSIP™. SmartSIP is based on our patented SIP layer technology and provides a DTMF masking solution for VoIP environments.
PH: 888.638.6398


CRM integration
We know how important it is for a business to obtain data from its customers and to manage them effectively, so we help small to large companies by integrating their CRM with the Virtual Switchboard.

This type of integration will simplify the work of your team and improve the management performance of the contact list and its information.
PH: +34 952 667 511


NovelVox CTI Connector
NextGen Cisco Finesse, Genesys & Avaya Embedded CTI Connectors for Salesforce, Microsoft Dynamics, ServiceNow, Zendesk & more.
PH: (+1) 301 202 3672

View more from Clarity Connect

Recent Blog Posts:
Informal Contact CentersDecember 8, 2015 5:00 AM
The Importance of Intelligent Routing and ForwardingOctober 2, 2015 5:00 AM
What Really Matters in Your Contact Center? Headcount Turnover vs. Service LevelSeptember 11, 2015 5:00 AM
Getting rerouted messages to the right UCMA endpointSeptember 11, 2015 5:00 AM
UCWA - Messing with SignalR and NodeJSSeptember 11, 2015 5:00 AM
Response Groups and call forwardingSeptember 11, 2015 5:00 AM
Presence updates and multiple application poolsSeptember 11, 2015 5:00 AM
UCWA by the numbers - #5 Re-join ConversationsSeptember 11, 2015 5:00 AM
UCWA & Deciphering multipart/batching with FiddlerSeptember 11, 2015 5:00 AM
Clarity Connect + Skype for BusinessJuly 9, 2015 5:00 AM
Submit Event

Upcoming Events

15th annual Best Practice Conference - this is the contact center world's most highly rated event - a whopping 100% of delegates say they would recommend it!

100's of best practice tips and ideas from contact center professionals Read More...

Latest Americas Newsletter
both ids empty
session userid =
session UserTempID =
session adminlevel =
session blnTempHelpChatShow =
session cookie set = True
session page-view-total =
session page-view-total =
applicaiton blnAwardsClosed =
session blnCompletedAwardInterestPopup =
session blnCheckNewsletterInterestPopup =
session blnCompletedNewsletterInterestPopup =