DOL – Delete Oldest Logs

This is a little program I made some time ago because I had some problems with some log files I generated. I didn’t know how big they would end up and I had a limited disk space. As you can guess, it can be used for any files. So I could have called it “DOF * Delete Oldest Files”. The idea of this tiny .Net program is to delete the oldest logs first. It scans every files and delete as many files as required to reach its objectives. ...

February 25, 2009 · Florent Clairambault

Improving .NET Network Performance with Kernel Events

I recently rebuilt our TCP/UDP network server library to handle high-load scenarios. The initial thread-per-client approach worked but hit memory limits at around 3,000 simultaneous connections. The solution? Kernel events. Using IOCP (Windows), epoll (Linux), and kqueue (FreeBSD), we let the kernel notify our program when new data arrives instead of polling. With a 128-byte pre-allocated buffer and some BeginReceive calls, the changes were minimal. The results exceeded expectations: from a 10,000 connection target, we achieved 60,000 simultaneous connections with near-zero CPU usage and instant response times. This proves Mono/.NET’s capability for high-performance network servers. ...

November 2, 2008 · Florent Clairambault

MapPoint WebService authentification with Mono

When migrating a MapPoint WebService application from Windows to Mono/Linux, I encountered “401 Unauthorized” errors. Network analysis revealed slight differences in HTTP headers. Here’s the solution using specific credential handling: var cred = new System.Net.NetworkCredential("---user---", "---password---"); _credCache = new CredentialCache(); _credCache.Add( new Uri( "http://findv3.staging.mappoint.net" ), "Digest", cred ); _finder = new FindServiceSoap(); _finder.Credentials = _credCache; _finder.PreAuthenticate = true;

May 19, 2008 · Florent Clairambault