posted 21 years ago
I would rule out XML and file idea straight away.
Now, let's look at the other two options...
1. You said there will be about one Meg of data per user session and there will be about 100 users.
This data by itself carries little information because ...
The number of user sessions may be much more than the number of users ... because of the following reasons ...
1. One user logs with multiple browser windows and hence ... multiple sessions.
2. One user performs some transactions, closes the browser, opens a new browser and carries on with a new transaction. The old session still remains at the server, till it times out.
With no other facts given, I would assume about 150 user sessions.
On the other hand, I thing the actual amount of data in the session ( per session ) will be less than 1 Meg. An users total volume of session data will reach 1 Meg only when he reaches the 50th page. On an average I would take .75 Meg of data per session.
Therefore the total load on the heap memory will be .75 * 150 approx 115 Meg.
With this I would add the normal objects that are created in the heap memory during normal execution of the application, and the memory space taken up by your server. So this figure will rise considerably higher. And you are working with DOM, which eats up huge memory !!!
Any machine which will act as a server will atleast have 256 Meg of memory ... or more realisticallly 512 Meg of memory, thus you are safe ... but ensure that your box only hosts your web application and nothing else !!!
Now the database solution. Database calls are optimized, but continuous updation of database with huge volumes of data as estimated above will hog the network. This will probably make your application terribly poor in performance.
You said that your application by itself does not make use of a database. Just to store some temporary data, the buying of a database licence is not at all a cost effective solution. Even if you have a database already ... using your application to connect to the existing database ... the performance of the other applications which relies on this database will be hampered.
I would rather go for the session, than a database. However, make sure your application is fine tuned for performance.