Book Image

Microsoft Windows Server AppFabric Cookbook

Book Image

Microsoft Windows Server AppFabric Cookbook

Overview of this book

Windows Server AppFabric provides a set of integrated capabilities that extend IIS and the Windows Server platform making it easier to build, scale and manage composite applications today. Windows Server AppFabric delivers the first wave of innovation within an exciting new middleware paradigm which brings performance, scalability and enhanced management capabilities to the platform for applications built on the .NET Framework using Windows Communication Foundation and Windows Workflow Foundation.'Microsoft Windows Server AppFabric Cookbook' shows you how to get the most from WCF and WF services using Windows Server AppFabric leveraging the capabilities for building composite solutions on the .NET platform. Packed with over 60 task-based and immediately reusable recipes, 'Microsoft Windows Server AppFabric Cookbook' starts by showing you how to set up your development environment to start using Windows Server AppFabric quickly. The book then moves on to provide comprehensive coverage of the most important capabilities provided by Windows Server AppFabric, diving right in to hands-on topics such as deploying WCF and WF applications to Windows Server AppFabric and leveraging the distributed caching, scalable hosting, persistence, monitoring and management capabilities that Windows Server AppFabric has to offer, with recipes covering a full spectrum of complexity from simple to intermediate and advanced.
Table of Contents (16 chapters)
Microsoft Windows Server AppFabric Cookbook
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface

Installing Cache Client Assemblies


For non-production/client environments, we do not need to install the complete Windows Server AppFabric. Instead, we can use Client Assemblies to connect to an instance of AppFabric. In this recipe, we will see how to set up a Client Machine that can connect to and communicate with Windows Server AppFabric. Once we have set up the Client Assemblies, then we can use Visual Studio, for example, to write applications that can use Windows Server AppFabric Caching capabilities.

Note

Cache Client, as the name implies, refers to the applications or services that can access and modify cached items by connecting to a configured or specified cache cluster.

Getting ready

To set up the Cache Client, you will need the following assemblies:

  • Microsoft.ApplicationServer.Caching.Core.dll

  • Microsoft.ApplicationServer.Caching.Client.dll

  • Microsoft.WindowsFabric.Common.dll

  • Microsoft.WindowsFabric.Data.Common.dll

Note

For the Windows Server AppFabric Caching Client to be able connect to the Windows Server AppFabric Caching Service, it is required that Client Binaries are of the same version number as that of the Cache Service.

How to do it...

Setting up the Client Caching environment is a very simple task; it is just a matter of copying the binaries highlighted at the start of the recipe to a particular location. These binaries can be obtained by installing Windows Server AppFabric on a workstation. You will need the Caching feature installation to get the required Caching binaries. The default location for these assemblies is .\Windows\System32\AppFabric:

  1. 1. On Windows 7, type C:\Windows\System32\AppFabric in the custom menu; you should be able to see a number of binaries and the configuration file:

  2. 2. Obtain the following assemblies from the Windows Server AppFabric Cache installation:

    • Microsoft.ApplicationServer.Caching.Core.dll

    • Microsoft.ApplicationServer.Caching.Client.dll

    • Microsoft.WindowsFabric.Common.dll

    • Microsoft.WindowsFabric.Data.Common.dll

  3. 3. Copy the assemblies mentioned in step 2 to a place where they are available under a known path to your Client application.

Note

To cache-enable an application server, you will need to install the Windows Server AppFabric Caching Assemblies on it. It is as simple as having an application/service installed on the server along with the AppFabric Caching assemblies. As long as your application installation copies the AppFabric Cache Assemblies and has a valid configuration in place, your application server is Cache enabled.

How it works...

The Windows Server AppFabric Caching Client application requires an API to talk to the Caching Service. This API (provided as a set of assemblies highlighted earlier in this recipe) must be available for the client to program against it. By copying these assemblies on the client machine, we ensure that the client does not need to do a complete installation of Windows Server AppFabric.

Once the Client Assemblies are available, we can write applications that can use AppFabric's Caching capabilities and connect to the AppFabric Caching cluster.