Web Design Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignWeb Design Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 23rd, 2004, 07:52 AM
CC3 CC3 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 5 CC3 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Need a reliable file locked indicator?

Hello,

I'm developing a client-server prototype. I'm building the idea in DHTML/Perl on an Apache server running on a Windows XP Home machine. This is my client-server development environment.

I'm writing a GUI to allow initial entry/update or browse to the data of a file X. In the entry/update mode, the process opens a surrogate file for the X file, and tries to get a file lock on that surrogate. If a lock is granted subroutines are called to read the X data in and display the GUI in update mode, else the same subroutines are called to show the GUI in browse (READONLY) mode. This structure follows.

open(GI,$filnam);

if (flock(GI, LOCK_EX||LOCK_NB)) {
$pflg = "U"; # Update.
&readdata;
&shoGI;
} else {
$pflg = "B"; # Browse.
&readdata;
&shoGI;
}

I open 2 clients. I enter the GUI in update mode, after getting the lock on the server file, with client A. I then enter the GUI using client B, after again getting a lock, while still in that GUI in client A with the lock. Its as if the file was closed (which removes the lock) when I generated the GUI to client A. The flock checking is done on the server prior to showing the GUI to the client. The BACK key is used to exit the GUI.

Any guidance on this or alternative suggestions for a reliable file locking indicator that is viable in this internet, client-server, browser based environment would be greatly appreciated. Thank you.

Respectfully,
CC3

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignWeb Design Help > Need a reliable file locked indicator?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway