Subject Re: Limiting / Regulating Database Connections
Author msimmons15
--- In firebird-support@yahoogroups.com, Alexandre Benson Smith
<iblist@...> wrote:
>
> msimmons15 wrote:
> > Has anyone seen a better approach for regulating connections?
> >
> > Thanks,
> > Mike Simmons
> >
>
> Mike,
>
> I have not yet implemented such limits on my apps.
>
> But if I would do it, I would use the ethernet MAC address, this
is
> garanted unique, if the user lost the connection, when it came
back, the
> system will identify it as the same user, so I see no problems
with dead
> clientes coming alive again.
>
> What I intend to do is something like this:
>
> 1.) Has in some place a number of valid licenses
> 2.) each users who logs will create an entry in some table, with
it's
> MAC address, and machine name
> 3.) if all the licenses are used no new mac address should be
added,
> only trough an admin option the administrator could see the
licenses
> used, if he finds that one pair of machine/MAC Address is not used
> anymore, it will delete that record, so a new machine could login
into
> 4.) don't know, I think it should be sufficient, I wrote this from
the
> top of my head, can't remember if I considered any other
> problem/exception to the above, but it could serve as a guideline
for you.
>
> To increase the security and to avoid the users tampering with the
data,
> you could store hashes of the values, or something similar. My
actual
> customers call me and say. "Hey I installed a new machine could
you
> please send me an invoice about this license ?" :-) So I am really
not
> worried about it right now.
>
> HTH
>
> see you !
>
> --
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda
> Santo Andre - Sao Paulo - Brazil
> www.thorsoftware.com.br
>

Hi Alexandre,

I like the idea of the Mac address. Certainly would be unique!

We have "floating licenses" so any users up to the limit could
access the software from different clients. Your suggestion about
an admin function is good, but our existing clients don't have to do
this now and would object to the increased admin. So that's
information you didn't have to work with.

The basic problem I'm having is:
1. trying to ensure a table record gets deleted when a connection
drops (normally or abnormally). I'm finding this to be a tough
one... OR
2. Seeing if a connection related to a license usage record still
exists. This might be a more workable solution, possibly using
Firebird event processing. I haven't worked through this completely
yet, but each user could be listening for an event based on a unique
ID of their license record (such as MAC Address). If they are
signed on, they would post a reply event. No reply event after a
reasonable period of time would indicate the license file is not in
use and the seat could be reused. This is more complicated than I
wanted to get.

Thanks for your help!

Best,
Mike