Cloud Foundry: Design and Architecture
Derek Collison discusses the goals, the design premises and patterns employed in creating the architecture of Cloud Foundry, VMware’s open source PaaS, unveiling internal architectural details.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Jonathan Allen on Nov 30, 2011
When it comes to performance few techniques are as effective as full page caching. When one can completely eliminate external databases from the equation performance often becomes simply a question of how fast one’s Internet connection is. Unfortunately there are usually a couple bits of information, sometimes just the user’s name, which precludes the use of a full page cache. This is where techniques known as partial caching come into play.
Partial caching is often divided into two categories, “donut caching” and “donut hole caching”. We’ll illustrate the difference using ASP.NET Web Forms.
With donut hole caching one is caching bits and pieces of a website. In Web Forms it requires refactoring the page so that reusable content is physically separated from user-specific content via controls. Once that is done one can use caching directives on the individual controls. Unfortunately this greatly restricts the way the designer lays out the page.
With donut caching the entire page is cached except for specific “holes” that will be filled in later. In Web Forms 2.0 and later these holes are known as substitution blocks. A substitution block is implemented as special control that is excluded from the otherwise fully cached page. A static callback is then used to fill out the block at runtime. Scott Guthrie offers an example:
Shared Function LoginText(ByVal Context As HttpContext) As String
Return "Hello " & Context.User.Identity.Name
End Function
Until fairly recently ASP.NET MVC didn’t support any form of partial caching. The best one could do is include a AJAX call that would request some cached JSON or HTML data to be reassembled in the browser. But starting with MVC 3, released back in January, one can cache the result of child actions called from the parent view. Invoked using Html.Action or Html.RenderAction, these resemble control-level caching from Web Forms. There are some limitations for partial view caching, summarized by Paul Hiles as:
Just as troubling is the complete lack of support for donut caching and substitution blocks. Since it isn’t currently on the roadmap for ASP.NET MVC 4, Paul is offering the open source project MvcDonutCaching. This extension is based on an ActionFilterAttribute that will “serialize the action arguments and return an html comment containing the arguments”.
This isn’t a perfect solution, at runtime it has to parse the cached output looking for the aforementioned HTML comments using a regular expression. Once found the associated Html.Action is invoked and the comment replaced with the user-specific content.
MvcDonutCaching actually appears to be easier to use than Web Forms substitution blocks. Presumably one is already using child actions for user-specific content, so turning on partial caching can be as simple as tagging the main view and switching to a new overload for Html.Action that includes an excludeFromParentCache attribute.
RDBMS to NoSQL: Managing the Transition
Troubleshoot Java/.NET performance while getting full visibility in production
Automating Error Reporting for .NET Applications
Visual Studio vNext: ALM features for Agile Planning, Team Collaboration
The WebSphere Liberty Profile for Developers: An Introduction
Derek Collison discusses the goals, the design premises and patterns employed in creating the architecture of Cloud Foundry, VMware’s open source PaaS, unveiling internal architectural details.
Andrew Watson talks about the work of the OMG, where CORBA is alive and well (hint: in your car), UML and UML Profiles vs. custom Modeling languages, DDS and other middleware, and much more.
Sohil Shah discusses creating iPhone and Android enterprise mobile applications based on cloud services using the open source platform OpenMobster.
Paul Sanford presents the transformations supported by data throughout its life cycle, and how that can be better done with Splunk, an engine for monitoring and analyzing machine-generated data.
A common “best practice” for unit tests is to only write a one assertion in each test. I intend to question this advice by showing that multiple assertions per test are both necessary and beneficial.
John Rauser presents the architectural and technological evolution of Amazon retail websites starting with 1994 and ending with adopting Amazon Web Services.
Michael Stal discusses system architecture quality, how to avoid architectural erosion, how to deal with refactoring, and design principles for architecture evolution.
Every developer has had to integrate with another system, API or component. Tis article provides strategies to handle the change and for he separating system boundaries.
No comments
Watch Thread Reply