Onwards into 2023!

It felt like things almost got back to normal in 2022, which was good. We like normal...

It was another good year for us and we're still happy doing what we love, writing C++ on multiple platforms and developing interesting code for diverse clients.

Our gaming clients are all doing wonderfully well; our industrial control clients are happy and planning new projects; the large American postal company that will remain nameless is looking to extend the system we built for them a few years ago and our SIP TLS Gateway project now supports secure WebSockets as well as TCP.

In other news, we're diversifying our technical skills a little and exploring Rust for some future projects.

Here's to a boringly "normal" 2023!

I've had a client ask if it's possible to rename his server log file whilst the server is running but not allow deletion. This is harder than you'd expect to achieve. The established view of "the internet" is that NTFS doesn't support permissions to allow file renaming and still prevent file deletion. This is true. If you want to allow renaming you need to create or open the file with FILE_SHARE_DELETE access and this allows rename AND delete. The reason for this is that a rename is actually a process of creating a copy of the file with a new name and then deleting the old file. I pointed this out to my client and he immediately responded with "I can rename a running exe but am prevented from deleting it.". This, of course, is true. Executable files can be renamed and not deleted if they are currently running.


The fact that executables can work this way gave me the hint I needed. I figured it's likely the fact that the file is mapped into memory that prevents the deletion...


Adding some code that uses CreateFileMapping() to create a file mapping object from the log file's file handle, and then holding the file mapping open whilst we're using the log, gives the results that my client wants. A log file that can be renamed but not deleted. Note that you don't actually have to map the file mapping into memory, just hold the handle open.


Note that the file in question needs to contain at least one byte to be able to create the file mapping but that's easy to work around for us.

As of the latest Chrome, Edge, Opera, and FireFox updates all of my 'obsolete' hardware (routers, NAS drives, network switches, etc) are inaccessible as they don't use TLS 1.2. I'm unlikely to be alone in this. I can understand the technical decision but IMHO it's wrong and, actually pretty stupid. To make it more than a click through warning to access these obsolete devices on my local subnet. Sure ban connections to other subnets (that would cause me pain too as I manage some stuff via a VPN) but 90% of users would be fine.


So now we'll see a lot of "The client and server don't support a common SSL protocol version or cipher suite." or "This site can't provide a secure connection" errors when trying to access older hardware.


I now have an old version of FireFox installed with updates disabled and I know to only use it for my local stuff that doesn't work with updated browsers. It's a bit clunky, even with shortcuts which run the browser with the correct URL, but it works. I'm not sure that everyone will end up with this kind of set up; they may just have someone suggest that they downgrade their main browser and turn off updates...


Allowing access to the local subnet with a click through scary warning would probably be 'safer' than forcing people to find out how to work around the problem or preventing them from ever adjusting their routers, or whatever, again...


I'm sure there are lots and lots of valid reasons for the decision; they're just all wrong when the end result will be non-technical users downgrading their browsers and turning off updates.

More of the same...

2021 was another "interesting" year. We hope that things worked out OK for you. We've stayed nice and busy doing the things we love to do. So lots more C++ on various platforms for various clients.

For us, and a few of our clients, 2021 was the year that NUMA really started to be a thing. Mostly, up until now, we've been able to ignore NUMA hardware. Most clients scale out across cheap hardware and we're used to dealing with that. In 2021 some clients decided to scale the machine rather than the system and started using huge multi-cpu NUMA machines. This was 'interesting' from a performance point of view and we've all learnt a lot whilst tweaking code to make it a better fit for NUMA hardware.

We're still nice and busy with our games clients and our industrial control clients. We're enjoying being able to move towards newer compilers which support more recent versions of C++ and loving all the new learning we're being forced to for performance tuning on various platforms. Long may it continue.

As always, in these interesting times; stay safe and healthy and good luck in 2022!
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.

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