Posts from 2008
-
:
More Cruise Control .Net woes
I’ve almost got something that works out of CruiseControl.Net. Once I’d hacked in some fixes for the project triggers and other stuff that didn’t work the way I wanted it to I concentrated on generating the config files … -
:
Thread.Sleep(100); // sleep for a short while, to avoid hammering CPU
I am intending to check out some of the other build servers that people have been suggesting, but today I was too busy with real work so I just left a cut down version of my latest CruiseControl.Net configuration running on one of my boxes … -
:
Local project trigger...
I hacked another fix into CruiseControl.Net today and we now almost have an acceptable level of performance in my particular (some may say warped) circumstances. The trick was to hack the project trigger to be a “local project” … -
:
Currently reading: Excel add-in development in C/C++
As I mentioned a while back, I’m writing a managed XLL style add-in system for Excel for one of my clients at the moment. This is going pretty well, most of the custom marshalling code is now done and we can write code in C# and … -
:
Socket write sequencing memory leak bug in free version of socket server framework
I’ve been tracking a bug for a client recently and yesterday I got a remarkably similar bug report from one of the users of my free socket server framework. The client’s code is pretty old and was originally based on a server … -
:
How important is VC6 to you now?
I’m working on the next releases of The Server Framework, and I now have continuous integration (of a sort) so my build and test problems are being minimised… BUT… Keeping Visual Studio 6 support in the framework is … -
:
New release of free Socket Server framework
There’s a new release of The Server Framework’s Free Framework, here. This includes the bug fix that was mentioned here. -
:
Potential deadlock bug in free socket server framework
The free version of the socket server framework contained code that could cause a deadlock during connection closure if you also have a lock in your derived class. There’s a lock taken out in CSocketServer::Socket::IsValid() that … -
:
CruiseControl.Net patches
Hacking CruiseControl.Net to work better for my specific circumstances (lots of projects that depend on lots of projects) has resulted in the following patches to revision 3607 of ccnet which I’m just about to submit to the … -
:
DNSBL - again...
If Richard Wolff is reading this then I can’t reply to your emails as your ISP is bouncing my emails with this: `Hi. This is the qmail-send program at ns.mgf4.net. I’m afraid I wasn’t able to deliver your message to the … -
:
Coding the markets
Barry (who seems to have stopped blogging) recommended this blog to me; Coding The Markets. It’s pretty good if you’re into investment banking development stuff. -
:
Living with continuous integration
Well, it’s about a month since I started running Cruise Control .Net and things have settled down somewhat now and I can almost go a day or two without tweaking my configuration or being tempted to fix issues in Cruise Control itself. … -
:
CC.Net File System Source Control speed up
Yesterday I mentioned that the file system source control provider in CC.Net was a little inefficient. I speculated as to how it might be working and how it might be improved. Well, as the saying goes, assume makes an ass out of you and … -
:
CC.Net and Robocopy
I’m continuing to tune my continuous integration system. Today I switched the ‘deploy’ projects from using a CC.Net file system source control task to do the deployment to using Robocopy. This has sped things up nicely and … -
:
Currently Reading: Windows via C/C++
I’ve just picked up a copy of Windows Via C/C++ (PRO-Developer) by Jeffrey Richter and Christophe Nasarre. This is ‘version 5’ of the book that started out as Advanced Windows NT (Advanced Windows). The book has been … -
:
Another CCNet patch
Here is another patch for CruiseControl.Net. This patch provides support for a Robocopy SourceControl provider. This gives a significant performance increase over the FileSystem SourceControl provider. To integrate this I needed to adjust … -
:
Process management using Jobs on Windows
One of the problems I currently have with CruiseControl.Net is that some of my tests spawn multiple processes; such as server tests which run the development environment, which runs a batch file to start a server (or two) and then run a … -
:
Major Vista Overlapped I/O change
I’m still reading the Richter book, highly recommended even if you’ve read one of the earlier versions. In fact it’s possibly MORE highly recommended IF you’ve read one of the earlier versions… It seems that … -
:
Latest release of licensed socket server code: 5.2.1
The latest release of The Server Framework is now available. This release includes the following changes. All code now builds with VC6, VS2002, VS2003, VS2005 and VS2008. The VS2005 and VS2008 builds support x86 and x64. This is the first … -
:
When are asynchronous file writes not asynchronous...
For some time I’ve had a class which implements asynchronous file writing. It’s the basis for a logging class that some of my clients use. The class builds on several of the classes in The Server Framework and uses I/O … -
:
.Net Abstract base classes vs. interfaces
An interesting piece here from Phil Haack about why they decided to use an abstract base class rather than an interface. Versioning is always a complicated thing for library designers. I know that I’m lucky in that I don’t have … -
:
Back from Skiing...
I’ve been away skiing for a couple of weeks in Davos and St. Anton, the snow was pretty good in both places but Davos won out as a more civilised skiing experience. St. Anton was just too busy for me, I’m getting fussy in my old … -
:
Bug in timer queue code
Whilst I’ve been away I’ve had a bug report for the TDD timer queue code that’s available here. The report is completely correct and could result in a timer being scheduled out of sequence if it’s scheduled around … -
:
ReadyNAS development...
As I mentioned a while back I’m using a pair of ReadyNAS NV+ RAID systems as my on-site data store and off-site backup. These are both working well and I’m pleased with the solution. After a few hickups and delays due to the … -
:
And then there were three...
This morning a new Ready NAS NV+ unit arrived, so now I have three. I didn’t have a sudden change of heart about buying a development box, the power supply in my office NAS died on Thursday afternoon and buying a new, bare, enclosure … -
:
Practical Testing: 16 - Fixing a timeout bug
Back in 2004, I wrote a series of articles called “Practical Testing” where I took a piece of complicated multi-threaded code and wrote tests for it. I then rebuild the code from scratch in a test driven development style to … -
:
It seems I'm not the only one...
It seems I’m not the only one to make mistakes with GetTickCount() based timer code, see: System.Threading.Timer fires immediately when specifying a large value for due time. -
:
Practical Testing: 17 - A whole new approach
The comments to my last practical testing entry got me thinking. The commenter who had located the bug in part 15, which was fixed in part 16, suggested a new approach to the problem and I’ve been investigating it. The suggestion is, … -
:
PQR - A Simple Design Pattern for Multicore Enterprise Applications
There’s an interesting article over on the Dr. Dobbs Code Talk blog; PQR - A Simple Design Pattern for Multicore Enterprise Applications. It documents a design that I’m pretty familiar with and one which has worked pretty well … -
:
What would I do??
There’s an entry over on the Dr. Dobbs blog about testing and how you make sure that your tests are testing the right thing; effectively, who tests the test. There’s a question at the end “What do you do?” and I … -
:
Comments, captcha and blacklist...
I’ve turned the blacklist back on. I turned it off yesterday and have had a couple of spam comments get through. The blacklist itself doesn’t always catch the spam comments but it does give me a one click method of removing … -
:
Spam problems
This morning a spammer somewhere seems to have used my main email address as the return address on a whole bunch of random spam that has been sent out from all over the place. As such I have around 3000 undeliverable mail responses flowing … -
:
Spam gone...
The endless torrent of bounce messages began again yesterday evening. Once again it was arount one email every 2 minutes or so. I turned on my laptop this morning expecting a few thousand emails to download and only a third of them to be … -
:
Socket connection termination
I’ve been putting together a sample server for a client that shows how to cleanly terminate a socket connection. This should have been a simple thing to do, but in doing so I’ve discovered some gnarlyness within The Server … -
:
WOW64 Win32 DebugAPI CLR application startup change
Back in October 2007 I sumarised my findings from getting my Win32 DebugAPI based debug engine working on x64. One of the strange things that I found at the time was this: When running a CLR app under the Win32 debug interface you only ever … -
:
Interesting blog
I found JP’s blog whilst googling for some information on RVA forwarders in PE files. There’s lots of good stuff there about reasonably low level Windows development, debugging, testing and API hooking. Recommended if you like … -
:
More on the CLR startup change
Last week I mentioned that some of my tests for my Win32 Debug API class had suddenly started failing. It seems that I was right and the changes are due to some .Net fixes that have been rolled out recently. The code runs and the tests pass … -
:
Another ISO 8583 transaction server
It has been a busy couple of weeks for me. I’ve been working on an ISO 8583 based transaction server for a client and I set myself some fairly tight deadlines. I actually developed the first version of The Server Framework for another … -
:
Data distribution servers
Many of the servers that are built with The Server Framework are for high number of connections and low data flow situations and as such that’s where the focus has been on the framework development and testing. As I’ve shown in … -
:
The mounted file system does not support extended attributes...
I really really really hate the error that I sometimes get when trying to copy a file from my Vista box to my NAS: “The mounted file system does not support extended attributes”. With the options to “Try again” or … -
:
High throughput, low latency
As I said in my recent posting about Data Distribution Servers, “Next on the list is writing a more focused server and clients.”. Tick. I started out by writing the data feed. This was a simplified version of the echo server … -
:
Managed XLL Excel Addins
Back in December and January I was working on the initial phases of a system to allow the development of custom Excel worksheet functions in managed code using the Excel XLL ‘C’ interface (Excel4v). Phase 1 finished with us … -
:
Write completion flow control
I’ve finished the write completion driven outbound data flow control connection filter that I started work on a while ago. This provides a way to deal with the problem of having more data to send to a client than the client can … -
:
Latest release of licensed socket server code: 5.2.2
The latest release of The Server Framework is now available. This release includes the following changes. This is the first release built using Compuware BoundsChecker and there have been some resource leaks fixed. The following changes … -
:
Memory leak in licensed socket server code
Well, of course, the day after I released the 5.2.2 version of The Server Framework I get a bug report from a client using 5.2.1 listing a couple of memory leaks. One of them fixed in 5.2.2 and one not. The leak that survived 5.2.2 is in … -
:
Server shutdown in 5.2.1 and 5.2.2
There was a change in release 5.2.1 of The Server Framework which has caused some issues with clean shutdown. This issue is also present in 5.2.2. Prior to 5.2.1 the CSocketServer or equivalent object that did the bulk of the work with … -
:
Good technical blog
I stumbled on Gustavo Duarte’s blog this week via this post about how lucky we are to be programmers. The post that led me to his blog is good stuff and has had lots of linkage this week. The rest of the blog is also good stuff; I … -
:
There will be a 5.2.3, or documenting leads to refactoring...
I started to document part of The Server Framework’s behaviour as I expect that a client will be asking questions about it in the near future. Whilst writing the documents I found myself writing this: “It’s pretty easy to … -
:
Practical Testing: 18 - Removing the potential to deadlock
Back in 2004, I wrote a series of articles called “Practical Testing” where I took a piece of complicated multi-threaded code and wrote tests for it. I then rebuild the code from scratch in a test driven development style to … -
:
Latest release of licensed socket server code: 5.2.3
The latest release of The Server Framework is now available. This release includes the following changes. The following changes were made to the libraries. Some whitespace changes to remove incorrect tabs. Admin Library - 5.2.3 Added a … -
:
The life of a stream socket connection
As I mentioned here I’ve recently adjusted how socket callbacks are dispatched in The Server Framework. Once you’ve written a TCP server or client you will find that you spend a lot of time dealing with the lifecycle of the … -
:
Practical Testing: 19 - Removing the duplicate code
The code in the last two articles in the “Practical Testing” series have contained a considerable amount of duplication. This came about for a couple of reasons. Firstly part 17 was a bit rushed and secondly it was useful to … -
:
Documentation bug...
I realised this morning that part of my “The life of a stream socket connection” document about the safe use of server callbacks in my server framework was wrong. I said this: At any time after a connection is established, … -
:
Lock free code is hard
There’s an interesting article over on Dr. Dobb’s about why writing lock free code is so hard. Herb Sutter takes some code from an article that Dr. Dobb’s published a couple of months ago and pulls it apart and points out … -
:
Writing testable code
There’s a nice post by Miško Hevery over on the Google Testing Blog about Writing Testable Code. It pretty much sums up my views on testable code. Go read it! -
:
Practical Testing: 20 - Mind the gap
Back in 2004, I wrote a series of articles called “Practical Testing” where I took a piece of complicated multi-threaded code and wrote tests for it. I then rebuild the code from scratch in a test driven development style to … -
:
Flame on
There’s an interesting post over on “Blogging Considered Harmful” about why flaming someone for incorrect technical spouting is a good thing; I tend to agree. I actually WANT people to shout down my stupidity, if … -
:
Connection collections
One of the questions that comes up time and again from users of The Server Framework is “How to I access the list of current connections within the framework”. My answer is, you don’t, you build your own collection and … -
:
The perils of precompiled headers
I’m working on some client code today and it’s fairly typical of most ‘Visual Studio Wizard generated code’ in that it uses precompiled headers in a pretty poor way. The default wizard generated code seems to … -
:
Log file rotation
I’m in the process of adjusting the asynchronous file log that we use in some of our servers. The log works well and write performance is good for a variety of reasons that I deal with here. The current changes are mainly due to the … -
:
WM_TIMECHANGE broadcast strangeness...
I’m currently writing and testing a simple class that watches for system time changes. This is to allow an app to adjust some timers that it sets for absolute times in the future if the system time changes. The code’s fairly … -
:
How does the socket server framework compare to Boost::ASIO?
I’ve had a few questions from users and potential users of The Server Framework about how it compares to other available frameworks. One such framework is ASIO. The first thing to realise is that The Server Framework and ASIO are very … -
:
Alternative call stack capturing
I’ve just stumbled on these blog posts, by Maciej Sinilo, a game developer. He’s written a memory allocation monitoring tool and mentions that using RtlCaptureStackBackTrace() is a faster (if undocumented) way to capture a call … -
:
STLPort 5.1.5 and VS2008 and x64
I’ve been meaning to build STLPort for Visual Studio 2008 for some time now but as the STL support that ships with Visual Studio has been improved the urgency to be able to use an alternative has reduced. Unfortunately STLPort 5.1.5 … -
:
Asynchronous SChannel Servers
I’m currently working on an SChannel version of the asynchronous SSL connector code that we use to provide SSL support in The Server Framework. This will eventually be an alternative to the existing OpenSSL support that we currently … -
:
Goodbye old friend
As of release 5.2.4, which is due for release in December, we will no longer support Visual Studio 6 builds of The Server Framework. I’ve recently had to deal with some weird multi-threaded problems for a client and upgrading them … -
:
/Wall
I’ve been compiling with /W4 for some time now. I didn’t realise that this wasn’t the best you could get. There are some warnings which are not enabled by default and therefore aren’t included in /W4. To enable these … -
:
Lock contention
I had reason to run my deadlock detection tool on a server built with an old version of The Server Framework as I needed to make changes to the server’s locking strategy and I wanted to make sure that I didn’t cause any lock … -
:
DevPartner Studio 9.0
I’ve just updated my installation of DevPartner Studio. I mainly use the C++ error detection part of this suite, that’s the bit that used to be called BoundsChecker. Anyway, version 9.0 is the first version to support VS2008 and … -
:
Comments are off for a while
I’m in the process of moving the blog from one host to another and until I get all of the perl configuration working so that the various comment spam protection methods are working properly I’m turning off comments. Email me if … -
:
Comments are back on...
The move to the new hosting server is complete and all the perl config has been done so I’ve turned comments back on! -
:
DevPartner Studio 9.0 and VS2008
It seems that there’s a ‘known issue’ with DevPartner studio’s instrumentation and VS2008. Apparently the compiler architecture changed somewhat between VS2005 and VS2008 and sometimes the instrumentation is … -
:
Latest release of licensed socket server code: 5.2.4
The latest release of The Server Framework is now available. This release includes the following changes. The following changes were made to the libraries. Admin Library - 5.2.4 We no longer support Visual Studio 6. We now compile with … -
:
The great source code shuffle...
I’m in the process of moving my source code from a CVS repository to Subversion. The main reason for the move is so that I can move the repository onto one of my NAS devices so that it can be backed up automatically. I have a spare … -
:
More code shuffling...
The CVS to SVN code migration is going well. As recommended by a commenter I’ve switched from using a script to pull my tools libraries from their repository into The Server Framework examples build tree to using svn:externals. This … -
:
How do you convert a number to a string in C++ with MSVC...
Converting a numeric type to a string format in C++ is one of those problems that was ‘solved’ a long time ago. The ‘standard’ method usually involves streaming the type to be converted into a std::stringstream and … -
:
Shared locks and unique locks
In one of the original articles that introduced The Free Framework I mentioned that the original design was possibly lacking in that it required a critical section per connection and that this could be resource intensive. Shortly after I …