1 of 1 people found this helpful
The difference is that GetSnapshotData() gets the current snapshot, while GetPIUpdates() gets all values that came in since the last call. So the decision depends on whether you just need the current snapshot (and can tolerate skipping) or need all events that came in between two calls.
If you are getting updates, the application should be long-running and periodically poll for updates. So a scheduled task is no longer sufficient since there is cached state that should be preserved. Even if just polling for snapshots, I tend to favor a long running service application so I don't need to recreate the state each time, but I suppose scheduled tasks are easier to manage.
Below is an example using AFDataPipe which is the AF SDK mechanism for getting updates.
There is also a slide here that provides a template for getting updates with AFDataPipe
PI Web Services is a wrapper around these constructs so if you need higher performance, PI AF SDK is the better option, but the app machine must have the AF Client installed on it.
Thank you very much Barry. That completely answers my question