472,328 Members | 992 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

File Locking Conflicts - Are there any pitfalls ?

We have developed a python class that can read data files created from
another application. These target files are C-ISAM files used for
accounting applications so the "primary" application may be reading
and/or writing to portions of the files ("records") at the same time.

The python class we developed opens the requested file in 'rb' mode,
reads the file header (first 512k) and using information supplied in
the file header (such as record length, etc), reads "records" from
specific file locations. At no time does the python class do any
writing of data, it is strictly read only.

Using this class we plan develop a Python application. Our app plus
the the "primary" application will reside on the same machine or at
least be using the same operating system (some flavour of win32). In
addition the primary application is "multi-user" so there may be 10-12
workstations reading/writing to the same file the the python app is
reading.

What we haven't been able to ascertain is whether or not there are any
potential "conflicts" between reading and processing the file in
python if the "primary" application also reading/writing and
processing the file.

It is our understanding that as long as the python app is "read only"
and both apps are using the same file locking mechanism (ie. the same
underlying OS), there should not be any conflicts.

If someone could point me in the right direction - comments, links,
etc - I would really appreciate it.
Jul 18 '05 #1
2 1720
On 6 Jul 2004 06:10:08 -0700,
ge********@hotmail.com (Geoffrey) wrote:
What we haven't been able to ascertain is whether or not there
are any potential "conflicts" between reading and processing the
file in python if the "primary" application also reading/writing
and processing the file. It is our understanding that as long as the python app is "read
only" and both apps are using the same file locking mechanism
(ie. the same underlying OS), there should not be any conflicts.


"The same underlying OS" may not be sufficient. Your "primary"
application may have other locking mechanisms built on top of the
low-level OS-provided locks, or require that applications acquire
those locks in a particular order, or impose other restrictions.

I would check with the vendor/documentation of your "primary"
appliction; they would be the authority on a question like this.

Regards,
Heather

--
Heather Coppersmith
That's not right; that's not even wrong. -- Wolfgang Pauli
Jul 18 '05 #2
> "The same underlying OS" may not be sufficient. Your "primary"
application may have other locking mechanisms built on top of the
low-level OS-provided locks, or require that applications acquire
those locks in a particular order, or impose other restrictions.

I would check with the vendor/documentation of your "primary"
appliction; they would be the authority on a question like this.

Regards,
Heather


I am fairly certain that it is just using the filesystem locks. There
is no documentation and the vendor won't release the info. So ...

I was wondering how python addresses file locking as we can't find any
reference to this in the python manuals/docs.

Is there any modules with in python that would help me
diagnose/decipher this ?? I checked win32all and did see anything
specific to file locking.

On win32 the application provider does suggest that you "disable"
microsoft's opportunitic locking scheme as this may cause data
integrity issues.

Any hints on the python side ??
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kamus of Kadizhar | last post by:
Thanks to Robert Brewer, I got enough insight into logging to make it work.... Now I have another issue: file locking. Sorry if this is a very...
3
by: Hugz | last post by:
Hello, And Thank you for taking time to help me.Myself Hugz.I am new to perl and want to write my own Scripts.But i can't understand how perl...
2
by: Scott Bryce | last post by:
I am creating a CGI application in Perl that uses an Access database. It will be hosted on an NT server. I have used flat file DBMs (tied hashes)...
4
by: Stanley Cheung | last post by:
Hi all, Anyone have a "File Locking" experience? I want to ask if the application can prevent 2 user access (concurrently) to file for content...
4
by: darrel | last post by:
I've been dealing with a file locking issue for a while. Our CMS spits out a new XML file each time an item in the DB is updated. This XML file...
2
by: Dr. Who | last post by:
I'm always disappointed when I find something that Python doesn't handle in a platform independent way. It seems to me that file locking is in...
15
by: Matt Brandt | last post by:
I am trying to get multiple threads to lock specific regions of a file. However, since each thread has the same PID, it appears that a lock by one...
1
by: =?Utf-8?B?REZTIEhFTFAgV0FOVEVE?= | last post by:
We are currently testing the Microsoft technology of Distributed File System Replication with DFS Namespaces which is working perfectly, however...
2
by: Sparky | last post by:
Hello! I am writing some software that will have many users accessing the same file resource at once for reading purposes only. I am programming on...
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.