PDA

View Full Version : How to limit simultaneous sessions


ABC123

Howard G. Cornett
09-28-2004, 05:53 AM
I have an application that I am developing that I would like to license by user. This poses a problem since the WAS license is unlimited. Is there any way to limit the number of simultaneous sessions for my database or for the server itself? And is there any way to do this independently for different applications on the same server?

Howard

Lenny Forziati
09-28-2004, 08:59 AM
Howard, we could possibly generate a limited user license for you as this s how we initially intended to sell the Web Application Server license. Based on user feedback during the beta period, this was changed and some of the user counting code was removed so I'm not sure exactly what we be involved to do this. However this would simply limit the number of unique users on a server in a 24 hour period and would not be per application. If this solution would work for you, you should contact Brett to explore this further.

This is also something you could implement yourself with some Xbasic. This would give you much more control over how users are counted. The basic approach I would take is to use a unique identifier per web browser (you can potentially use session.sessionid for this, it is guaranteed unique). Then for each application you would track the client ids and the timestamp of the last request from each client. Each time a request is received, update the timestamp for the client id (or create a new client id and timestamp if this client has never been to your server before). The number of users currently active on your app is then the number of client ids that have a timestamp sometime in the last x minutes

-Lenny