Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Active users -- why not?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Active users -- why not?

 Post Reply Post Reply Page  <12
Author
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2003 at 9:24am
-borg-
Given the problems with Access and Active Users, wouldn't it be advisable to change the way Active Users works in future versions of the forum. My suggestion would require one additional field in the database and would thus make it only applicable for the next major version, but ...

Why not add a field to the Author table which stored the date and time of the last click for the user. You could then query this field to find out who is "on" the board. It is as reliable as the current method and would not produce multiple instances for a user. Additionally, you could track the forum that that person is in and display that with the forum so you get a list of members in the forum. When a person logs out or session has expired, you could just null the field.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2003 at 9:33am

That wouldn't improve it.

The problem is not how in the access database the data is stored, one table is as good as another, the problem is that access can't cope with the amount of updates required, also each time a delete or update happens access keeps a copy of the old data slowly making the database grow to an unacceptiable size.

Just imagine if just 5 poeple are on the board at once, each click in the forum would require a database update, if they each only look at 5 posts in 5 minutes this would require at least 10 updates, if there are constently 5 people on the site over an hour this would be well over 100 database updates and thats not including the main page and pages listing the topics.

The only way to make it work for access is to move the tracking for the active users away from the database, using something like application level variables, this then would add quite a bit of overhead to the server, most hosts don't like the use of application level veriables becuase of the amount of server resources used (this is why many ban chat room software as most work in this way) this could lead to many web hosts banning Web Wiz Forums from their servers.

Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2003 at 1:43pm
You could then lessen the hit to the database by only updating when the time length of the session has expired and the user is still on the board or when the user logs in or logs out. This would lessen the updates for the average user to once every 20 minutes and would use the session variable to update the active user table when needed. This would even require any changes to the database, just changes to the active users script.
Back to Top
kasl_33 View Drop Down
Groupie
Groupie
Avatar

Joined: 15 June 2003
Location: United States
Status: Offline
Points: 86
Post Options Post Options   Thanks (0) Thanks(0)   Quote kasl_33 Quote  Post ReplyReply Direct Link To This Post Posted: 13 July 2003 at 12:11am

Very smart!

If your server does let you use application level variables like mine (http://www.kistech.com), you can display the active users on your whole website by using the following code:

Insert this into your html where you want it to show up on the page:

There are <% =application("activevisitors") %>users on this site.

Insert this into your global.asa file at the root directory of your site:

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Application_OnStart
application("activevisitors")=0
End Sub

Sub Application_OnEnd
End Sub

Sub Session_OnStart
application.lock
application("activevisitors")=application("activevisitors")+1
application.unlock
End Sub

Sub Session_OnEnd
application.lock
application("activevisitors")=application("activevisitors")-1
application.unlock
End Sub

</SCRIPT>

www.kasl.info

The PHP/MySql Web Development site
Back to Top
Phat View Drop Down
Senior Member
Senior Member


Joined: 23 February 2003
Status: Offline
Points: 386
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post Posted: 13 July 2003 at 2:50am

What about using a separate access db just for the active user?

Then you would not have to worry about corrupting the main db.

Back to Top
thedave View Drop Down
Groupie
Groupie
Avatar

Joined: 08 June 2003
Location: United Kingdom
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote thedave Quote  Post ReplyReply Direct Link To This Post Posted: 13 July 2003 at 1:06pm
yea i like the users online funtion like on other forums buts its not totally nessiscary, but theres no way im risking corrupting my db.
if theres a way of using this function without it corruping my db let me know plz.
ello?!
Back to Top
eksimba View Drop Down
Groupie
Groupie


Joined: 23 April 2003
Location: United States
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote eksimba Quote  Post ReplyReply Direct Link To This Post Posted: 14 July 2003 at 2:34pm

Although I'm sure the chance of database corruption is real, I doubt if it is a very frequent problem. I have the forum installed at my website with just over 80 members (it's closed to new registrations) using an Access database. There are anywhere between 5 and 20 concurrent active members and they have posted about 40,000 posts in the last four months, although I keep the database trimmed to the most recent 10,000 posts. I have had the active users function enabled this entire time without a problem. About once a month I have run 'compact and repair' on the database.

I keep a daily backup of the database just in case, but the forums seem to work very well even with Access as the backend.

Thanks, -boRg-, for the great work.

- eric
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.