How many engines does my O4W consume?

I recently ran into a problem where I was demonstrating O4W to a prospect and I ran out of available user counts. I have a 5-user system and I had been running up O4W, closing it, running up the desktop OpenInsight and then running up O4W again. I’d assumed that when I closed down O4W the user counts would be freed up, but as I was leaving the EngineSever running this was not the case.

This issue then provoked the usual question about how many O4W Web User licenses people should purchase for their web based systems. This is a terribly difficult question to answer, mainly because it depends on the time required to process each web request and this is dependant on the application and the type of request itself. If the request is a simple record read with only a few data items being returned, then it is going to be very quick and the engine could handle multiple requests of this type per second. However, if it is being asked to process a large report, then the engine will be tied up for considerably longer.

However, with the release of OECGI3, this becomes less of an issue as OECGI3 will utilise multiple licenses (OEngines) to process multiple requests. Furthermore, it will then queue any inbound requests if an OEngine is not free to process the request at that time. When an engine becomes free, it will then process the request as normal. That said, it is always advisable for developers to build in some form of monitoring where user counts are likely to be tight, so that peak usage times can be handled efficiently or additional user licenses purchased to cater for the peaks.

Now, if OECGI3 is able to consume multiple engines, and we are unable to control the number of web users accessing our system, AND we have both the web system AND the desktop system using the same OpenInsight user license (Oengine.dll file), then we could run into trouble.

Take the scenario where I have a 60-user licensed OI system. This is used to serve 50 desktop (office based) users and an O4W system that has been built to extend my application to customers over the web. I could easily get into a situation where I have 20-user licenses being used by O4W and this would leave only 40 user licenses for my office staff – i.e. 10 office users could be blocked from using the system – not a favourable situation.

Fortunately, the O4W developers have thought about this issue and it is easily addressed through the eserver.cfg file within OpenInsight. This file includes two lines towards the beginning of the file for managing both the maximum number of engines that the engine server (OECGI3 / O4W) can consume and also the time that the engine will remain active and able to process web requests.

MaxEngines is used to define the maximum number of engines that are kept alive and ready to process stateless connections. This means that the engine does not need to be spawned and closed down for each web request and it therefore handles more requests more efficiently. The default setting for MaxEngines is 10 (MaxEngines=10).

IdleTimeout is the length of time (in minutes) that an engine remains active and ready to process web requests before it is closed down. The default setting for IdleTimeout is 15 minutes (IdleTimeout=15).

So, in our example scenario above, we can easily use the eserver.cfg file to limit the number of engines available to O4W to just 10 and we can also control the amount of time that the engines remain active. By setting MaxEngines=10 and IdleTimeout=15, we can ensure that we will always have at least 50 engines (from the 60-user license) available to our desktop users.

I should also point out that O4W requires a minimum of 10-user licenses and you will receive a warning message stating that a 10-user license is the minimum requirement for O4W use if you try to use an engine with fewer than those required 10 users. In addition, the MaxEngines can be set to any number from 1 to 10 for that minimum number of user engines, or more if there are more engines available. If you set a figure greater than the number of user licenses in the engine (say MaxEngines=100 on a system with only 10 users) then O4W will use all of the engines available up to the maximum user count in the license (so 100 in the above example).

So, why was I running out of engines during my demo? Quite simply, I had the defaults set for MaxEngines and Idletimeout in the eserver.cfg file, and as I was not closing down my OengineServer all five of my engines (licenses) were being used and left open for the full 15 minutes. I then changed my MaxEngines to 3 and IdleTimeout to 5, mostly because I don’t need them open for 15 minutes) and all was fine. I now know that I always have two engines free for my desktop OpenInsight system and the remainder available for my O4W system.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s