obesefelinex Posted September 5, 2006 Posted September 5, 2006 I'm running IWP services on an ISP-based FM8 server advanced. My question is about global fields which count visitors to the site and selected pages (these fields are a related side table). The fields are incremented in the scripts used to navigate to pages. Can a large number of simultaneous users ever throw off these counts? Every few weeks one or two of my counts are jumping off by many thousands.
CobaltSky Posted September 5, 2006 Posted September 5, 2006 (edited) In multi-user mode, each user "sees" and edits an independent set of values for all global fields. This is true of all client sessions whether their access is via IWP or FMP. Changes to the state of global fields (eg their values) made by a given user are then discarded at the conclusion of that session and at no point during the session are those values available to any other client session. Only the values which reside on the host computer are saved with the file (and that occurs only when the file is closed on the host). So the starting values that each client sees at the start of their session will always be the values that were last saved (ie the last time the file was closed on computer on which it was being hosted. Since a file cannot be hosted within a browser, there is no circumstance when global field edits which occur via IWP are saved. To answer your question directly, I have encountered no instances of the number of active users having any effect on the values of global fields and I have not seen nor heard of any situation when changes to global field values by one user had any effect whatsoever on the values (global or otherwise) seen by other users of the same system. Edited September 5, 2006 by Guest
neilticktin Posted October 12, 2006 Posted October 12, 2006 Great comments on global fields. Related to this, any ideas on a good way to have a global field (or some sort of equivalent) that would not only be accessible to all users using the system, but stay set from one session to the next? Right now, we have a script that runs at launch set a global field, but frankly, that's cumbersome to change, and not something that I'd want the user to be able to do (the value is something that I would want a user to change). Thanks! Neil
xochi Posted October 12, 2006 Posted October 12, 2006 You can simulate persistant globals as follows: 1. Create a table that has a single record with as many fields as you wish, let's call it "PersistantGlobals" 2. Anywhere you wish to use this table, make a Cartesian relationship from the current layout table to the PersistantGlobals table. 3. Now, you should be able to just reference any fields in that table via the PersistantGlobals::FieldName syntax. E.g. SetField(PersistantGlobals::NumberOfVisitors, PersistantGlobals::NumberOfVisitors + 1) 4. Note: since this is a true global, you have to worry about concurrent access from multiple users. You might need to use some error trapping to do something sensible if the record is locked when you are trying to access it.
Søren Dyhr Posted October 12, 2006 Posted October 12, 2006 Related to this, any ideas on a good way to have a global field (or some sort of equivalent) that would not only be accessible to all users using the system, but stay set from one session to the next A field a relation away in a carthesian kind of relation, stuffed where with a loop ensuring against record locking ...as a kind of safeguard against two simultaneously locking in. --sd
Recommended Posts
This topic is 6616 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now