I have embedded a Servoy web client form into a static, existing web site - it all works as expected. One concern is that as the site has a fair number of visitors (3-400) hits an hour and is going to suck up a large number of client licenses. There is a definite start and end point to Servoys involvement with this site and I was wondering if there is a way to close the Servoy client for example on submission of the form. I have had a good look and there is nothing obvious, in Lasso or ColdFusion I would simply close the session, but this does not seem possible from Servoy - have I missed something ?
IT2Be:
Can’t you change the timeout for a webclient (don’t know myself, sorry).
If so you could make it like ‘0’…
Thanks Marcel - I will give it a go and I guess I could shorten the session in TomCat to say 5 mins. The problem this would present however is that for other sites using the same server you could truncate sessions that by nature need to be a lot longer ie large forms etc.
Fundamentally even with a CPU license it would be nice to close off the Servoy clients programatically when they are no longer required.
There is no way to prevent a browser from being closed by the user and no way to trigger code when the user does, unfortunatly.
But, the client sessions will be cleaned up after a certain period. Default it’s 30 minutes, but you can change that interval in the Tomcat webserver that Servoy runs.
pbakker:
Offcourse the session will live when the user is activly using it.
Only when there is no activity, the timeout timer starts running.
Where is the timeout timer in Servoy or Tomcat ?
Is it possible to test for connected idle clients in Servoy and close them ?
Can you limit the number of web client connections and if so put them into some sort of holding pattern waiting for a license to come free ? eg you are X in the queue of Y please call back or wait for …mins
Can you report on stats of 3 eg waiting clients and hence generate sales of licenses for Servoy!!!
I know 3 and 4 are pretty unlikely to happen but if I were new to Servoy and looking to the potential of the WebClient I would want to be sure that my customers were not going to arrive to an error page when I launch my new super duper system simply because I did not have sufficient licenses!!
Can you limit the number of web client connections and if so put them into some sort of holding pattern waiting for a license to come free ? eg you are X in the queue of Y please call back or wait for …mins
Yes, but it would be quite complex, you can use the robot plugin to check for remaining licenses and keep one license always free, then when a user connects you check if it’s using the latest license and log out the user after storing some sort of key. Upon log out of the user you should redirect him to a special html page with a redirect that tries to log back in every x mins using the supplied key as argument to a startup method. The startup method should check a table and decide which client should be allowed first based on the key. Instead of the key you could also use the client ip address.
Difficult but doable.
Can you report on stats of 3 eg waiting clients and hence generate sales of licenses for Servoy!!!
I know 3 and 4 are pretty unlikely to happen but if I were new to Servoy and looking to the potential of the WebClient I would want to be sure that my customers were not going to arrive to an error page when I launch my new super duper system simply because I did not have sufficient licenses!!
Gordon
Yes, it all depends on the way you implement the queue table and the key system.