Distributed Caching using Enterprise Library Caching Application Block W.O. using database

Topics: Caching Application Block
May 15, 2012 at 5:43 AM

Hi there,

I am a new user of Caching Application Block. What I want is, I want to store the data in another dedicated machine and not in Database (distributed caching without database).

Is there anyway I can achive this?

I can see following options under Backing Stores of Caching Setting of Enterprise Library Configuration Manager:

1) Data Cache Store 2) Custom Cache Store 3) Isolated Storage Cache Store

 

 

Caching Application Block snapshot

As the name says, "Isolated Storage Cache Store" should be the answer to my question. But when I add a Isolated Storage Cache Store, there is no option where I can provide a separate dedicated machine name.

Please anyone guide me how can I provide different dedicated machine name and use that as Isolated Storage Backing Store for distributed cahcing.

 

Thanks,

Suraj

Editor
May 15, 2012 at 7:12 AM

Having a distributed Isolated Storage is not possible.  The purpose of Isolated Storage is to have a local storage that is a sandbox where applications can store local data.

If you wish to use Enterprise Library Caching you would have to write a backing store to handle your custom storage needs.  However, that is probably not the best use of your time.  I would recommend looking at Windows Server Appfabric Caching since it provides a full distributed cache system. 

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 

May 15, 2012 at 8:07 AM

Ohh I see. Thanks for your reply Randylevy. Well, I have done few R&D in App Fabric Caching and what I understood is:

1) App Fabric Opens a port in the machine where it got installed and all the other machine present in the web firm should communicates to the opened port of the machine where app fabric installed (dedicated caching machine) and gets the data.

2) App Fabric is beta release

3) We need atleast Windows 7 or Win 2008 to install App Fabric

4) Is there any other functionality present in App Fabric other than Caching?

Please give input.

 

Many Thanks,

Suraj

Editor
May 15, 2012 at 9:13 AM

If you have questions about App Fabric Caching I recommend posting to their forum: http://social.msdn.microsoft.com/Forums/en-US/velocity.

Here is my understanding:

1) App Fabric Caching uses TCP/IP for communication but supports high availability mode where cache data is not stored on one dedicated machine

2) The current version is 1.1 and does not seem to be a Beta

3) Not necessarily: Windows Server AppFabric can be installed on the following operating systems:   Windows 7, Windows Server 2008 R2, Windows Server 2008 Service Pack 2, Windows Vista Service Pack 2

4) There are also Hosting Features available for WCF and WF

If you want a Microsoft Distributed Cache then App Fabric Caching is the way to go.  There are also various other software options out there as well (e.g. memcached).

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 

May 15, 2012 at 11:13 AM

Thanks a lot Randylevy. Your post helped me a lot.

 

Many Thanks,

Suraj


May 17, 2012 at 9:38 PM

Also, if you're interested in Windows Server AppFabric (very good product BTW), I built some time ago a Cache Manager for it:

http://entlibextensions.codeplex.com/

You can take a look, download the source and see if it satisfies your needs. :-)

HTH.

Kind regards.

May 22, 2012 at 7:10 AM
Edited May 22, 2012 at 7:12 AM

 

May 22, 2012 at 7:11 AM
Edited May 22, 2012 at 7:14 AM
gamosoft wrote:

Also, if you're interested in Windows Server AppFabric (very good product BTW), I built some time ago a Cache Manager for it:

http://entlibextensions.codeplex.com/

You can take a look, download the source and see if it satisfies your needs. :-)

HTH.

Kind regards.

Hi Gamosoft,

Thanks a lot for your reply and the artical was very clear and helped me to integrate Enterprise Library and App Fabric. When I try to implement the same in a dummy project, I found below challenges:

* I copied the EntLibExtensions.dll in the folder "C:\Program Files\Microsoft Enterprise Library 5.0\Bin" But still I am not getting the "Add App Fabric Cache Manager" sub-menu option under the "Enterprise Library Configuration Tool -> Caching Setting -> Cache Managers -> Add Cache Managers" menu. Please guide what I am missing?

* When I run "Start-CacheCluster" command in the Windows Power Shell Module, I got below errors:

PS C:\Program Files\Microsoft Distributed Cache\V1.0> use-cachecluster
PS C:\Program Files\Microsoft Distributed Cache\V1.0> start-cachecluster

HostName : CachePort           Service Name              Service Status
--------------------           ------------              --------------
TCS090914:22233                DistributedCacheService   STARTING
Start-CacheCluster : Could not start cluster : ErrorCode<ERRCAdmin003>:Error: Timeout occured At line:1 char:19
+ start-cachecluster <<<<
+ CategoryInfo          : NotSpecified: (:) [Start-CacheCluster], DataCach eException
+ FullyQualifiedErrorId : ERRCAdmin003,Microsoft.Data.Caching.Commands.StartCacheClusterCommand

Please guide what I am missing here?

 

System Configuration:

.Net Framework: 4.0

OS: Windows XP professional SP3

Enterprise Library Version: 5.0

Since I am using Windows XP, I can't use App Fabric, So I downloaded and Installed Velocity

 

Many Thanks,

Suraj

 

May 22, 2012 at 4:59 PM

Hi Suraj, please have in mind these DLLs were developed to be used with Windows Server AppFabric, so any previous version won't work. However you do have access to the source code (http://entlibextensions.codeplex.com/SourceControl/changeset/view/80745), so I'd recommend you to download it, open the solution, replace the DLLs references and try rebuilding it for you.

Regarding why you don't see the items in the console after copying the DLL to the Enterprise Library binaries folder what I meant is that the tool actually reads the DLLs from the folder it's executing under, so assuming you invoke the EntLibConfig.exe executable under C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin you should place the DLLs there...

Make sure you're also launching the correct (32-64) version of the configuration tool.

HTH.

May 22, 2012 at 6:49 PM

Suraj, an update on my response above, just out of curiosity I downloaded the DLL from the site and it happens as you describe, the caching providers are not shown in the configuration tool under my Windows 7 OS.

However, I tried deploying the same DLL to a VM I work with (which operates Windows Server 2008 R2) and over there I can see the providers coming up in the console ?!?!

I have downloaded the code to my machine, rebuilt it (getting out the SharePoint part). I have even installed AppFabric 1.1 onto my W7 host and it doesn't show up either.

I can however run the cache provider perfectly fine, it works but there's no console integration, I don't know why, because it does show up on the virtual machine...

May 22, 2012 at 7:06 PM

I posted a new discussion here: http://entlib.codeplex.com/discussions/356739

Thank you.

May 22, 2012 at 7:53 PM

And already found the problem. :-)

Sorry for the spam again, but please jump to the thread to see the solution to the issue: http://entlib.codeplex.com/discussions/356739

Kind regards.

May 23, 2012 at 6:40 AM

Thanks a lot for your help Gamosoft.

May 20, 2013 at 10:58 AM
Hi, and thanks for the post.

But what about EF6, Is there any updates for AppFabric Cache Manager for EL6 ?

Thanks
Editor
May 20, 2013 at 4:00 PM
The Caching Application Block has been retired in Enterprise Library 6. Going forward the recommendation for caching in new applications would be, depending on the requirements, to use the .NET 4+ System.Runtime.Caching or Windows Server AppFabric Caching.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to