NCache

Develop High-performance .NET Applications Effectively Under a Secured Environment

Anand Narayanaswamy

October 30, 2009

5 Min Read
ITPro Today logo in a gray background | ITPro Today

asp:review

 

NCache

Develop High-performance .NET Applications Effectively Undera Secured Environment

 

By Anand Narayanaswamy

 

Millions of people browse millions of Web sites everysecond. But it takes some time to get data from the server to the client when requestsfor Web pages are made. This will eventually slow down a Web server if asubstantial amount of visitors browse the same site at the same time. Moreover,the performance of the Web site will be greatly affected if a large amount ofdata is being fetched from databases, such as Microsoft Access, SQL Server,etc. To a great extent, these difficulties can be reduced with the help of atechnique called caching. Caching enables us to store Web pages and informationon the client s computer so that it can be retrieved without much time spent ata later stage. This will not only increase the speed of the application, but itwill also avoid round trips to the server each time a specific page isrequested.

 

The built-in caching techniques provided by the .NETFramework are suitable for small-scale applications without much load. But ifthe size of your application becomes larger and requires fetching of a largeamount of data from the database server, access to Web services, etc., then youneed to think about increasing the performance of your application with thehelp of third-party components.

 

Enter NCache, a high-performance in-memory object cachingsolution for mission-critical .NET applications with real-time data accessneeds. Developed by AlachiSoft, NCache boosts the performance of .NETapplications by not only caching read-only data, but also caching complextransactional data with relationships. The main purpose of NCache is to improvethe performance of .NET applications by avoiding frequent access to databaseservers, Web services, and other systems across the network. The main benefit Inoticed while working with this product is that it provides excellent scalableperformance, transparent and complete failover, and failback protection.

 

Before downloading the product you must complete a simpleregistration process; the required product key will then be e-mailed to you. Idownloaded the Clustered edition of the product within two minutes using a high-speedbroadband connection. The installation process took another two minutes on amachine with 512 MB RAM.

 

One of the main features of this product is that itsupports all three kinds of operations: read-through, write-through, andwrite-behind. NCache also automatically sends notifications asynchronously tothe client applications throughout the cluster. It also handles objectrelationship through intelligent dependency management; for more details visit http://www.alachisoft.com/ncache/intelligent_cache.html.

 

NCache ships with a rich set of features, such asfixed-time and idle-time expiration of cached data, Least-Recently-Used (LRU),Least-Frequently-Used (LFU), priority-based eviction policies, and intelligentrelationship management through file- and key-based dependencies. A mainadvantage of this product is that it ships with a common API for both local andclustered environments, which will certainly help you reduce the learning curveif you want to explore this product in detail.

 

The NCache API is the core part of the product, whileNCache Service and NCache Manager Application provide the facility to createclusters and caches. These utilities are automatically installed at the time ofsetup. The API provides all the functionality to incorporate various user needsassociated with caching. You can open the NCache Manager directly from the Startmenu; see Figure 1 to see what it looks like.

 


Figure 1: Open the NCache Managerdirectly from the Start menu.

 

You must follow certain steps to get started with theproduct. First, create a new ASP.NET project and add reference toAlachisoft.NCache.Web. You need to import the Alachisoft.NCache.Web.Cachingnamespace into your application and inherit Alachisoft.NCache.Web.UI.NPage insteadof System.Web.UI.Page. The next step is to initialize the cache in your Webapplication, as shown here:

 

NCache.InitializeCache(txtCacheID)

 

You are now ready to use the cache in your application,and you can easily add, remove, and fetch the items from the cache. The productcomes with a sample tutorial application that will explain the above scenarioin detail. The product also ships with a utility called Keep Alive, which willautomatically send an http request to the specified URL after the specific timeinterval. It also ensures that your application never times out by keeping thesessions active.

 

The product ships with sample applications, such as Chatand Guess Game, which you can explore from the Start menu. Unfortunately, Ifound that the vendor didn t implement validation rules for the sampleapplications. The application returned a run-time error when I tried to executeGuess Game without entering any data in the textbox. I hope the vendor will fixthese issues during the next release of the product. I am pleased to report,however, that AlachiSoft provided excellent support for all the issues withinone day of reporting the problems.

 

The product comes with complete source code and VisualStudio project files for all the sample applications. The product also shipswith detailed documentation in HTML format, which you can also locate from the Startmenu. The documentation provides comprehensive coverage about hardware andsoftware requirements for working with the product, information about clusters,incorporating cache into your ASP.NET applications, and much more. It alsoprovides help for the sample applications that ship with the product. I would liketo see AlachiSoft integrate the documentation with Visual Studio.NET so thatdevelopers can easily access the help system while developing applications.

 

I would also like to see AlachiSoft provide support forthe .NET Framework 2.0 in the next release of this product. NCache provides thenecessary background for performing all the required tasks for the purpose ofcaching and it is up to you to effectively make use of it in your .NETapplications.

 

NCache comes in two editions, Local and Clustered. TheLocal edition only supports local caches; the Clustered edition providessupport for replicated and partitioned caches. A trial version of the productcan be downloaded from the AlachiSoft Web site. It will be fully active for twofull months; after that you can purchase the product directly from the vendor. Thepricing of NCache is a little high, but you ll find real use of this product ifyou are developing large and critical .NET applications.

 

Anand Narayanaswamy,a Microsoft Most Valuable Professional (MVP), works as an independentconsultant and runs NetAns Technologies (http://www.netans.com),which provides Web hosting services based in Trivandrum, India. NetAns is thewinner of the Business Techguru contest conducted by Microsoft Small BusinessCentre. Anand also works as an editor for ASPAlliance. Find out more about himat http://www.visualanand.net ore-mail him at mailto:[email protected].

 

Rating:

Web Site: http://www.alachisoft.com

Price: Local, US$995;Clustered, US$2,495

 

 

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like