Limiting the number of outgoing SOAP web service calls

If you create a web app, which consume information from other web services, you eventually need a possibility to control the number of outgoing SOAP web requests. On the one hand, the default maximum number of connections is 2, which could be a performance bottleneck. On the other hand, if you call another web service too intense, you may be banned there either technically (by a firewall or Windows server itself detecting DOS attack) or manually by a server administrator.
 
You can set the number of connections so:
ServicePointManager.DefaultConnectionLimit = 25
 
or so:

ServiceReference1.BackendServiceSoapClient cl = new BackendServiceSoapClient();
ServicePoint p = ServicePointManager.FindServicePoint(cl.Endpoint.Address.Uri);
p.ConnectionLimit = 20000;

You can tell how many connections are open so:

p.CurrentConnections

One interestring point it that although .NET uses background threads to handle connections, the number of threads doesn’t correspond to the number of opened connections. For example, when I set the limit to 20000, I actually see 20000 opened TCP connections in the performance monitor, but only 18 running threads. Does anybody have any info about how it works?

Make Object ID

The biggest problems Microsoft has with their products and tools is that they hide intersting features. Under “hide” I understand here failure to communicate, advertise or evangelize the features to the public.
 
For example, did you know, that you can install any module of Vista in the command line. There is now a command line package manager, similar to those we know from Linux (aptget etc).
 
Did you know what Vista is a DVR with time shift function – and this is for free?
 
Did you know there is the HttpListener class (since WinXP SP2) allowing you to create your own simple web server without needing to install and configure IIS (can be handy if you develop an installable client side software and do not want to have users to install IIS for it).
 
And todays example is the Make Object ID menu in the Visual Studio debugger. You can mark any object with and ID during debugging, so if you have problems understanding if you have the identical object on several place of your code, or just copies, you need this feature badly (before, I had to use GetHashCode() for that).

Open Space Rant

I’m a strong proponent of the open space office concept. I need this empowering feeling emerging from several people actively working at the same time in the same place on similar problems. How wonderful is that to hear someone being thrilled with some very good news about a complicated project! You can share his happiness.
 
And you get your daily news for free, just hearing what others are saying. And if you have something to share, or to ask, all that you need is just rise your head and look at your collegue.
 
There are two killers of this great office concept. When it is too loud and when it is too quiet.
 
In a too loud environment you cannot concentrate on your task. But this is not I personally find a very bad thing: if you really have to concentrate on something for a long time, it is a sign you’re doing something overcomplicated, which is a bad sign indeed. And for short concentration periods you can use the time in the early morning or in the late evening.
 
On the other hand, quietness builds a virtual wall in the office, preventing you asking or telling something just “at will”. Therefore, some companies play an ambient background music in their offices, preventing building the virtual wall.
 
But the thing I hate most is when people speak so quiet with each other, that I can still know they’re speaking, but cannot hear, what exactly is being told. I’d almost say it is malicious against all other office inhabitants. Okay, sometimes there are things that have to be said privately. In this case, using the meeting room could be an appropriate solution. But, generally, what’s the point of discussing something secretly in sight of a dozen collegues?

Change happens

When I’ve got my firt box of visit cards, the first thought was “what a waste, I’ll never gonna need it”. Really, in the world, when you’re trying to hide and protect your email address from spammers as good as possible, the idea of giving out your contact informations to unknown people seemed ridiculous to me.
 
Nevertheless, I took several visit cards and placed them into my moneybag. Just in case. When you’re in a bank asking for conditions, it can help giving them your VC stating you’re a project manager :) And if an accident happened to me, the police would know where to call…
 
Yesterday, I had been yet again on a customer workshop. There were three other persons in the meeting, with whom I’m going to work in the future. So I wanted to get their contact info. I’m opening my moneybag and, what a shock, I’m realizing there are only two visit cards left!
 
Others are already gone on different workshops I had since the beginning of this year, and I never updated the “cache”, because I initially thought it will last forever…
 
Now I’m trying to understand if it is a good or a bad change.