Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
West-wind - Round robin pool servers caching data.
Message
 
To
07/03/2000 16:16:30
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00342905
Message ID:
00343068
Views:
28
See the related thread on the West Wind Message board. THere are several things you can do in VFP, none of which are elegant.

+++ Rick ---



>>>We setup a system that uses table driven sessions, that keeps a number of variables stored in a memo. The problem is that when running two servers, the data is being temporarily cached in the two servers.
>>>
>>>If you hit the servers in rapid succession, you would receive the cached data instead of the real data. Of course if you delay, say about 2 seconds, everything appears fine.
>>>
>>>We've tried using a combination of FLUSH to force the write of the data and USE ... AGAIN a table that is already open to force a read. This prevents the caching but, the performance has suffered.
>>>
>>>What other approaches should we be trying?
>>
>>Is this a single record that both servers are editing and reading? If so, you probably need to RLOCK it to ensure it's not cached. Something like this:
>>FUNCTION ReadMemo
>>LOCAL lnTry, lnMaxTries, lcMemo
>>lcMemo = ""
>>FOR lnTry = 1 TO lnMaxTries
>>  IF RLOCK()
>>    lcMemo = <MemoFieldName>
>>    UNLOCK
>>    EXIT
>>  ENDIF
>>ENDFOR
>>RETURN lcMemo
>
>Sorry, about the previous post. Hit send by mistake.
>
>Without a FLUSH, you won't be reading the most updated buffers. Also if you add a record, that hasn't been FLUSHed to disk, the other process won't see the new record.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform