Tech Brief

Distributed Cache for .NET

Microsoft adds velocity to data-driven apps.

Microsoft has unveiled a distributed in-memory application cache platform it says will boost the performance and scalability of .NET apps. The company describes the server -- dubbed Project "Velocity" -- as the latest component of its Data Platform vision for developers, joining other key technologies such as SQL Server, LINQ, ADO.NET Data Services and the ADO.NET Entity Data Framework.

Velocity will let developers provide access to data from multiple tiers of enterprise and Web application infrastructures from any client system, whether that system is connected or offline. An in-memory application cache will serve to ease the development of high-performance applications.

Key to boosting performance in Velocity is an ASP.NET session provider object, which allows objects to be stored in the cache rather than requiring that they be written into a database management system, according to Microsoft. When a shop has a very large number of ADO.NET applications -- such as ASP.NET applications -- reading the same SQL Server, that leads to bottlenecks, which makes it difficult to scale the state of a session.

"The way we solve this is to use a distributed cache: You keep the session state in the cache, and it can provide a really large-scale place to really hold that session cache," explains Anil Nori, a distinguished engineer in Microsoft's SQL Server group. "Then you can provide better performance and scale."

Microsoft released a community technology preview (CTP) in June and described this new tier of Microsoft's application stack as a platform that scales from tens to hundreds of systems. Currently the company hasn't decided, or at least disclosed, its plans to productize Velocity.

Velocity provides common cache configurations that allow applications to dynamically scale as more nodes are added, and ultimately will provide high availability by offering automatic load balancing.

Microsoft says developers can configure Velocity to run as a network service or embed it within an application. Velocity is based on an architecture Microsoft calls "Explicit Caching," meaning developers must determine specifically which objects to put in or remove from an app. Velocity does not automatically synchronize with source databases, at least in the current CTP.

Tech Brief Architecture
[click image for larger view]

The APIs
The CTP includes a set of APIs that developers can use to build caching services into their .NET applications. Velocity caches any serial Common Language Runtime (CLR) object and provides access to that data via the API set. The three primary programming interfaces are core, item and level APIs, which allow developers to implement a get, put or remove into a data-driven procedure, explains Nori. The other APIs let developers program put-related objects.

"Let's say you have some related objects and that you want them to be together physically on the same memory," says Nori. "You can put them into a region, then you can actually go in and we have a bunch of APIs that operate on the regions. You can go in and enumerate all of the items within a region, remove a region or add a region."

The APIs allow developers to "tag" objects. If a developer has a document object and wants to tag it as a contact document, the tag will classify those elements accordingly.

"As long as you have these tags you can basically do tag-based querying, tag-based retrieval and then tag-based organization," Nori says.

Case for Caching
Microsoft's current thinking is that more and more individuals are accessing data from mobile devices and PCs, and that content typically consists of objects that don't need to be pulled from a database. Velocity brings together memory across multiple systems providing a common cache for applications, which can store serial CLR objects without regard for where they're stored.

Using caches, organizations can scale by simply adding more hardware. A number of vendors have been doing this for some time, including GemStone Systems Inc., GigaSpaces Technologies Inc., ScaleOut Software Inc. and Tangersol, which was acquired by Oracle Corp. last year and is being integrated in the company's Java-based Fusion middleware app stack. All of the major suppliers of system software are expected to jump on the caching bandwagon.

Coming in CTP 2
While the current CTP allows developers to create clusters and supports scalability and performance, Nori says it doesn't support any availability. A second, more fully featured CTP is expected to have more functionality, and it will round out all of the utilities necessary for loading the caches, high availability and better integration for manageability, according to Nori.

Microsoft is targeting CTP 2 to be released at the Professional Developers Conference in Los Angeles this October, followed by a commercial release in the second half of next year.

It's unclear how Microsoft will productize Project Velocity -- whether it will be an OEM-only product for hardware suppliers, a standalone offering or bundled with other Microsoft software.

"We haven't figured out what is a long-term set of facilities, but one thing we feel strongly is that it's aligned with the .NET stack rather than SQL Server," Nori says.

About the Author

Jeffrey Schwartz is editor of Redmond magazine and also covers cloud computing for Virtualization Review's Cloud Report. In addition, he writes the Channeling the Cloud column for Redmond Channel Partner. Follow him on Twitter @JeffreySchwartz.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube