Wortzel's blog

.Net (2.0, 3.0, 3.5), C#, Asp.net, Com+, GIS(ESRI Software), Management, Analysis & Design, Life, Trips, And more...

Browse by Tags

All Tags » WCF (RSS)
Pushing vs. Pulling
Few months ago I heard a lecture about "Velocity", in the begging of the lecture the lecturer asked the audience the next question: "Assume that you have a client which needs to communicate with a server, what is the best communication pattern to work with, pushing or pooling?" 99% of the audience voted for the pushing. It was a tricky question with a tricky answer – it depends. I'll explain these two methods for all of those who aren't familiar with them. Pushing – in...

Posted Friday, June 12, 2009 3:18 PM by Avi Wortzel | with no comments

תגים:, ,

Wcf configuration - Throttling settings
In my pervious post I explained how to define the wcf service concurrency and instance context modes. In this post I will show you how to control these specific numbers (number of calls and number of instances). In wcf you can set these values using throttling settings. Like all other wcf configuration you can set it by using a configuration file or to implement it directly in your source code. The throttling configuration contains three elements: 1. maxConcurrentCalls [default: 16]: Refer to the...

Posted Tuesday, May 12, 2009 12:56 AM by Avi Wortzel | 1 comment(s)

תגים:,

Wcf configuration - InstanceContextMode and ConcurrencyMode
Two of the important configuration settings in WCF refer to InstanceContextMode and ConcurrencyMode. These two are very important to control the system resources in your live service. The first (InstanceContextMode) controls the number of instances for your service. In this case you have three options: Single - Creates only one service instance in the system. PerSession (default value) – Create a new service instance per session. PerCall – Creates a new service instance per call. The second (ConcurrencyMode...

Posted Saturday, March 07, 2009 8:52 PM by Avi Wortzel | 2 comment(s)

תגים:,

Wcf services – advanced NetTpcBinding configuration
In our application we chose WCF as a primary communication component. WCF provide several binding protocols and each one of them had its cons and pros. In our system we needed a high performance communication between several servers, it was the reason we used the WCF with NetTcpBinding. If you want to maximize your system utilization and having a better control on your services, you should make some fine tuning in the NetPctBinding. The default configurations for this binding are good for some classic...

Posted Saturday, March 07, 2009 8:50 PM by Avi Wortzel | with no comments

תגים:,

Single service handler with multiple contracts
During the previous week Rami (my teammate) and I had an interesting problem. We had to develop two WCF services with some shared collection. One of the solutions we had was to store this collection as a static collection, and then each one of them will be able to get it. But we found a better solution. We created only one service handler class which implements the both contract interface at the same time. At the beginning we weren’t sure that this idea can be implemented, surprisingly it worked...

Posted Tuesday, December 09, 2008 5:40 PM by Avi Wortzel | with no comments

תגים:,

Host multiple services in windows service (on-line WCF services and batch services)
In the last sprint we ( Ori – my teammate and me) had a task to create an infrastructure to manage some common processes in our systems. The processes can be a batch, schedule tasks and on-line services (WCF). Let see some of our processes: We have a background process (aka "Directory monitoring") which monitors a specific directory in predefined interval and checks for new incoming files. When a new file arrives, the process wakes-up and checks the file name by regular expression. Then...

Posted Friday, December 14, 2007 2:51 PM by Avi Wortzel | 2 comment(s)