Can Dataminer HTTP based protocols support devices that implement/use either HTTP If-Modified-Since or ETag technologies? We are looking at ways to optimize the communications to some of our devices by only polling specific data items from the device if the items have changed since the last time the data was received. We can implement the above mentioned technologies in our devices but only if DataMiner can utilize these features in the protocol for the device.
Any feedback would be appreciated.
Thanks
They sure can, DataMiner connectors can easily store the headers of the HTTP responses and then later use these values in a request back to the webserver.
In short what you would need to do is store the value of the Last-Modified or ETag header of the response that comes back on the initial request to the server.
For this example, I'll combine the two but they can also be used independently.
<HTTP>
..
<Response>
<Headers>
<Header key="Last-Modified" pid="1" />
<Header key="ETag" pid="2" />
</Headers>
..
</Response>
</HTTP>
This will store the Last-Modified response header value in parameter 1 and the ETag response header value in parameter 2.
Then on a next request you can use those values to send out a conditional request, meaning you only want the server to reply if the data has been modified since the date we received in our initial response or if the ETag has changed which would imply that the data has changed.
<Request verb="GET" url="/resource">
<Headers>
<Header key="If-Modified-Since
" pid="1" />
<Header key="If-None-Match" pid="2" />
</Headers>
..
</Request>
I've only written down the bare minimum to explain the gist of it but if you need an introduction on how to get started on writing your own HTTP connector, How to create an HTTP connector is a great place to start.