dbTalk Databases Forums  

VFP 6: Database Code Execution "Threads"

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss VFP 6: Database Code Execution "Threads" in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gene Wirchenko
 
Posts: n/a

Default VFP 6: Database Code Execution "Threads" - 07-15-2004 , 04:48 PM






I have not seen this covered anywhere, and it may end up making a
difference in my app.

Suppose that two or more users are accessing a database. What
sort of protection is there against race conditions? I may have some
rather complicated RI rules to control access. It could be disastrous
for more than one user's process to be executing certain DBC code.

Are transactions and the use of access control tables in the
database sufficient to protect against this? Is this the only
approach that can be taken?

I can see how network considerations with regard to buffering
might be involved. Is this assumption correct? If so, how can the
effect of these considerations be minimised on other applications?

BTW, who executes the database code if the database is located on
another system? Presumably, this is the client. Is this always so?

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

Reply With Quote
  #2  
Old   
Dan Freeman
 
Posts: n/a

Default Re: VFP 6: Database Code Execution "Threads" - 07-15-2004 , 04:57 PM






ALL code in VFP executes on the client. The server is nothing but a
repository.

The only real prevention you can do to limit your SP's to one user at a time
is a file-based semaphor but that would be a performance KILLER if your
stored procs are slow or you have heavy user load.

I've never seen anyone complain about a race condition, so you may be
worrying about nothing. Then, again, it's certainly possible to design code
to fail as with any other programming language. <g>

Dan

Gene Wirchenko wrote:
Quote:
I have not seen this covered anywhere, and it may end up making a
difference in my app.

Suppose that two or more users are accessing a database. What
sort of protection is there against race conditions? I may have some
rather complicated RI rules to control access. It could be disastrous
for more than one user's process to be executing certain DBC code.

Are transactions and the use of access control tables in the
database sufficient to protect against this? Is this the only
approach that can be taken?

I can see how network considerations with regard to buffering
might be involved. Is this assumption correct? If so, how can the
effect of these considerations be minimised on other applications?

BTW, who executes the database code if the database is located on
another system? Presumably, this is the client. Is this always so?

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.



Reply With Quote
  #3  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: VFP 6: Database Code Execution "Threads" - 07-15-2004 , 09:02 PM



"Dan Freeman" <spam (AT) microsoft (DOT) com> wrote:

Quote:
ALL code in VFP executes on the client. The server is nothing but a
repository.
I figured that but wanted to be sure. I had not thought about
the security implications of that until I started writing my post.
Given a hacked VFP, a database could be toasted. There was something
on Les Pinter's site about a client-server setup on the cheap. That
might block such problems.

Quote:
The only real prevention you can do to limit your SP's to one user at a time
is a file-based semaphor but that would be a performance KILLER if your
stored procs are slow or you have heavy user load.
I am fortunate that I will not have a heavy load, and I do favour
correctness over speed. If I go with the client-server model above,
the problem might not even happen.

Quote:
I've never seen anyone complain about a race condition, so you may be
worrying about nothing. Then, again, it's certainly possible to design code
to fail as with any other programming language. <g
I am worrying about something. Whether it is needful or needless
is the question. A Sam Clemens quote I like: "Worrying about
something is like paying interest on a debt you don't even know if you
owe." Nonetheless, I still have a professional obligation to
worry^Wconvern myself with eventualities however remote they might
appear to be.

Again, that client-server setup might kill the race condition
problem.

Thank you for your post.

[snipped previous]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.