#17 IIS-Hosted Applications Connecting to JADE or JOOB

Technical and operational updates for all users of JADE, including Jade Source Bulletins
User avatar
Jade Support
Posts: 103
Joined: Mon Aug 17, 2009 10:27 am
Location: Jade Software Corporation, Christchurch

#17 IIS-Hosted Applications Connecting to JADE or JOOB

Postby Jade Support » Thu Mar 08, 2012 8:43 am

IIS-Hosted Applications Connecting to JADE or JOOB

This article is intended to advise JADE/JOOB users of considerations for hosting applications or services within an IIS environment.
In particular those solutions with one or more of the following requirements:
  • Long running requests/operations
  • Reliance on a consistently warm node cache for performance and scalability
  • Reliance on session state between requests
If your application does not have a heavy reliance on application state or cache within the IIS processes then this article may not be relevant to you.

When designing applications that are to be hosted in IIS, careful consideration must be given to how IIS works.

We recommended that you read the following article by Microsoft on Internet Information Services Hosting Best Practices: http://msdn.microsoft.com/en-us/library/aa751802.aspx

It states:
State Management and Process Recycling

The IIS hosting environment is optimized for services that do not maintain local state in memory. IIS recycles the host process (w3wp.exe) in response to a variety of external and internal events, causing any volatile state stored exclusively in memory to be lost. Services hosted in IIS should store their state external to the process (for example, in a database) or in an in-memory cache that can easily be re-created if an application recycle event occurs.

Design consideration needs to be given to the fact that the worker process is restarted regularly and for different reasons. Otherwise you can encounter problems such as the loss of state variables and performance issues from continually having a cold cache.


How does this relate to applications that connect to JADE or JOOB?

Where your solution will have a reliance on a JADE or JOOB database node being maintained across sessions and/or a warm node cache you should consider hosting the node within another non IIS process.

One strategy to introduce this separation would be to split the existing IIS hosted application logic into two tiers:
  • IIS hosted application or service that receive and broker the requests
  • A non IIS hosted application or service containing business and database access logic
By introducing this separation, the solution will sustain routinely cycled IIS processes without adversely impacting performance and efficiency gains from maintaining a re usable database node and cache.


So what can I do if I already have a JADE or JOOB node hosted in IIS?

Our recommendation is that you plan to migrate to the tiered approach described earlier in this document. In the meantime you could attempt to minimise the side effects.

The following two pages cover in good detail factors that influence the cycling of the worker process. The former covers in detail how you can use the Health Monitoring Events feature in ASP.NET 2.0 to capture information relating to the cycle, such as the cause.

ASP.NET Case Study: Lost session variables and appdomain recycles
http://blogs.msdn.com/b/tess/archive/20 ... ycles.aspx

Recycling Settings for an Application Pool <recycling>
http://www.iis.net/ConfigReference/syst ... /recycling
Jade Support
Jade Software Corporation Ltd

Email: jadesupport@jadeworld.com
Web: http://www.jadeworld.com

Jade Software – complex business problems solved beautifully.

Return to “Jade Support Bulletins”

Who is online

Users browsing this forum: No registered users and 6 guests