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 Dec 19, 2007
Daniel Moth has released four videos on Parallel Extensions for .NET. These cover the new declarative, imperative, and task-based parallelism APIs for the .NET framework.
The first video is a brief overview of the architecture and touches on some of the examples. While these examples are in VB and C#, they can be used in any .NET language.
In the second video, PLINQ is introduced. PLINQ is a declarative model for performing data parallel queries against XML and in-memory objects. Requiring trivial code changes to use, PLINQ is by far the easiest way to leverage multiple cores in .NET.
Just as LINQ is constructed as a set of extension methods on IEnumerable, PLINQ is a set of extension methods on IParallelEnumerable. These extensions mirror all of the methods in LINQ in name as function signature. To convert an IEnumerable to an IParallelEnumerable, simply call IEnumerable.AsParallel.
If needed, control over the parallelism is also done declaratively. Options such as preserving the original ordering and the number of threads used may be passed into the AsParallel method.
The type of parallelism used is also influenced by how the query is processed. If you call ToList on the query, all threads will be allocated to processing the query. Only once the entire job is complete will the main thread resume. This is known as "Stop and Go" processing.
If, on the other hand, you do a for-each loop against the query a completely different model is used. In this model, called Pipelining, the main thread is used to loop through the results as they are produced by the other threads. This model gives you access to the intermediate results, which is great when you want to flow data to a socket or file system. But if you are completely CPU bound, this may be slower than stop and go.
The final method is inverted enumeration. A new method called ForAll allows each thread to call a delegate directly against each item. Since you do not have to wait for a list to be generated (stop and go) or allocate a thread to processing the loop (pipelining), this can be the most efficient method.
The third video is on imperative parallelism. Imperative parallelism is based on parallel versions of Do, For, and For-Each. These all accept a delegate, usually in the form of an anonymous method. Since VB does not support multiline anonymous methods, C# has a definite advantage here.
On the surface this feels a lot like the OpenMP library used by Fortran and C programmers on supercomputers. However, it uses closures and thread local storage to distinguish between shared and isolated variables.
The fourth video is on the core of Parallel Extensions, the Task Parallel Library. The Task Parallel Library, or TPL, is essentially an advanced version of the .NET thread pool. Like a thread pool, the TPL can perform load balancing across threads and processors. Unlike the thread pool, the TPL has a rich API that supports many of the concepts exposed by the Thread class.
The TPL also has a new set of features not seen in either threads or thread pools. For example, Tasks have a safe Cancel method. Unlike Thread.Abort, this will not simply kill the job passed into the Task. If the job has not been assigned to a thread, it will simply never start. Otherwise, the job needs to periodically check the Task.IsCancelled property.
Cancelation can also flow to child tasks. Currently this does not happen by default, but the team is interested in what the community thinks the default should be.
Visual Studio vNext: ALM features for Agile Planning, Team Collaboration
Automating Error Reporting for .NET Applications
RDBMS to NoSQL: Managing the Transition
Troubleshoot Java/.NET performance while getting full visibility in production
Tutorial: Integrating SQLFire with tc Server and Spring Data
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