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?
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.
Hi Jeroen,
You should re-use your connectionstring as long as possible.
You should only send a new connect app request when you get a message that the connection string is no longer valid.