I'm currently building an application that connects to the DataMiner ecosystem via the DataMiner northbound v0 & v1 API (SOAP or JSON). What would be the best-practice approach in managing my connect/disconnect actions? Should I reuse my validated connectionstring in multiple method requests? Or should I request a new connectionstring for each method execution?
Jeroen Nietvelt [SLC] [DevOps Advocate] Selected answer as best 24th December 2021
This depends on how frequently your application requests a web method:
- If your application only does a new request 5 or more minutes after the last request, then it's better to connect, do the request, disconnect, and do this again for the next request.
- If your application requests new data frequently (no more than 5 minutes between requests), then it's recommended to keep one connection active, and reuse that connection-string in every request.
Jeroen Nietvelt [SLC] [DevOps Advocate] Selected answer as best 24th December 2021