The latest release of The Server Framework is now available. This release includes the following changes.
Note that this is mainly a bug fix release.
The following changes were made to the libraries.
Admin Library - 6.1.1
New build configuration options. All of these are enabled by defining the option to 1 in Config.h and disabled by defining them to 0; the default state if you do not do anything in Config.
In the great tradition of explaining your problem to someone else as a way of fixing it yourself without their help…
I’ve nailed the rotating file log 16010101 bug! The problem was to do with the fact that when there was a new log ready for use and a log message switched it to be the active log it also set the ’next log time’ to zero. If a time change notification came along just after this, whilst the ’next log time’ was zero then it created a new log due to a bug in the time change handler; a test was missing a ’next log time !
It’s been a bit of a week for bugs. First I had a bug report for the really rather old CodeProject socket server COM object. This allows people using VB to create a socket server that uses the free version of The Server Framework. It works well, for what it is, and has been the basis for several custom objects that various clients have needed over the years. The bug involves the ‘read string’ functionality and either the ATL headers (specifically the narrow to wide character conversion macros) have changed since the code was originally written in 2002 in VC 6.
I’ve been playing with Visual Studio 2010 Beta 2 and .Net 4.0, building code, running tests, playing with the IDE, etc. The first issue that I’ve come across with my existing codebase is that the .Net 2.0 hosting APIs (such as CorBindToRuntimeEx)are now deprecated and there’s a whole new way of hosting the CLR.
We’ve been quite successful in hosting the CLR from within our C++ servers, either to provide servers that support a mix of managed/unmanaged plugins as a pluggable high performance windows application server or to provide network protocol support in C++ (such as ENet) with ‘business logic’ being written in managed code.
There are some interesting blog posts by Rick Vicik over on the Windows Server Performance Team Blog. Most interesting for me is part three of the three part series on “Designing Applications for High Performance”. Whilst parts one and two cover some useful ideas they’re pretty general. Part three really digs into the implementation of I/O completion ports and how new API calls can help improve performance and reduce locking within the APIs themselves.
The release notes for the 6.1 release, whilst complete, don’t really highlight the key points of this release. These are as follows:
Support for SSPI Negotiate (NTLM and Kerberos) servers and clients - You can now license code which allows you to implement high performance IO Completion based asynchronous servers and clients that support “Windows Authentication” for authentication and security of data transfer. Example clients and servers are available here
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 - 6.1
We now suppress warning 4370, ’layout of class has changed from a previous version of the compiler due to better packing’, in Warnings.h.
New build configuration options. All of these are enabled by defining the option to 1 in Config.h and disabled by defining them to 0; the default state if you do not do anything in Config.
The Server Framework uses reference counted data buffers and socket objects. These are passed around as part of the asynchronous I/O system in the framework and as they’re placed in queues or passed from one thread to another their reference counts are adjusted so that they are automatically cleaned up when they’re finished with; but not before.
If you’re writing a server or client using The Server Framework then you may need to manipulate these reference counts yourself; as with all reference counted objects, there are two simple rules: If you need to hold on to a reference to an object than call AddRef() on it; when you’re done with your reference call Release().
A customer of mine has been having some problems with communication between a UDP server and their load test client. The UDP server implements the ENet protocol which provides for reliable data transfer over UDP. Their problem was manifesting as the client not getting some ENet level ACKs for some reliable data. The Wireshark log from the client machine showed the client resending the data when the ENet retransmission timeout expired and also showed that the ACKs for these packets never arrived.
I’m developing the simple client server protocol code that I’m harvesting in a test driven manner. Although the code exists, as such, and I’m harvesting it rather than inventing it from scratch the harvesting is taking the “best” ideas from several similar implementations to create the version that will form part of the framework’s example code. As such I’m treating this just like a new development and, mostly, writing my tests first.