The previous code name for Microsoft Windows Server AppFabric was "Velocity", which provides a decentralized cache that can be integrated into WEB applications and desktop applications. AppFabric can improve performance, scalability, and availability, and from a developer's point of view, it behaves like a normal memory cache. Any serializable object can be cached, such as datasets, DataTable, binary data, XML, custom entities, and data transfer objects.
The AppFabric Client API is simple to use, and the server API has a fully functional distributed Resource Manager (DRM) that manages one or more cache servers (multiple servers form a cache cluster). Each server will provide its own share of memory, performing its own object serialization and transmission, area grouping, label based search, and expiration shutdown. The caching server also supports high availability, which enables you to create copies of objects on the standby server.
The June 2009 issue of MSDN Magazine contains a wonderful introduction to Windows Server AppFabric, the author of Aaron Dunnington (msdn.microsoft.com/magazine/dd861287). In this article, I'll show you how to integrate the AppFabric cache into your desktop and WEB applications. At the same time, I'll provide some best practices and tips on how to take advantage of the new features in Microsoft. NET Framework 4 and asp.net 4. You can also learn how to troubleshoot problems that are common when using distributed caching.
All the code examples that follow come from a complete demo solution called Velocity Shop, which can be obtained from Codeplex on the website: velocityshop.codeplex.com.
Note that the Windows Server AppFabric that you will discuss in this article differs from the Windows Azure platform AppFabric. For more information about Windows Azure technology, see Microsoft.com/windowsazure/appfabric.
Entry
The current Windows Server AppFabric Beta 2 Refresh can be installed in several ways for development. With Web Platform Installer (microsoft.com/web/downloads), you can easily install a variety of web development applications and frameworks with a configurable installation package. Not only that, the Web Platform Installer is also updated to include newly released supported applications and frameworks.
If you only want to install AppFabric, you can access the Windows Server Developer Center's AppFabric page, which contains a link to the latest release. The URL of this page is: msdn.microsoft.com/windowsserver/ee695849.
The AppFabric cache is almost ready to use when the installer is finished. The next step is to create a named cache, a logical container for storing data. You can do this through the New-cache cmdlet in Windows PowerShell:
New-Cache -cacheName Catalog
To start using the AppFabric cache in your application, simply add the CacheBaseLibrary.dll, CASBase.dll, CASMain.dll, and ClientLibrary.dll to the Visual Studio project can be referred to.