Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Count of the clients accessing the server

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the possible ways to count the number of clients and the pages that they are accessing the server at any time ?
 
John Bateman
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I wouldn't see this as being a 'java' thing since most wbservers logs can be run through a stats program and give you all this info.
BUT
I might look at this in the following way:
Create your own class that is 'called' on each page. It can track the IP/sessionID and keep a count of 'unique' hits, and then of all the pages these people request.
Want to know how many people are 'online'? Make a static method/field that counts the instances of this class, find some creative way to use 'finally' to deduct from this total before it's all garbage collected and you've got some pretty interesting information.
Store these in a database, package it with a nice reporting tool and you've got yourself a 'web' stats program.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic