Cancel
Showing results for 
Search instead for 
Did you mean: 

Restrictions in MindSphere

Siemens Genius Siemens Genius
Siemens Genius

Hi,
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?

4 REPLIES 4

Re: Restrictions in MindSphere

Genius
Genius

Only a simple workaround: you could just ping a MindSphere API cyclically like mentioned here:

https://developer.mindsphere.io/resources/fleetmanager-plugin-sdk/fleetmanager-plugin-faq.html#why-d...

But nevertheless, this just extends the app-session time and there is still a hard limit, when your MindSphere session expires (12h?)

Re: Restrictions in MindSphere

Legend
Legend

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 :-/

Re: Restrictions in MindSphere

Siemens Genius Siemens Genius
Siemens Genius

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?

Re: Restrictions in MindSphere

Legend
Legend
Well, that's an approach I wouldn't recommend. Probably will work technically, you are allowed to ssh into your instances, but from the management perspective it seems a nightmare. You'll have to do tunneling and port forwarding, so the performance will be bad, monitoring will be difficult, and you are jumping over the actual timeseries db that MindSphere offers.