BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Kiosk style app

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (InterBase Express)
View previous topic :: View next topic  
Author Message
Dominic
Guest





PostPosted: Thu Mar 15, 2007 8:11 am    Post subject: Kiosk style app Reply with quote



Hi
I am developing a kiosk style application using Delphi 6 Pro,IBX 6.02 and
Interbase 6.0.2.0.
The application will be running on workstations in labour hire firms to
allow job seekers to enter their employment details directly to the
companies HR system. While the application may be "running" all day, the use
will be very ,very light.
My question relates to connecting to the database:
I am quite aware of connection issues using multi-cpu/SMP/hyperthreading
environments and IB 6.0.2.0 and while we do configure most of our clients
with ib_affinity, we cannot guarantee that it will always be running.
Also our backup procedures in our HR system require exclusive access to the
database (wherever possible) when a backup is being performed. Backups are
done regularly not because of system instability but because of the nature
of the software (payroll and HR)- it allows users to quickly restore to a
save point.
Normally I would do a connect-insert/update-disconnect approach, but I don't
want the user (job seeker) to have to experience delays when entering data.
I was thinking of implementing some type OnIdle logic where the application
would disconnect from the database after some period of in-activity and
connect back to the database after some other period of in-activity or when
required.
The logic would be something like this:
Application Starts
Connect to Database
No activity for 5 minutes - disconnect
No activity for 15 minutes - connect
No activity for 5 minutes - disconnect
Application receives keystroke/mouse click - connect if disconnected.
-------------------------------------
Is what I propose feasible/possible or should I just live with any
connection issues the application may experience?
Would implementing a connection thread help at all?
Thanks for your time
Dominc
Back to top
Craig Stuntz [TeamB]
Guest





PostPosted: Thu Mar 15, 2007 8:11 pm    Post subject: Re: Kiosk style app Reply with quote



Dominic wrote:

Quote:
I am quite aware of connection issues using
multi-cpu/SMP/hyperthreading environments and IB 6.0.2.0 and while we
do configure most of our clients with ib_affinity, we cannot
guarantee that it will always be running.

Don't use ib_affinity; use imagecfg. You run it once before starting
the server and you never need to do it again.

Quote:
Also our backup procedures
in our HR system require exclusive access to the database (wherever
possible) when a backup is being performed.

Don't do this. Use gbak to backup the DB (while it's live) and then
backup the gbk file with your other system. Don't backup the DB file
with a process which requires exclusive access.

Quote:
Backups are done
regularly not because of system instability but because of the nature
of the software (payroll and HR)- it allows users to quickly restore
to a save point.

Do note that IB 2007 allows point-in-time recovery *while the DB is
live.*

Quote:
Normally I would do a
connect-insert/update-disconnect approach, but I don't want the user
(job seeker) to have to experience delays when entering data. I was
thinking of implementing some type OnIdle logic where the application
would disconnect from the database after some period of in-activity
and connect back to the database after some other period of
in-activity or when required.

Souncs like a recipe for data loss to me. I just don't see why you
want to take the DB offline all the time.

--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: http://support.borland.com/entry.jspa?externalID=293
Back to top
Bill Todd
Guest





PostPosted: Thu Mar 15, 2007 8:44 pm    Post subject: Re: Kiosk style app Reply with quote



Get imagecfg.exe from \support\debug\i386 on your OS CD

Then run from CMD:

imagecfg -a 0x1 C:\Program Files\Borland\interbase\Bin\ibserver.exe

to permanently make IBServer run on one 'CPU'

--
Bill Todd (TeamB)
Back to top
Dominic
Guest





PostPosted: Fri Mar 16, 2007 5:41 am    Post subject: Re: Kiosk style app Reply with quote

Hi Craig
Quote:
Don't use ib_affinity; use imagecfg. You run it once before starting
the server and you never need to do it again.
Ok. I have looked at this previously but was a bit worried because from my

understanding imagecfg writes to the exe and changes the header.

Quote:
Don't do this. Use gbak to backup the DB (while it's live) and then
backup the gbk file with your other system. Don't backup the DB file
with a process which requires exclusive access.
There seems to be some misunderstanding - we use TIBBackupService but we

still recommend exclusive access.
This is determined by simply checking to see if any connections are active
to the database. We do however still allow the user to backup if "phantom"
connections exist. We do not support zip or any other form of external
backup mechanism in our application.

Quote:
Do note that IB 2007 allows point-in-time recovery *while the DB is
live.*
Ok, but for our purposes, IB 2007 would introduce a monetary hit to our

customers that we couldn't justify. We are seriously looking at FB - this is
a separate issued not to be discussed here Smile
Quote:

Souncs like a recipe for data loss to me. I just don't see why you
want to take the DB offline all the time.
Not taking the DB offline - simply closing the active connection.


Cheers
Dominic
Back to top
Craig Stuntz [TeamB]
Guest





PostPosted: Fri Mar 16, 2007 7:21 pm    Post subject: Re: Kiosk style app Reply with quote

Dominic wrote:

Quote:
Ok. I have looked at this previously but was a bit worried because
from my understanding imagecfg writes to the exe and changes the
header.

It does; that's why you only have to run it once.

Quote:
Don't do this. Use gbak to backup the DB (while it's live) and then
backup the gbk file with your other system. Don't backup the DB file
with a process which requires exclusive access.

There seems to be some misunderstanding - we use TIBBackupService but
we still recommend exclusive access.

Why? There is no need at all to shut down the DB when backing up with
TIBBackupService. It's fine to do it live.

--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: http://support.borland.com/entry.jspa?externalID=293
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (InterBase Express) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.