best collection for collection of users

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, im creating an application that will keep track of what users are logged
into a network at a given time. all users must sign ingo this network first,
so whenever a user is logged on, i will be notified. I am wondering on what
the best collection will be. the number of users will vary (this is an AIM
like network) so it needs to be accessed quickly and efficiently. what is the
best collection for this?
 
iwdu15,
Without more details, such as average & maximum # users, I would say a
Dictionary(Of User) would be a good start. Where User is your type that
maintains information about a specific user that is logged in.

However! you will want to consider using a thread safe wrapper around the
Dictionary(Of User)...

Note Dictionary(Of T) is a .NET 2.0 type, if you are using a previous
version of .NET I would suggest a HashTable.
 
hi, thanks for the quick reply. Sorry for the lack of info, however, i dont
have anymore info. i am in the development stage and building this from the
ground yp. I am just looking ahead for if i had a large network (which is
very unlikely will happen, this is just a project to learn about servers and
clients, multi-user interaction, etc) or a small network. I was just looking
for a quick yet efficient storage mean and maybe thread-safe.
 
LDAP (assuming it is Microsoft) is in my idea related to your reply what you
have to investigate.

http://msdn.microsoft.com/library/d...onIntroductionToADSIObjectsInVisualStudio.asp

AFAIK will this not fulfil your need, therefore you need an extra table as
addition which you hold somewhere to fulfil the needs you have described.

I would make from that table a simple database file which keeps track of the
logged on time on users based on the information in the AD.

Cor
 
Back
Top