AnsweredAssumed Answered

PI Web API - High memory usage concern

Question asked by xandelisk on Mar 21, 2016
Latest reply on Mar 30, 2016 by gregor
Branched from an earlier discussion

Hi there,

 

We have an similar need, and we're concerned about the possibility of high memory usage.

 

We have to call 10.000 points at each 10 minutes interval to check if the point are "off limits" and then we recorded the period that the points are "off limits".

 

To get better performance, we use batch call to have less requests. We made 20 calls in one batch request for example, and get the recorded values of each point, since the last check to that specific point. The start time of each GET grouped may differ. Here is a post body example:

 

{

  "1": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wUh8AAAUEkyMjAwMVxUMTcwN0JfTkk/recorded?startTime=2016-03-09T14:11:01.000Z&endTime=*"

  },

  "2": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wmcwAAAUEkyMjAwMVxQREkzNzI2OQ/recorded?startTime=2016-03-09T14:11:01.000Z&endTime=*"

  },

  "3": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4whkYAAAUEkyMjAwMVxWSTEzMDAy/recorded?startTime=2016-03-09T14:11:01.000Z&endTime=*"

  },

  "4": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wpS0AAAUEkyMjAwMVxWSTE4MDIx/recorded?startTime=2016-03-09T14:11:01.000Z&endTime=*"

  },

  "5": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4w1ZUAAAUEkyMjAwMVxUNDY3NkFfTkk/recorded?startTime=2016-03-09T14:11:01.000Z&endTime=*"

  },

  "6": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wdK4AAAUEkyMjAwMVxVMzBNQVhURU1QU0tJTkIzMDA0/recorded?startTime=2016-03-09T14:11:01.000Z&endTime=*"

  },

  "7": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wsvYAAAUEkyMjAwMVxSRUwgSDJPL0NBUkdBIFRSRU0gQQ/recorded?startTime=2016-03-09T14:11:01.000Z&endTime=*"

  },

  "8": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wk5sAAAUEkyMjAwMVxUNDY1NERfTkk/recorded?startTime=2016-03-09T14:11:01.000Z&endTime=*"

  },

  "9": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wZs8AAAUEkyMjAwMVxGSUMzNzAwMQ/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "10": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wqoQAAAUEkyMjAwMVxDQUxDQjMwMDJFRkk/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "11": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wdVkAAAUEkyMjAwMVxVMTFSQ1IvT0RF/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "12": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4whhQAAAUEkyMjAwMVxQSUMyNTI4OQ/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "13": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wbR8AAAUEkyMjAwMVxWSTYwMjU/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "14": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wyAgAAAUEkyMjAwMVxUSUMxMjAwMw/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "15": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4w0gUAAAUEkyMjAwMVxUMTc0NV9OSQ/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "16": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wvgkAAAUEkyMjAwMVxMSTgzMDExQg/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "17": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wocwAAAUEkyMjAwMVxQSTM3MDkw/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "18": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4whpsAAAUEkyMjAwMVxUNDY0MkNfTkk/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "19": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wyocAAAUEkyMjAwMVxWSTk4MEE/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  },

  "20": {

    "Method": "GET",

    "Resource": "https://localhost/piwebapi/streams/P0meD1zc_XJk-7EpmMk1Zs4wO8IAAAUEkyMjAwMVxGRkkzOTAwMQ/recorded?startTime=2016-03-09T14:11:02.000Z&endTime=*"

  }

}

Outcomes