Back in 2009 I mused on the idea of 'breakpoint sequences', where a breakpoint was only hit if a series of previous breakpoints have been hit.

This functionality now exists in Visual Studio 2022, and it's wonderful. It's useful enough for me to immediately switch from VS2017 to VS2022 as my "day to day" IDE for Windows. Normally I take forever to make the move as I have tools that manage projects and solutions across all the compilers that I support, I just develop in the one that works best for me.

It's like Christmas has come early! Thank you Visual Studio Dev Team!

Recent release notifications

| 0 Comments
We've just found out that an email misconfiguration means that some emails to serverframework.com email addresses have been bouncing. This should be fixed now! Sorry about the inconvenience. If you have contacted us recently and not had a reply, please try again now!

Recent releases and 8.0 beta

| 0 Comments
As you'll see, we released 3 new versions of The Server Framework today. Of these, only the 7.3 release includes code changes. The 7.2 release updates almost every header file in the framework to remove 'old style' include guards and touches lots of source files to remove lint directives that we no longer use. This kind of change creates a lot of noise in an update and so it has been done separately to the functional changes to make it easier for users of the framework to see what has actually been changed in 7.3.

Release 7.3 is where the fun happens, with lots of changes and a couple of bug fixes.

Release 7.4 then removes support for Visual Studio 2015 and removes some code that has been deprecated for a while. It's a clean up release.

The idea is, most people should move straight to 7.4. If you want to see exactly what has changed, then ask for 7.2 and 7.3 and compare the 7.3 tree to the 7.2 tree. If you find that you still need Visual Stuido 2015 then stick with 7.3 and get all the new stuff, but no further updates. If you still need some deprecated code, then stick with 7.3.

Almost everything "non-functional" in the 7.x releases has been to pave the way for the forthcoming 8.0 release which supports Linux and MacOS as well as Windows. Lots changes in 8.0 including the entire design of the socket code. This makes it easier to 'plug in' different platforms as back-ends and incorporates lots of stuff that we've learnt over the 20 years since we release the first version of the framework.

We are happy to announce that 8.0 is now in beta. If you'd like to take part in the beta then please get in touch.

Latest release of The Server Framework: 7.4

| 0 Comments
Version 7.4 of The Server Framework was released today.

This release includes no bug fixes and no new code. It removes deprecated code and removes support for Visual Studio 2015.

Latest release of The Server Framework: 7.3

| 0 Comments
Version 7.3 of The Server Framework was released today.

This release includes bug fixes and new code.

Latest release of The Server Framework: 7.2

| 0 Comments
Version 7.2 of The Server Framework was released today.

This release includes no bug fixes and no new code. It adds support for Visual Studio 2022 and removes redundant manual include guards from most header files and removes unused "lint" directives from some of the older files. As such this release just serves as a stepping stone to the 7.3 release and makes it easier to see the changes that are made in the 7.3 release.

Be careful what you ask for...

| 0 Comments

As I mentioned in May last year, I'd was having trouble with a client's system where a UDP DDOS was causing Windows Server machines to use all available non-paged pool and then blue screen.

The issue could be reproduced with, what I thought at the time was, a minimal test program that simply created a UDP socket, bound it to a port and then didn't do anything with it. If something sent a stream of datagrams to that port then non-paged pool usage would grow in an uncontrolled manner until the box became unusable and eventually died.

The client's DDOS issue was resolved up-stream from them and we promptly forgot about this strange behaviour but recently we've been doing some load testing and we've run into it again so, once I worked out what was going on, I revisited the tests to make sure the minimal code could still be used to reproduce the problem.

Unfortunately the test program wasn't quite minimal enough, as well as creating and binding it also set the socket's recv buffer size to 'max int'. Before the Windows Update that first cause the problem this didn't seem to matter, possibly because the value was being ignored or Windows stopped buffering when non-paged pool usage got too high. After the Windows Update that brought the issue to my attention Windows does just what you ask it and buffers the data and doesn't care that its using all your non-paged pool whilst it's doing that... Or, perhaps, before non-paged pool wasn't used by this buffered data...

Removing the 'set recv buffer size to max' calls seems to fix the problem. Setting the value to something large, but not too large, and then watching the non-paged pool and Microsoft Windows BSP Dropped Datagrams counters perfmon counters clearly shows what's happening. Data is buffered until the buffer space is used and then datagrams are dropped. The buffered data uses non-paged pool in addition to whatever memory is also used for the data.

Deciding on what size buffer you need is complicated by the fact that the socket recv buffer is in bytes and is used up by the payload bytes in the datagrams whereas the non-paged pool usage appears to be "per datagram", so if the sender is sending large datagrams then the recv buffer space is used up sooner and datagrams begin to be dropped with less non-paged pool memory being used. With very small datagrams the non-paged pool usage becomes dangerous far sooner.

Working out a trade-off that allows for normal usage patterns but protects against a DDOS with small amounts of data may be complicated and may require auto-tuning based on the dropped datagrams and non-paged pool perf counters...

Latest release of The Server Framework: 7.1

| 0 Comments
Version 7.1 of The Server Framework was released today.

This release includes no bug fixes but begins to apply transformations that will allow code to compile on different platforms.

The next release, 7.2, will add in functional changes and bug fixes. If you haven't yet migrated to 7.x, please see the 7.0 release notes. There will be no more releases of the 6.9.x release stream.

Framework releases

| 0 Comments
Back in October 2019 I pointed out that I didn't normally do roadmaps of where the framework was going but did one anyway. Looking at how long it has taken to get from there to here I think I'm generally correct not to do roadmaps... I've been very busy with client work and the pandemic has caused us some disruption, but thankfully not too much. However, I think the main reason that it has taken so long to get the 7.0 release out the door is that it has been constantly evolving and I had client work for my US mail handling client that was pushing features "forward" from 6.9.x and client work for other clients was pushing changes "backwards" from the linux and MacOS version (8.0). Keeping the various planned releases up to date and coherent was more work than I expected. I won't try that again...

Anyway, here we are. 7.0 has been released and adds a new tools library, CoreTools, which will become cross platform by the time we get to an 8.0 release. In 7.0 it's just a code shuffling exercise with no functional changes as almost every file changes due to include path adjustments so that the code could be used on Unix platforms as well as on Windows platforms. The next step is 7.1 and I'm almost at the point where this can be released. This begins to add some functional changes but only those required for cross platform compilation; it's still only Windows. 7.2 is a little further off and includes all the functional changes and bug fixes from 8.0 that didn't make it into 6.9.5. The "new sockets" redesign is still coming, it's fully operational in 8.0 as it is the main reason that we can do handle EPoll and KQueue socket backends. It will, likely, end up in a 7.x release, but it's not in 7.2.

Latest release of The Server Framework: 7.0

| 0 Comments
Version 7.0 of The Server Framework was released today.

This release includes no functional changes or bug fixes but moves code that could compile on different platforms out of the Win32Tools library and into a new CoreTools library. It also updates all include paths to use / rather than \ as / is valid on Unix-based systems and also on Windows.

The next release, 7.1, will begin to move the code towards cross platform compilation and the release after that will add in functional changes and bug fixes. It would be useful to migrate to 7.0 as soon as you can so that the later migrations to 7.1 and 7.2 are easier. We have some tools which will help in the migration, please get in touch if you would like help. There will be no more releases of the 6.9.x release stream.

About this Blog

I usually write about C++ development on Windows platforms, but I often ramble on about other less technical stuff...

This page contains recent content. Look in the archives to find all content.

I have other blogs...

Subscribe to feed The Server Framework - high performance server development
Subscribe to feed Lock Explorer - deadlock detection and multi-threaded performance tools
Subscribe to feed l'Hexapod - embedded electronics and robotics