Latest release of The Server Framework: 6.7

Version 6.7 of The Server Framework was released today.

This release is mainly a code simplification release which removes support for legacy compilers and operating systems. See here for more details. However, there are some breaking changes where smart buffers have replaced buffer references and this causes function signature changes. In addition there has been considerable churn in the Streaming Media Option Pack with knock on changes in the HTTP library code which needed to be made more complete to deal with serving HLS streams.

As always, see the release notes here, for full details of all changes.

Breaking changes:

  • Breaking change JetByteTools::IO::CAsyncFileReader, JetByteTools::IO:: CAsyncFileWriter, JetByteTools::IO::CAsyncFileWriterEx and JetByteTools::IO::IAsyncIOStream now work in terms of JetByteTools::IO:CSmartBuffer where possible. This potentially reduces the reference counting activity on the buffers.
  • Breaking change Where possible JetByteTools::IO::CSmartBuffer has replaced raw pointers and references to buffers. This massively reduces the need to reference count buffers during normal I/O operations and increases performance, especially on NUMA architectures.

Bug fixes:

  • Bug fixes to JetByteTools::IO::CBuffer around the usage of m_maxBytesToRead.
  • Bug fix to JetByteTools::Win32::CCallbackTimerQueueEx::BeginTimeoutHandling() to prevent incrementing m_nextTimeoutHanlde causing the value to wrap to InvalidTimeoutHandleValue which was possible, but unlikely.

Changes:

  • Dropped support for Visual Studio 2005 and Visual Studio 2008.

  • Dropped support for Windows XP.

  • Removed JETBYTE_HAS_INTERLOCKED_64 as it’s true on all supported platforms now.

  • Removed JETBYTE_WARN_ON_SOCKADDR_STORAGE_DEF and JETBYTE_WARN_ON_WSPIAPI_COUNTOF_DEF as these are no longer relevant.

  • Removed JETBYTE_PERF_STREAM_SOCKETS_SKIP_EVENT_ON_HANDLE, JETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_EVENT_ON_HANDLE and JETBYTE_PERF_FILE_WRITER_SKIP_EVENT_ON_HANDLE as these are always enabled now.

  • Removed JETBYTE_PERF_STREAM_SOCKETS_SKIP_MARSHAL_TO_IO_POOL and JETBYTE_PERF_DATAGRAM_SOCKETS_SKIP_MARSHAL_TO_IO_POOL as these are always enabled now. Marshalling was only required to work around Windows XP’s I/O cancellation on thread termination policy.

  • Removed JETBYTE_DEPRECATE_SHARED_CRITICAL_SECTIONS, JETBYTE_DEPRECATE_SHARED_LOCK_SOCKETS, JETBYTE_DEPRECATE_CRITICAL_SECTION_2, JETBYTE_DEPRECATE_LOW_CONTENTION_BUFFER_ALLOCATOR, and JETBYTE_DEPRECATE_TLS_BUFFER_ALLOCATOR as these features are no longer available.

  • Removed SecureCRT.h as it’s no longer required. It was used to map differences between the Visual Studio 2005 CRT and the “new” secure CRT.

  • Added the macro, SuppressLNK4221Warning(), which can be put into a file in order suppress the MS Visual C++ Linker warning 4221 - “warning LNK4221: no public symbols found; archive member will be inaccessible”

  • Turn off JETBYTE_INTRUSIVE_RED_BLACK_TREE_INTERNAL_STATE_FAILURE_EXCEPTIONS by default.

  • Removed JetByteTools::IO::CLowContentionBufferAllocator and JetByteTools::IO::CTLSBufferAllocator.

  • Added JetByteTools::IO::CBufferBasedBufferAlloctor which is a simple shim to allow an instance of JetByteTools::IO::IBuffer to be used as an implementation of JetByteTools::IO::IAllocateBuffers.

  • Removed JetByteTools::IO::IIOPool::DispatchToAll() as it was only required for issuing CancelIO() calls to all I/O threads on XP where CancelIOEx() wasn’t available.

  • Added an overload of JetByteTools::IO::CNonPooledBuffer::Create() that takes a bufferSize and a pointer to data and a data length so that you can create a buffer that initially contains some data but that is larger than that data.

  • Added lots of standard buffer functionality to JetByteTools::IO::CNonPooledBuffer before deprecating it in favour of normal buffers obtained via JetByteTools::IO::IAllocateBuffers::AllocateCustomSizedBuffer().

  • Removed JetByteTools::IO::CAsyncFileWriter::ExecuteWritesOnCallingThreadIfSafe as it’s the same as JetByteTools::IO::CAsyncFileWriter::ExecuteWritesOnCallingThread now that we no longer support Windows XP.

  • Added JetByteTools::IO::IBuffer::GetTotalLength() which returns the length of a set of buffers defined using an array of WSABUF structures.

  • Added JetByteTools::IO::CBufferChain::CopyBufferChain() which uses an instance of JetByteTools::IO::CBufferChain::IAllocateBufferHandles to create a duplicate of a given buffer chain where the duplicate contains handles to the buffers in the original chain.

  • Removed all of the code that was required to marshall I/O operations to the I/O threads on Windows XP.

  • Removed the concept of write sequencing. There’s no need now that the marshalling code has been removed.

  • Removed the concept of “shared lock sockets” and, correspondingly “unique lock sockets”. All socket objects now have their own lock.

  • Removed the option of setting a socket’s lock’s spinCount in the constructor of the socket allocator

  • Replaced some usages of JetByteTools::Win32::CCriticalSection with JetByteTools::Win32::CLockableObject

  • Removed JetByteTools::Win32::ICriticalSectionFactory, JetByteTools::Win32::ISharedCriticalSection, JetByteTools::Win32::IManageSharedCriticalSections, JetByteTools::Win32::CCriticalSection2, JetByteTools::Win32::CSharedCriticalSection, JetByteTools::Win32::CSharedCriticalSectionFactory, JetByteTools::Win32::CSmartSharedCriticalSection and JetByteTools::Win32::CUniqueCriticalSectionFactory. The concept of shared critical sections is no longer supported.

  • Removed JetByteTools::Win32::CThreadedCallbackTimerQueue::HybridTickCount64 and JetByteTools::Win32::CThreadedCallbackTimerQueue::HybridTickCount64NoLock as the hybrid GetTickCount64() implementation is no longer required as all supported platforms now provide GetTickCount64.

  • Removed JetByteTools::Win32::CCallbackTimerQueue. JetByteTools::Win32::CCallbackTimerQueueEx is now the only timer queue implementation.

  • Removed JETBYTE_USE_CAPTURE_STACK_BACK_TRACE we now ALWAYS used CaptureStackBackTrace() so there’s no need to make it optional.

  • Added new overloads for JetByteTools::Win32::GetFileNameFromPathName() and JetByteTools::Win32::StripFileNameFromPathName() which takes the path separator. This allows the functions to be used for file system paths or URI paths.

  • Added new overloads for JetByteTools::Win32::GetFileVersion() and JetByteTools::Win32::GetFileVersionString() which take languge IDs and charset IDs

  • Added JetByteTools::Win32::RemoveDirectoryContents().

  • Added JetByteTools::Win32::GetFileSize().

  • Added some code to the top and bottom of Utils.h which try to deal with situations where min and max have been defined as macros. We use the std::min() and std::max() template versions and macros confuse matters so the new code attempts to undef the macros if present and then redefine them at the end of the header.

Newly deprecated code:

  • Deprecated JetByteTools::IO::IAllocateMultiBufferHandles and the concept of “multi buffer handles”.
  • The stacking of connection filters that can generate their own writes has been deprecated.
  • Compressing and deflating socket filters are now deprecated.