I'm utilizing a TWebModule with Apache. Basically understand properly Apache will spawn another demonstration of my TWebModule object if all previous produced objects are busy processing demands. Is correct?

I've produced my very own SessionObject and also have produced a TStringList to keep them. The StringList is produced within the initialization section at the end of my source code file holding the TWebModule object. I'm finding initialization could be known as multiple occasions (most probably when Apache needs to spawn another process).

It is possible to way I will have a global "Periods" TStringlist to carry all my session objects? Or perhaps is the "Safe", proper approach to store session information inside a database and retrieve it with different cookie for every request?

The main reason I would like this really is to chop lower on database access and rather hold session information in memory.


That's odd. If initialization sections get known as more often than once, it may be since the DLL is loaded in separate process spaces. One option I'm able to come up with is to see if the "Periods" object already is available whenever you create it on initialization. When the DLL is really loaded in separate processes, this can not help, after which I would recommend writing a central Session storage process and employ inter-process-communication from inside your TWebModule (you will find a couple of techniques: messages, named pipes, COM...)

As Stijn recommended, utilizing a separate storage to carry the session data is really the easiest method to go. Better still is to try and write the application to ensure that the internet browser consists of the condition naturally within the design. This can greatly increase a chance to scale the application in to the 1000's or hundreds of 1000's of concurrent customers with a smaller amount hardware.

Intraweb is a superb option, but is affected with the size problem meaning more concurrent customers, even IDLE customers, require more hardware to aid. It is much better to create in the onset an approach to your server running as internally stateless as you possibly can. Obviously for those who have a set quantity of customers and do not expect any growth, than the is a smaller amount of an problem.

Intraweb in application mode really handles session management and database access very easily, and scales well. I've commented on it previously. Although this does not directly answer the question you requested, after i faced exactly the same issues Intraweb solved them for me personally.