Hashtable.. design question.

G

Guest

Hi,

I'm designing an server application. Eventhough, in the first release, a
few
hundred clients will be connecting to this server, later on few thousands
of clients
will connect.

Currently, I'm thinking to use a Hashtable to store various clents and their
Information. However, while I was browsing through some articles, I came
to
know that we can use database to store these various and many clients.

I'm wondering in my case which one is better option to store the client
information.
Please let me know.

Cheers,

Naveen.
 
R

realfun

database will be good if your clients information is large, or you want
to store the informations on hard disk.
Hashtable will be good if you need to manipulate the client infos
^very^ frequently.
 
O

Oliver Sturm

Naveen said:
I'm wondering in my case which one is better option to store the client
information.
Please let me know.

Hm, we don't know anything much about your case, do we? But generally,
the deal is simple: the Hashtable will be much faster than regular
database lookups, with the main drawback that it's not (in itself)
persistent. So when your server crashes, or needs to be restarted, you
lose all current state information. This alone is usually reason enough
to opt for a database backend for this kind of information.



Oliver Sturm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top