Subject | Controlling the Number of Simultaneous Users |
---|---|
Author | Dan Cooperstock |
Post date | 2007-11-30T16:39:36Z |
I have a shareware application that is currently using only FB
embedded, so obviously it can only have one simultaneous user. I want
to provide an option to have simultaneous users, using the FB Server,
but I want to be able to control how many simultaneous users are
allowed, based on the license fees that the using organization has
paid for my software.
Are there any obvious ways to do this with Firebird?
The only thing that comes to mind immediately is to have a single row
table that all users update on connect, increasing a UsageCount field
by one (if the current value doesn't exceed the # of licensed users).
On disconnect, they would decrease the count by one.
Of course, this solution is extremely error prone - if the program
ever crashes, or the user reboots while it is running etc., the usage
count won't be decreased.
Any better ideas?
Also, one of the options will be to be licensed to use the FB Server
with only one simultaneous user, for users who want to keep their DB
file on a network server (since FB Embedded doesn't allow that). Is
there any special way to do that, some sort of single-user connection
to the server?
Thank you.
embedded, so obviously it can only have one simultaneous user. I want
to provide an option to have simultaneous users, using the FB Server,
but I want to be able to control how many simultaneous users are
allowed, based on the license fees that the using organization has
paid for my software.
Are there any obvious ways to do this with Firebird?
The only thing that comes to mind immediately is to have a single row
table that all users update on connect, increasing a UsageCount field
by one (if the current value doesn't exceed the # of licensed users).
On disconnect, they would decrease the count by one.
Of course, this solution is extremely error prone - if the program
ever crashes, or the user reboots while it is running etc., the usage
count won't be decreased.
Any better ideas?
Also, one of the options will be to be licensed to use the FB Server
with only one simultaneous user, for users who want to keep their DB
file on a network server (since FB Embedded doesn't allow that). Is
there any special way to do that, some sort of single-user connection
to the server?
Thank you.