tinklerj

Resilience when signing up for events with Update Manager

Discussion created by tinklerj on Apr 11, 2014
Latest reply on Apr 17, 2014 by moklingfung

I am concerned specifically with snapshot events but I suppose the discussion could apply to other kinds of event retrieval that involve signing up with the Update Manager.

 

This thread notes that if a network error occurs between application and PI server, the AF SDK can generally recover the signups.  However this does not apply if the PI System is restarted.

 

I know that persistent signups (across a restart) were introduced in PI 3.4.375.32, but only for specially designated clients like PI subsystems.  From the release notes:

 

"For a certain class of applications, the Update Manager consumer signups are persisted across Update Manager restarts. Information with regard to persistent consumer signups is persisted to the file piupdconsumers.dat. The result is that after a PI Server restart, when the Update Manager starts, the consumer is registered with the Update Manager before the client application is even restarted. The consumer signups are reauthorized with the appropriate producer of updates immediately after the producer re-registers with the Update Manager. The Update Manager will queue updates for these signups even before the client application has been restarted. Persistent consumer signups timeout after a default of 86400 seconds. This timeout may be adjusted using the Update_PersistentConsumerTimeout PI Timeout Table parameter. At this time, the PI Total Subsystem and the PI Alarm Subsystem are the only two applications that use this functionality."

 

My questions are:

  • Why are customer-written applications not allowed to use this signup persistence functionality?
  • Given this, how can my application tell (when a connection to PI is re-established) that PI has restarted in the interim, so it needs to re-establish the signups?  (I observe that if I sign up the same tag twice when PI has not restarted, I start getting two copies of every snapshot event for the tag).  Are there general guidelines for user code to handle server disconnects/reconnects?
  • Can PI-SDK recover signups after a network disconnect?  Can PI-API?

 

Outcomes