Yes it is actually a hashtable that is being populated and read almost every
second.
My main question and concern is if I can create a new instance of the either
and ArrayList or Hashtable for fast lookup of clients session information?
The hashtable would be disposed of after they log off but just that one
clients hashtable.
To describe it another way lets say I create an array in the Declarations
ArrayList arrList;
I want to be able to create more instances of arrList for each client and
name them accordingly
For instance:
private void login()
{
arrList = new ArrayList();
//Lets say loginname.Text
//Was Client1
arrList.Name = loginname.Text; //if this property even exists..didnt look
//now throughout this session I can reference this clients own arraylist
//others don't have to fight for it any longer.
}
Private void SetData(string clientname, string data)
{
//clientname would be the name of the client (obviously)
//So we need to use that ArrayList named whatever clientname is (Client1)
//from here we can set the information
}
Hope this makes sense. There is going to have to be some type conversion
going on in the SetData function.
-----Original Message-----
From: Unmoderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Ryan Heath
Sent: Friday, May 13, 2005 4:07 PM
To: [email protected]
Subject: Re: [ADVANCED-DOTNET] creating dynamic ArrayLists per client
Then you could use a Hashtable. Be sure to serialize writing (when
users log in/out)to it with a lock.
You are saying "it will constantly be adding and reading data into
it.". By it you mean the "DataClass" per client? not the hashtable I
assume...
You could see the "DataClass" as what Session is in asp.net.
Its store all info of a single client/user. The hashtable is just a
container of these session objects for fast lookup of the clients
session.
And what performance concerns, always measure you app before
implementing any optimizations ;)
HTH
// Ryan
===================================
This list is hosted by DevelopMentorR http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentor� http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com