We are having some difficulty to keep a MindAPP session alive due to the restrictions stated here. We have a MindAPP that will be POSTing to a service outside of MindSphere as and when there are some new TimeSeries data available. The MindAPP gets logged out frequently due to user inactivity. How can we overcome this? What would be the best practice for such usecases?
I read that Websockets can keep session alive as long as there is byte transfer every minute. Are there any examples on how to use websockets with some real examples other than the one shown in the document here.
Lastly, assuming if the MindAPP has a backing sevice like MongoDB or PostgreSQL to which the MindAPP writes the TimeSeries data that needs to be sent out of MindSphere, can one use SSH tunnel and keep the session active indefinately and read/ write to the database from a service outside of MindSphere? Will there be any timeout or restrictions in this approach?
Only a simple workaround: you could just ping a MindSphere API cyclically like mentioned here:
But nevertheless, this just extends the app-session time and there is still a hard limit, when your MindSphere session expires (12h?)
As @gabe mentioned, I don't think there's right now any other way than to ping regularly one of the entpoints to keep the session from timing out (30 minutes iirc), and the 12 hours token validity kicks in anyway. I have even seen this limitation in internal projects.
I heard there's talks to provide proper support for CI/CD flows, this implies there should be an API to request authentication, and this should solve the problem. Let's see when this comes :-/
Thanks @dlouzan , @gabe for your suggestions. Any comments on the third option using SSH and connecting to the backing service (assuming that the timeseries data is stored there?). Is this a viable option which can be considered on a production app which can be made available through IoT Value plan? If so, will there be any limitations/ restrictions in this method?