Introducing Parallel Extensions to the .NET Framework

There is no escaping from concurrency challenges… or is there? (A slightly modified version of this article was published in the August 2008 edition of the MSDN Flash newsletter) Dual, quad, and eight-core processors are becoming the norm. Is your application capable of utilising all available processors? In order to achieve this level of utilisation…

2

ADO.NET Data Services: CLR-based data models and navigation links

As you are probably aware, one of the new additions to the .NET Framework 3.5 SP1 is a technology called ADO.NET Data Services (code name Astoria). ADO.NET Data Services natively supports ADO.NET Entity Framework (EF) models. However Data Services it is not limited to EF. ADO.NET Data Services can deploy consistent representations of data regardless…

4

.NET debugging made easier

Not sure about you but I was not aware of the existence of the DebuggerStepThroughAttribute. Debugging code can be difficult at times and any tool or mechanism that can ease this pain is always welcome. As far as the CLR is concerned, there is no semantic attached to this attribute. However Visual Studio does not…

16

WebChannelFactory inside a WCF Service

When using a WebChannelFactory inside a WCF service that already has an OperationContext, you may need to create a new context before being able to successfully callout using a channel created by the WebChannelFactory. (Notice the line in bold) public class RelationService : IRelationService {   public Relation[] GetRelations()   {     var factory =…

7

Coordination Data Structures – WriteOnce<T>

This is an article in a series of blog entries describing a set of new Coordination Data Structures (CDS) introduced in the June 2008 CTP of the Parallel Extensions for .NET Framework. In C#, when a field declaration includes a readonly modifier, assignments to the fields introduced by the declaration can only occur as part…

1

Coordination Data Structures – SpinLock

This is an article in a series of blog entries describing a set of new Coordination Data Structures (CDS) introduced in the June 2008 CTP of the Parallel Extensions for .NET Framework. Waiting on locks usually result in a thread context switch and associated kernel transition which at times can be considered costly. On a…

5

Coordination Data Structures – LazyInit<T>

This is an article in a series of blog entries describing a set of new Coordination Data Structures (CDS) introduced in the June 2008 CTP of the Parallel Extensions for .NET Framework. LazyInit<T> provides support for several common patterns of lazy initialization. In here we will explore some of those patterns, but first a point…

2

How to consume REST services with WCF

As you are probably aware by now, Windows Communication Foundation (WCF) 3.5 introduced a new binding called WebHttpBinding to create and to consume REST based services. If you are new to the WCF Web Programming model then see here for more details. There have been many articles and blogs on how to host a RESTful…

30

More on self-replicating tasks

Some more stuff to remember when dealing with self-replicating tasks. (See my earlier post for an introduction to Parallel FX and self-replicating tasks): –          Self-replicating tasks should have an inter-replica communication mechanism for communicating the progress/details of the activity. This depends on what the activity is trying to achieve. See here for an example. –         …

1

WCF error handling and some best practices

I put together the following brief description of WCF Error Handling and some possible best practices for a customer. You may also find it useful:   There are 4 sets of errors that clients can expect:   Invalid configuration: when bindings, behaviors or any other configs are in conflict with some other settings. Communication errors:…

11