Posts from 2007
-
:
Back in the UK
Normal service is about to resume… I arrived back in the UK yesterday evening after lots of good skiing in France and Switzerland. Conditions in France could have been better (it’s still best to hire skis or use your rock skis … -
:
Socket Server code: Connection termination race condition bug
I’ve just fixed a problem in The Server Framework that was reported to me by one of my clients. There’s a race condition during connection establishment which can be demonstrated by a client that connects and then terminates the … -
:
Socket Server code: AcceptEx server memory leak
The latest version of The Server Framework contains a memory leak in the CSocketServerEx class. It’s quite a good leak, it leaks an IO buffer on every connection attempt. The fix is as follows: Change this code: void … -
:
Some interesting stuff from Katie Lucas
Here are a few interesting views on software development from Katie Lucas. Via Joel on Software. I especially enjoyed the design methodologies, becoming a manager and “remove developers net access” pieces. -
:
Crapness in mscoree.h
I’m playing around with hosting the CLR in C++ at present and have come across a bit of crapness in the mscoree.h file… #if (_MSC_VER < 1300 || _WIN32_WINNT < 0x0500) typedef VOID ( __stdcall *WAITORTIMERCALLBACK )( PVOID … -
:
Lifetime management issues with CLR hosting
I’m still playing with hosting the CLR in C++ (using “Customizing the Microsoft.NET Framework Common Language Runtime” by Steven Pratschner as my guide)… It’s an interesting journey but, once again, I wonder … -
:
Dino Viehland on CLR hosting
This is mainly a reminder for me so that I can read this when I get back from Jackson Hole… Dino Viehland has written some interesting looking blog posts on how to implement the thread/task and syncrhonisation host managers for a … -
:
Software failures...
I’m in Jackson Hole right now, my skis are still in Denver… Although they’ve replaced the baggage handling system at Denver International Airport since the days of the classic software project failure, it seems that the … -
:
Hmm, is this really a good fix?
Back in July Joe Duffy wrote an interesting piece on the CLR thread pool. I commented on it then, here. He’s now written another piece about why they increased the maximum number of threads in “the thread pool” from 25/cpu … -
:
Yay .Net sockets stuff...
Nice to see that the new beta, sorry, CTP, of the next .Net Framework will increase the performance of .Net sockets by 70%! Way to go .Net dudes…. Interesting to see that it’s a joint effort between the System.Net people (who, … -
:
Bug in my debugger code, and hence also in TickShifter
Back in April 2006 I posted a copy of TickShifter, see here for details. It seems that there was a bug in my Win32 debugger code on which TickShifter is built. The bug was that we failed to “forget about” dlls that were … -
:
UDP Multicast
The Server Framework now includes UDP multicast. There are a couple of new examples; a server that joins a multicast group and a client that sends to a multicast group. -
:
So, what's the difference between the free code and the licensed version?
People often ask me what the difference is between the free code that’s available on this website and the licensed version; this is what I reply… Please note that the most up to date information on the licensed version of our … -
:
Socket Server that hosts the CLR
My investigations into CLR hosting are going well and today I built an echo sever based on The Server Framework and my CLR Hosting helper library. The idea is that the server can deal with the network IO and then hand off the ‘real … -
:
Echoes from the CLR
The work on the CLR hosting socket server example is going pretty well. I now have a server that can pass server notifications to managed code that either runs in an AppDomain per connection or within a single AppDomain (depending on how … -
:
Taking my own advice
I’m in the middle of making some changes to The Server Framework, working through my list of things to do whilst I get my head around my next project; some LSP development… The current change is one that I advised others of … -
:
Go on, tell us why?
It wont come a surprise to anyone who has read this blog for a while that I disagree with much of what Simon Sebright has written about asserts in the latest issue of the ACCU’s Overload magazine… I’ve stated my case far … -
:
Taking more of my own advice...
I’m continuing to work through my list of things to do for The Server Framework (and all the libraries that support it) and I’ve recently got to the ‘set up Doxygen and do a bit of documentation’ item… … -
:
Socket Server code - refactoring
After spending some time cleaning up and refactoring away the need to derive from concrete classes in the Win32 and IO libraries that make up The Server Framework, I finally reached the Socket library and applied the same transformations to … -
:
Cohesive interfaces
Of course, once I’d teased apart the callback interface so that it was separate, clear and easy to use and document I realised that it was, in fact, 3 interfaces all jumbled together. They’re actually quite easy to spot, there … -
:
Filtering and layering functionality onto a TCP byte stream
As I mentioned a while back, the interface that user code had to The Server Framework was somewhat jumbled and, in fact, consisted of three interfaces that were mashed together. I’ve been teasing these apart and in doing so have … -
:
A design that is both too simple and too complex at the same time
Except of course, the refactored filters can’t actually be layered that well using the design that I outlined in the previous blog posting. The main problem, the “too simple” part of the design is that, well, it just … -
:
cvs update -j
I’ve finally got to the point where my latest refactoring of The Server Framework can be merged back to the main development branch. The changes grew from just being a “remove inappropriate use of pointers where references would … -
:
Graceful close bug...
It seems that the latest changes to The Server Framework have managed to flush out a graceful shutdown bug that’s been floating around since day 0. There’s this whole, complex, way of determining how a socket is shutdown and … -
:
UPnP User Interface causes Explorer to hang in My Network Places?
I’ve been having some problems with Explorer hanging when opening “My Network Places” on some of my machines. Some work fine, some hang. Most annoying. I’ve been trying a few things over the past few weeks (as and … -
:
A computer magazine that makes me feel like I used to about programming...
I grabbed a couple of copies of “The NT Insider” from my ’not quite got around to reading’ rack today and read them on the train on the way in to London. These are the quite short, bi-monthly, driver developer and … -
:
I'm with Dennis, and Ian...
Given what Jeff wrote recently and what Ian and Dennis said about it… I’m definitely on the Ian and Dennis side of the fence… -
:
STLPort 5.1.3 and multiple VC versions
I’m just about to try out the latest STLPort release and I went to apply my ‘STLPort 5.0 multiple side by side dlls changes’ from 2005 and noticed that the place where one of the changes needs to be made has changed. The … -
:
x64 Socket Server framework
My new development box arrived last week. It’s a bit of a monster, dual processor (Intel Xeon E5320 quad core, 1.86 GHz), 8GB ram, and it runs 64bit Vista very nicely indeed. Since it’s an x64 box I have started work on porting … -
:
Performance counter installation on Vista
I’ve been aware that there was a ’need to run as Administrator’ issue with some of my server examples for a while; only the ones that installed/removed performance counter dlls or installed/removed themselves as Windows … -
:
IPv6 support - in anger...
Whilst The Server Framework has supported IPv6 for a while now I haven’t really used the functionality a great deal. My previous development box didn’t have IPv6 installed and so I never really got around to playing with it. … -
:
x64 port - a diversion
The x64 port of The Server Framework is going well. I’ve run the tests for the OpenSSL servers and things are looking good there; this is always an important stage to get to for me as these servers and their tests really thrash the … -
:
Pluggable log systems
In the past I’ve mentioned my lack of enthusiasm for the normal ‘debug trace’ files that some systems seem to include… I pretty much consider them a design smell… But, some of my clients seem to like them and … -
:
Reliable UDP
I’ve been doing some work for a client on their reliable UDP implementation. It’s been interesting stuff. They had picked out a ‘best of breed’ open source, reliable UDP protocol implementation (ENet) which was in … -
:
Fixing my performance counter library for Vista
So, back in June I discovered that my performance counter library code didn’t work on my new Vista x64 development box… The problem seems to be that the code has always been doing things in an undocumented/unsupported way and … -
:
CreateFileMapping, Vista, Global namespace, SeCreateGlobalPrivilege...
I’m fixing up my performance monitoring code and this uses shared memory to communicate between the perfmon extension DLL and the application. Since I’m tightening up security I decided to explicitly pass in the security … -
:
Performance counter rewrite almost complete
Around a week ago I started looking at rewriting my performance counter library so that it worked on Vista. That work is almost complete and I’m at the stage where the new library does everything the old one did but there’s a … -
:
Non-trivial...
Charles Miller over at ‘The Fishbowl’ provides a cheat sheet to decode what us programming types mean when we describe the difficulty of solving problems… -
:
Infrant Ready NAS NV+
I’ve been running a pair of 2TB Infrant Ready NAS NV+ RAID systems for a while now as on-site file server and off-site backup and so far I’m very pleased with them. I have one under my desk and one in my dad’s office and … -
:
How to liquidise perfmon's guts but still leave the body standing...
I’m still working on my performance counter library. I’ve got parent and child objects working and multiple instances and I have a sample server that publishes performance data using two objects, one for the executable (io … -
:
VS2005 breakpoint annoyance
My Visual Studio 2005 C++ debugger seems to have stopped doing what VC6 used to do if you placed a breakpoint on a line that didn’t result in executable code… VC6 used to warn you and then move the breakpoint to the next … -
:
Unsequenced socket bug fix
I’ve just fixed a bug in the latest version of The Server Framework (v5.1 - if you dont have docs and a version number then you’re < 5). The probelm was that I was being fractionally over-zealous in making things easy for the … -
:
Sometimes it almost seems that they don't want you to get the code to work...
I’ve spent some time over the last few days playing around with my CLR hosting socket server example. I had stalled on a piece of client work, I’ve got a bit of a head cold at the moment and my brain just wasn’t in the … -
:
Nick Gunn is blogging again...
I used to work with Nick at CSFB and then at Barclays Capital. He’s always been a good, techie, low-level COM/.Net geek and his latest writings on the Microsoft Concurrency and Coordination Runtime are interesting! If you’re … -
:
VS2008 Beta 2 first impressions
I’ve just installed Visual Studio 2008 Beta 2 in a VMWare box so that I can start to test the x64 port of The Server Framework with the new compiler. I haven’t bothered to look into what’s new in the 2008 C++ compiler, … -
:
Hosting .Net takes me back to the 'Good ol' days of COM'
It’s interesting, no, really, how the more things change the more they stay the same… I’ve been doing COM for a long time. I first discovered COM back at Interlink when I was writing a windows version of a product call … -
:
See the 'What About .NET?' sidebar...
Interesting… It seems that rumours of C++’s demise in the brave new world of .Net were slightly over exagerated, perhaps, maybe… From a recent issue of MSDN magazine: “There are two main reasons why this column was … -
:
Where did August and September go?
What with holidays and having my head down doing x64 and CLR hosting stuff for a client it seems that the last month and a half has rushed by… The good news is that the x64 port is slowly slipping out to clients; the bulk of the work … -
:
Spolsky's law stikes again...
I’m finalising the testing of the x64 version of The Server Framework and, since it’s a fairly major release, I figured that it waranted an email to existing customers to see who wanted to have the update shipped to them … -
:
Thirteen Patterns of Programmer Interviews...
Sad but true… The “Typical Programmer” has a piece on Thirteen Patterns of Programmer Inverviews. I think I’ve probably been interviewed in all of these styles over the years and taken part in several of them from … -
:
DebugSetProcessKillOnExit and Win32 processes on x64
I spent a little time looking at an x64 port of my debugging tools library at the weekend. Since this requires me to set breakpoints and manipulate process memory and image files and all sorts I expected it to be a little more complex to … -
:
x64 Debugger, ExceptionCode == 0x4000001f
I should be finishing some docs for the x64 release of The Server Framework… But this is more interesting… When running my Win32 debugging code on x64, this time when compiled natively as x64 code and when debugging an x64 CLR … -
:
WOW64 Win32 DebugAPI and managed code
It seems that I’ve located the “issues” in my Debug Tools library. This library is used in my TickShifter (time control) tool and my native Win32 Deadlock Detection tool. Due to how I wanted to control the debugged … -
:
x64, IOCP, Socket Server framework
The x64 version of our I/O completion port based, networking client and server framework, The Server Framework, is now shipping. This is the licensed version of the free server framework that’s available here. An overview of the … -
:
Summary of x64 Win32 Debug API issues
I’ve finished porting my debugging tools support libraries to x64 now and thought it was worth putting up a summary of the issues that I’ve noticed: A 32bit exe can’t start a 64bit exe for debugging - pretty obvious … -
:
Being wrong.
This week I’ve spent some of the time being wrong, which has proven useful as I’ve learned quite a lot and clarified my understanding of a situation. It all began when I had a bug report from a client who claimed that an obscure … -
:
IOBuffer allocation strategy...
Whilst being wrong this week I reviewed some of the other socket server entries on this site and was reminded of an item that’s on a todo list somewhere by a comment on this posting from Matt: “What do you think about using … -
:
Continuing a theme...
Continuing last week’s theme of being wrong, ‘M’ pointed out to me in a comment on my posting about changing the memory allocation strategy for the IO buffer allocator that I actually have a bit more work to do… … -
:
OnSocketReleased() weirdness
I ran into an unexpected issue with OnSocketReleased()yesterday whilst writing a connection filter for a client. OnSocketReleased() is a callback method in The Server Framework that allows you to ‘do stuff’ at the last possible … -
:
Performance counters that don't show up in perfmon
My current server development for a client has been going well but this week I finally got to the point where I wanted to look at the peformance counters it was presenting and they weren’t showing up in perfmon. My daily development … -
:
Another useful piece for anyone in a relationship with a nerd...
Once again Rands hits the nail on the head with The Nerd Handbook… -
:
CLR Hosting lifetime issues bite again...
I’m looking into adding CLR deadlock detection into the CLR hosting code that’s used inside The Server Framework and, once again, the fact that you can’t cleanly shutdown the CLR host is causing me problems… Since … -
:
Back in time with DDE
After completing some work for client with the custom CLR hosting server I’ve started looking into a problem for another client, it’s a bit of a transition as the problem that he’s having is with a DDE connection from his … -
:
VS 2008
I’m currently rebuilding my world with Visual Studio 2008. So far things are going ok, but as I mentioned back when I was playing with Beta 2, the new C4627 warning about header files being skipped when processing precompiled headers … -
:
Thank you Raymond
Raymond Chen has just blogged about “The importance of the FORMAT_MESSAGE_IGNORE_INSERTS flag” over on The Old New Thing. That’s another annoying bug fixed ;). I’ve occasionally wondered why I get some less than … -
:
Bug in overlapped UDP port unreachable errors?
I’m currently fixing a bug in the UDP side of The Server Framework. The problem is that I’m failing to handle how Winsock reacts when an overlapped SendTo() results in an ICMP Port Unreachable response from the remote host. This … -
:
Managed Excel addins
One of my current clients has got me drifting back towards my Investment Banking roots by developing an Excel addin for them. Luckily for me it’s a banking client with a twist compared to my previous banking clients; they’re … -
:
Reclaiming my CPU...
I removed the last version of “Norton Anti-Virus” (and all of the other stuff that I’ve been upgraded into over the years) from the last of my machines yesterday. I’ve replaced it with AVG, currently the free version … -
:
Secure code on vista only for 'enterprise' developers?
I picked up a book yesterday, Writing Secure Code for Windows Vista. Which seemed quite interesting, and was a nice slim volume that would slip into my hand luggage for my flight to Geneva on Friday night (yay first ski weekend of the … -
:
Performance counter mismatch detection
One of the problems with iterative development of servers that include performance counters is that it’s quite easy for the counters that are installed on a machine to get out of sync with the counters that the server is actually … -
:
CruiseControl.Net
I’m currently working on two new releases of The Server Framework, the first is a simple release to add support for VS2008 and the second is the next “feature” release. Due to the number of projects and example servers and … -
:
Fighting with CruiseControl.Net...
I’ve been trying to get my code to build with CruiseControl.Net this week. It’s taken longer than I’d hoped, but I’m almost there. It became easier when I switched from assuming various parts of CruiseControl.Net …