We are looking to call a REST API when a given tag's value meets some arbitrary condition.
What ways are there to do this? We are currently querying the Pi database ever second or two, which adds latency and overhead.
What kind of application is it? You probably just want a data pipe, which you can do via AFSDK. Patrice Thivierge has a good blog post on the topic here.
Notifications might be overkill for this sort of thing, but it could do this. However, to call a REST API you would have to look into writing a custom delivery channel plugin.
It's a Java Application which makes things more complicated.
Thanks for the pointer regarding data pipes. I wasn't aware these existed.
So how are you querying the PI Data Archive from Java?
Oh ok. I don't know any technology that would operate in Javaland, as AFSDK is .NET. PISDK has a similar concept called PIEventPipe, however I'm not sure how you can use COM from Java. I know the PI Web API just released a CTP that includes data-pipe-like updates to clients via websockets but haven't played with it at all.
>> I know the PI Web API just released a CTP that includes data-pipe-like updates to clients via websockets but haven't played with it at all.
Interesting, I'll take a look.
Retrieving data ...