« June 2008 | July 2008 Archives | August 2008 »

Write completion flow control

| 0 Comments
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 receive within a reasonable time. Rather than simply continuing to send and building up a massive amount of buffered data in the TCP/IP stack the connection filter keeps track of write completions and begins to buffer data for you when there are 'too many' write operations outstanding. This means that the data is buffered in your own memory…
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 were made to the libraries. Admin Library - 5.2.2 Added JETBYTE_MINIMUM_SUPPORTED_WINDOWS_VERSION and JETBYTE_MINIMUM_SUPPORTED_NTDDI_VERSION to Admin.h. These are currently set to _WIN32_WINNT_WIN2K and NTDDI_WIN2K. Added JETBYTE_PLATFORM_SDK_VERSION which you can use to tell the libraries which version of the Platform SDK you're using. This allows us to work around some of the breaking changes that are introduced by some versions of the Platform SDK. Added a copy of…

Memory leak in licensed socket server code

| 0 Comments
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 CReadSequencingStreamSocketConnectionFilter::FilterSocketReleased() which currently looks like: void CReadSequencingStreamSocketConnectionFilter::FilterSocketReleased( IIndexedOpaqueUserData &userData) { delete userData.GetUserPointer(m_userDataIndex); } and which should look like: void CReadSequencingStreamSocketConnectionFilter::FilterSocketReleased( IIndexedOpaqueUserData &userData) { CInOrderBufferList *pBuffers = *reinterpret_cast<CInOrderBufferList *>(socket.GetUserPointer(m_userDataIndex)); delete pBuffers; } Without the fix the wrong amount of memory is being released and the CInOrderBufferList destructor isn't being called. The reason that this bug survived…

Server shutdown in 5.2.1 and 5.2.2

| 0 Comments
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 regards to connections could be destroyed whilst there were sockets that it managed still in existence. This wasn't usually a problem but it meant that it was possible for a socket to make a callback to code that didn't exist anymore; which is a Bad Thing. This situation has never shown up in real life but when I added continuous…

Good technical blog

| 0 Comments
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 especially like the "Reality Driven Development" post which fits nicely with my "thin thread of functionality" way of designing software. I've always tended to design from the bottom up and my testing addiction has fuelled that somewhat; but I do still like to pop up to the surface on regular intervals and…
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 deadlock The Server Framework in complex servers if you don't abide by the rules. Unfortunately, the rules weren't documented until now and, although I knew them, it's probably more accurate to say "I knew of them". In more complex server developments I often went through a phase where I'd put some code in, in the wrong place, and deadlock the server under certain circumstances." The…
« June 2008 | July 2008 Archives | August 2008 »

About this Archive

This page is an archive of entries from July 2008 listed from newest to oldest.

June 2008 is the previous archive.

August 2008 is the next archive.

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

Find recent content on the main index or 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
Subscribe to feed MegèveSki - skiing