Browse by Tags
All Tags »
WCF (
RSS)
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...
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...
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...
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...
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...
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...