Category: WCF


WCF Everywhere? Worth some consideration

December 30th, 2007 — 11:31 am

Sadly I missed Juval Lowy’s WCF lecture last Thursday, but I read Udi Dahan’s blog post regarding the lecture.
It seems Juval is preaching the use of WCF for every inter-class operation, even on the same computer, as WCF is better designed than plain code, and Udi objects to the idea due to possible performance consequences.
One of the main reasons for Udi’s objection was a demo Juval ran in which the communication output was 200 calls per second - not very high.
But as someone else already commented, this was done using security, encryption, exception handling and other “services” which are not necessarily present in day-to-day inner-process method calls.
This also lead me to search for again benchmarks for WCF, and it turns out you can reach more than 5000 calls per second with it.

So use WCF for every inter-class operation? I think not, since it basically break your entire code to services, and SOA requires careful planning.
On the other hand, I would use WCF for every cross-process operation, both local and remote.

Comment » | WCF

Blondes have more WCF

October 21st, 2007 — 03:07 pm


I went to a “Fundamentals of WCF Security” lecture by Michele Leroux Bustamante (dasBlonde) from IDesign, which came after a full day seminar given by her at Microsoft Israel.

Michele is an IDesign Chief Architect, Microsoft Regional Director for San Diego, Microsoft MVP for Connected Systems and hold a long list of additional titles. She specializes in training, mentoring and high-end architecture consulting services focusing on scalable and secure architecture design for .NET, federated security scenarios, web services, interoperability and globalization architecture.

The event was a joint venture of 3 user groups, and attracted many participants - so many the organizers had actually to dismantle the wall separating two lecture halls and merge them into one.

The event started a bit late due to traffic, and than about an hour of WCF fundamentals due to request from half of the audience. Personally I think it was unnecessary, since I suspect this intro was too complex (too fast compared to the normal “ABC” approach) for people with no WCF knowledge, and boring for those with prior knowledge.

The main part involved covering security principles, different approaches and the cost for each of them, and many hands-on samples, and was much more interesting. It was also followed by a short Q&A session, but the audience was exhausted at this point (unlike the speaker - incredible energy), so not many questions were asked.

I recommend listening to her 15-parts webcast series, and you can find the code/slides from the lecture here.

My favourite quote: “I don’t blog very often, I’m not Scott Hanselman“.

Comment » | Events, WCF

WCF concurrency, throughput and throttling

August 20th, 2007 — 02:24 pm

Michele Leroux Bustamante (aka “Das Blonde”) wrote a great post on WCF callback scenarios:

Callback Sync

Context

Callback Concurr. Mode

Service Operation

Callback Operation

Service Concurr.

Mode

Resulting Behavior

True/

False

Single/

Reentrant/

Multiple

One-way/

Two-way

Two-way

Single

These are defaults. InvalidOperationException

at the service. Operation would deadlock calling the client application since the callback is two-way and reentrancy isn’t possible.

True

Single/

Reentrant/

Multiple

Two-way

Two-way

Reentrant/

Multiple

Service able to call client,

but client is blocked because of outgoing call.

False

Single/

Reentrant/

Multiple

Two-way

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. If client callback object tries to communicate with UI thread (i.e., setting properties of controls)

it will block.

False

Single

One-way

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback

object can communicate with UI thread using Invoke()

from callback thread.

Client can issue multiple calls to service but only one callback can be processed

at a time.

False

Multiple

One-way

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback

object can communicate

with UI thread using Invoke() from callback thread.

Client can issue multiple calls and multiple callbacks can be processed at a time.

False

Multiple

One-way

One-way

Single/

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback

object can communicate

with UI thread using Invoke() from callback thread.

Client can issue multiple calls and multiple callbacks can be processed at a time.

False

Multiple

Two-way/

Multi-threaded Client

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback object can communicate with UI thread using Invoke() from callback thread. Multiple calls from client can be processed at the service, and multiple callbacks can be processed at the client.

False

Multiple

Two-way/

Multi-threaded Client

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback can communicate with UI thread using Invoke() from callback thread. Multiple calls from client can be processed at the service, and multiple callbacks can be processed at the client.

Comment » | WCF

WCF configuration diagram

July 30th, 2007 — 12:31 pm

Thanks to Nicholas Allen’s post

Comment » | WCF

WCF service throttling

June 16th, 2007 — 03:09 pm

Nicholas Allen wrote a post detailing the different throttling parameters for a service:

  • MaxConcurrentCalls limits the number of service calls (messages) that the service will have processing at one time. You may get less than this maximum number if the concurrency or instancing behavior of your service does not allow processing multiple messages.
  • MaxConcurrentSessions limits the number of persistent connections (sessionful channels) that the service will accept messages from at one time. Again, you need a minimum level of concurrency in your service for this to become an issue.
  • MaxConcurrentInstances limits the number of copies of the service (instance contexts) that can exist. This is only interesting if your service is permitted to have multiple instances.

1 comment » | WCF

.Net Ecosystem Visualization

May 2nd, 2007 — 08:07 am

Taken from Scott Hanselman’s blog.

Comment » | Visual Studio, WCF, WPF

WCF performance

April 1st, 2007 — 12:43 am

There is an extensive comparison on MSDN between WCF and other Microsoft communication technologies, and this is the conclusion:

To summarize the results, WCF is 25%-50% faster than ASP.NET Web Services, and approximately 25% faster than .NET Remoting.
Comparison with .NET Enterprise Service is load dependant, as in one case WCF is nearly 100% faster but in another scenario it is nearly 25% slower.
For WSE 2.0/3.0 implementations, migrating them to WCF will obviously provide the most significant performance gains of almost 4x.

You can find the entire comparison here.

Comment » | WCF

« Previous Entries     Next Entries »