<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Rambling Comments</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/" />
    <link rel="self" type="application/atom+xml" href="http://www.lenholgate.com/blog/atom.xml" />
    <id>tag:www.lenholgate.com,2010-12-10:/blog//12</id>
    <updated>2011-12-14T09:03:46Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 5.12</generator>

<entry>
    <title>RFC 6455: The WebSocket protocol</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/12/rfc-6455-the-websocket-protocol.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1161</id>

    <published>2011-12-14T08:46:47Z</published>
    <updated>2011-12-14T09:03:46Z</updated>

    <summary> I know I&apos;ve said this before, but now it&apos;s really done... The WebSocket protocol is now an official RFC. There are a small number of changes between RFC 6455 and the draft WebSocket protocol version 17; the only important...</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Geek Speak" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
I know <a href="http://www.lenholgate.com/blog/2011/09/the-websocket-protocol-is-done.html">I've said this before</a>, but now it's really done...
</div>
<div><br/></div>
<div>
The WebSocket protocol is now an official RFC. There are a small number of changes between RFC 6455 and the draft WebSocket protocol version 17; the only important ones being he addition of two new close status codes. The rest is just a case of tidying up the draft.
</div>
<div><br/></div>
<div>
There will be a 6.5.3 release of <a href="http://www.serverframework.com/products---the-websockets-option.html" target="_blank">The Server Framework</a> to include these changes.
</div>]]>
        
    </content>
</entry>

<entry>
    <title>Inside the Windows 8 Registered I/O Extensions, RIO</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/10/inside-the-windows-8-registered-io-extensions-rio.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1144</id>

    <published>2011-10-24T20:30:38Z</published>
    <updated>2012-03-16T21:47:03Z</updated>

    <summary> Before I started to look at RIO for inclusion in The Server Framework I did a quick check on the Microsoft BUILD site to see if there were any sessions that dealt with it specifically, I didn&apos;t find any....</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Winsock Registered I/O" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
Before I started to look at <a href="http://www.serverframework.com/asynchronousevents/2011/10/windows-8-registered-io-networking-extensions.html">RIO for inclusion in The Server Framework</a> I did a quick check on the <a href="http://www.microsoft.com/presspass/events/build/" target="_blank">Microsoft BUILD</a> site to see if there were any sessions that dealt with it specifically, I didn't find any. Once I posted my blog posting I did another check and <a href="http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-593T" target="_blank">found this video that deals specifically with RIO</a>. This gives some in depth details of how RIO works and the kinds of performance improvements that Microsoft has witnessed in their labs. It's interesting and impressive.
</div> 
<div><br /></div>
<div>
One thing that I hadn't realised is that with RIO, <code>SO_SNDBUF</code> and <code>SO_RCVBUF</code> are no longer applicable with RIO, it's as if you're operating with them set to zero. You need to always have recvs pending if you don't want to drop datagrams...
</div>
<div><br /></div>
<div>
More once I've watched it all...
</div>]]>
        
    </content>
</entry>

<entry>
    <title>The WebSocket protocol is done...</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/09/the-websocket-protocol-is-done.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1138</id>

    <published>2011-09-27T11:05:33Z</published>
    <updated>2011-09-27T11:36:48Z</updated>

    <summary> Version 16 of the draft WebSocket protocol specification was just released and the HyBi mailing list announcement for this version contained the following: Chairs and editors believe that this version is final (before the publication of the RFC). Thank...</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
Version 16 of <a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-16" target="_blank">the draft WebSocket protocol specification</a> was just released and the HyBi mailing list announcement for this version contained the following:
</div>
<div><br /></div>
<div>
<i>Chairs and editors believe that this version is final (before the publication of the RFC). Thank you to everybody who helped to get this completed and for the stimulating discussions on the way.</i>
<br />
<i>Now feel free to discuss extensions, WebSocket 1.1, etc. :-).</i>
</div>
<div><br /></div>
<div>
There are no major differences between this and version 13 and the version number of the protocol itself stays at 13 so <a href="http://www.serverframework.com/products---the-websockets-option.html" target="SF">The WebSockets Option Pack</a> supports everything that will be in the final RFC.
</div>
]]>
        
    </content>
</entry>

<entry>
    <title>Designing an asynchronous server-side API for WebSockets </title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/09/designing-an-asynchronous-server-side-api-for-websockets.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1137</id>

    <published>2011-09-27T09:24:04Z</published>
    <updated>2011-09-27T10:53:18Z</updated>

    <summary><![CDATA[ I've just released The WebSockets Option Pack for The&nbsp;Server&nbsp;Framework and I think it's worth running through why the API that I designed ended up as it did. This will probably end up as part of The Server Framework's WebSockets...]]></summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
I've just released <a href="http://www.serverframework.com/products---the-websockets-option.html" target="SF">The WebSockets Option Pack</a> for <a href="http://www.serverframework.com" target="SF">The&nbsp;Server&nbsp;Framework</a> and I think it's worth running through why the API that I designed ended up as it did. This will probably end up as part of <a href="http://www.serverframework.com/ServerFramework/latest/Docs/websockettoolsoverview.html" target="SF">The Server Framework's WebSockets documentation</a>, which is currently a little sparse.
</div>
]]>
        <![CDATA[<div>
The WebSockets protocol is <a href="http://www.lenholgate.com/blog/2011/07/websockets-is-a-stream-not-a-message-based-protocol.html">a message based protocol with unbounded message sizes</a>. This makes a general purpose API more difficult to design as some clients of the API may wish to work in terms of discrete messages and some may wish to work in terms of streams of data. Due to the possibility of frame fragmentation occurring between the client and the server (due to unknown intermediaries being present in the data path) the server-side cannot assume that it will be able to determine the size of an individual message in advance of receiving the final frame for that message.
</div>
<div><br /></div>
<div><a href="http://www.lenholgate.com/blog/assets_c/2011/09/WebSocketsAPI-100ByteMessage-295.html" onclick="window.open('http://www.lenholgate.com/blog/assets_c/2011/09/WebSocketsAPI-100ByteMessage-295.html','popup','width=743,height=203,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.lenholgate.com/blog/assets_c/2011/09/WebSocketsAPI-100ByteMessage-thumb-500x136-295.png" width="500" height="136" alt="WebSocketsAPI-100ByteMessage.png" class="mt-image-none" /></a>
</div>
<div><br /></div>
<div>
Whilst the client code may only ever generate messages that are 100 bytes or less the server could receive those messages as (in the worst case) a sequence of 100 frames each of 1 byte. Since each fragmented frame contains only the size of the current fragment there is no way for the server to determine that the message is 100 bytes long until the final fragment arrives.
</div>
<div><br /></div>
<div><a href="http://www.lenholgate.com/blog/assets_c/2011/09/WebSocketsAPI-FragmentedMessage-298.html" onclick="window.open('http://www.lenholgate.com/blog/assets_c/2011/09/WebSocketsAPI-FragmentedMessage-298.html','popup','width=743,height=411,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.lenholgate.com/blog/assets_c/2011/09/WebSocketsAPI-FragmentedMessage-thumb-500x276-298.png" width="500" height="276" alt="WebSocketsAPI-FragmentedMessage.png" class="mt-image-none" /></a>
</div>
<div><br /></div>
<div>
Often the code that's using the server-side API will also be the code that deploys the client side code which is communicating with it, this allows that code to know things about the messaging it's expecting, after all, it's quite likely that the same organisation created both the client and server code. The challenge for The Server Framework's WebSockets API is to expose the underlying Websockets connection in such a way that the user of the API can decide how best to deal with the inbound data. It's tempting to simply structure the API to work in terms of a series of streams and to pass the problems of message accumulation on to the user of the API, however I felt that was taking the easy way out and doing the users of the API a disservice. Instead the API can be configured to work in terms of complete, distinct, messages as long as they will fit into a single 'buffer' and then degrade to working in terms of a stream if the message is too large. Since the user of the API gets to determine how big the buffers that they use are, they can select a size that is appropriate for their message size, if that is important to them. Users who would prefer to work with streams, or who are working in terms of a single unending stream of data rather than discrete messages, can opt to receive data as it arrives rather than having it accumulated inside The Server Framework's WebSockets API.
</div>
<div><br /></div>
<div>
The API interface looks something like this.
</div>
<div><br /></div>
<div>
<pre class="brush: cpp gutter: false">      virtual void OnData(
         JetByteTools::WebSocket::HyBi::IWebSocket &amp;socket,
         const JetByteTools::Win32::_tstring &amp;text,
         const JetByteTools::WebSocket::MessageStatus status,
         const __int64 messageBytesOutstanding);

      virtual void OnData(
         JetByteTools::WebSocket::HyBi::IWebSocket &amp;socket,
         JetByteTools::IO::IBuffer &amp;buffer,
         const JetByteTools::WebSocket::MessageType type,
         const JetByteTools::WebSocket::MessageStatus status,
         const __int64 messageBytesOutstanding);
</pre>
</div>
<div><br /></div>
<div>
Where <code>type</code> tells us if we have a binary message or a text message, <code>status</code> tells us if this data forms a complete message or if it's just part of the message and <code>messageBytesOutstanding</code> tells us how many bytes are still to come, if it can be determined. There are two versions of the <code>OnData()</code> callback because some clients of the API may wish to work in terms of text messages presented to them pre-converted from UTF-8 into a <code>string</code> and some may prefer the flexibility of having the <code>IBuffer</code> interface passed to them so that they can, in turn, pass it off to another thread for processing, perhaps, using the reference counting functionality that's built into the buffer system.
</div>
<div><br /></div>
<div>
When configuring your server you decide on the size of buffers used and whether the WebSockets protocol handler accumulates messages or simply passes you the data as it arrives. See <a href="http://www.serverframework.com/ServerFramework/latest/Docs/examples-websocketservers.html" target="SF">the WebSockets example servers</a> for more details.
</div>
<div><br /></div>
<div>
When configured correctly a message based implementation could process discrete messages from a WebSockets connection like this:
</div>
<div><br /></div>
<div>
<pre class="brush: cpp gutter: false">void CSocketServer::OnData(
   IWebSocket &amp;socket,
   IBuffer &amp;buffer,
   const MessageType type,
   const MessageStatus status,
   const __int64 messageBytesOutstanding)
{
   if (status != MessageStatusComplete)
   {
      throw CException(
         _T("CSocketServer::OnData()"),
         _T("Unexpected: message larger than buffer size"));
   }

   if (messageBytesOutstanding != 0)
   {
      throw CException(
         _T("CSocketServer::OnData()"),
         _T("Unexpected: message larger than buffer size: ") + ToString(messageBytesOutstanding) + _T(" outstanding"));
   }

   if (type == MessageTypeText)
   {
      // Process a text message
   }
   else
   {
      // Process a binary message
   }

   socket.TryRead();  // Read a new message into a new buffer
}
</pre>
</div>
<div><br /></div>
<div>
You may wish to do your message accumulation yourself, perhaps because the inbound data is actually a stream of application messages presented as a sequence of WebSockets fragments (and remember, you can't rely on the fragments that are sent being the same size as the fragments that are received!). In this case it would be normal to sometimes pass the buffer that you received back to the next call to read so that more data can be added to the end of the buffer...
</div>
<div><br /></div>
<div>
<pre class="brush: cpp gutter: false">   socket.TryRead(&amp;buffer);  // Read more data into this buffer
}
</pre>
</div>
<div><br /></div>
<div>
Accumulating messages larger than your buffer size is easy if you simply chain the buffers together once they're full.
</div>
<div>
<pre class="brush: cpp gutter: false">void CPerConnectionData::OnData(
   IWebSocket &amp;socket,
   IBuffer &amp;buffer,
   const MessageType type,
   const MessageStatus status,
   const __int64 messageBytesOutstanding)
{
   if (m_messageSize == 0)
   {
      m_messageType = type;
   }
   else if (m_messageType != type)
   {
      throw CException(_T("CPerConnectionData::OnDataFrame()"), _T("Unexpected frame type"));
   }

   if (status == MessageStatusComplete &amp;&amp; messageBytesOutstanding == 0)
   {
      AddBuffer(buffer);

      EchoMessage(socket);

      socket.TryRead();
   }
   else if (buffer.GetSize() == buffer.GetUsed())
   {
      AddBuffer(buffer);

      socket.TryRead();
   }
   else
   {
      socket.TryRead(&amp;buffer);
   }
}

void CPerConnectionData::AddBuffer(
   IBuffer &amp;buffer)
{
   const IBuffer::BufferSize used = buffer.GetUsed();

   if (used || m_messageBuffers.IsEmpty())
   {
      m_messageSize += used;

      m_messageBuffers.Add(buffer);
   }
}
</pre>
</div>
<div><br /></div>
<div>
Sending data would be simple if we restricted the user to buffer sized chunks or to single send calls, however an API user may wish to send very large messages, or to send a sequence of fragments where the actual message size is unknown at the time when the message is started. The API supports both of these options as well as the simple 'send a buffer as a text/binary message' option.
</div>
<div><br /></div>
<div>
Here we send a single buffer as a discrete WebSockets message.
</div>
<div><br /></div>
<div>
<pre class="brush: cpp gutter: false">   if (type == MessageTypeText)
   {
      socket.TryWriteText(buffer);
   }
   else
   {
      socket.TryWriteBinary(buffer);
   }
</pre>
</div>
<div><br /></div>
<div>
Whilst here, we send a message as a sequence of buffers. We know the size of the complete message before we start and pass that value in our call to <code>StartMessage()</code>.
</div>
<div><br /></div>
<div>
<pre class="brush: cpp gutter: false">void CPerConnectionData::EchoMessage(
   IWebSocket &amp;socket)
{
   CSmartBuffer buffer(m_messageBuffers.GetNext());

   socket.StartMessage(m_messageType, m_messageSize, buffer.GetRef());

   buffer = m_messageBuffers.GetNext();

   while (buffer.Get())
   {
      socket.SendMessageData(buffer.GetRef());

      buffer = m_messageBuffers.GetNext();
   }

   m_messageSize = 0;
}
</pre>
</div>
<div><br /></div>
<div>
Finally, here we show sending a message as a sequence of fragments, not knowing how long the resulting message will be when we start sending.
</div>
<div><br /></div>
<div>
<pre class="brush: cpp gutter: false">void CFragmentEchoingSocketServer::OnData(
   IWebSocket &amp;socket,
   IBuffer &amp;buffer,
   const MessageType type,
   const MessageStatus status,
   const __int64 messageBytesOutstanding)
{
   const bool echoing = ToBool(socket.GetUserData(m_userDataIndex));

   if (echoing)
   {
      if (status == MessageStatusComplete &amp;&amp; messageBytesOutstanding == 0)
      {
         socket.StartNewFragment(buffer.GetUsed(), buffer, true);

         socket.SetUserData(m_userDataIndex, false);
      }
      else
      {
         socket.StartNewFragment(buffer.GetUsed(), buffer);
      }
   }
   else 
   {
      socket.StartFragmentedMessage(type, buffer.GetUsed(), buffer);

      socket.SetUserData(m_userDataIndex, true);
   }

   socket.TryRead();
}
</pre>
</div>
<div><br /></div>
<div>
See <a href="http://www.serverframework.com/ServerFramework/latest/Docs/examples-websocketservers.html" target="SF">the WebSockets example servers</a> for more details.
</div>
<div><br /></div>
<div>
The WebSockets protocol presents itself as providing a message based interface but given that a single message can have an unbounded size it's complicated to provide a general purpose API which will suit all potential users. By allowing the user of the API to select the buffering and accumulation strategies we provide the flexibility to make it as easy to work with simple, small, discrete messages as it is to work with a potentially endless stream of data. 
</div>
<div><br /></div>
<div>
<a href="http://www.serverframework.com/products---the-websockets-option.html" target="SF">The WebSockets Option Pack</a> for <a href="http://www.serverframework.com" target="SF">The&nbsp;Server&nbsp;Framework</a> is available from version 6.5 of <a href="http://www.serverframework.com" target="SF">The&nbsp;Server&nbsp;Framework</a> which was released recently.
</div> ]]>
    </content>
</entry>

<entry>
    <title>The WebSocket protocol - Draft, HyBi 13</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/09/the-websocket-protocol---draft-hybi-13.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1133</id>

    <published>2011-09-01T07:29:05Z</published>
    <updated>2011-09-01T08:57:27Z</updated>

    <summary> Another day, another WebSocket protocol draft... That&apos;s probably a little unfair actually. Although there have been several drafts in quick succession over the past few weeks the protocol itself has only changed very slightly. The majority of the changes...</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
Another day, another WebSocket protocol <a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-13" target="_blank">draft</a>...
</div>
<div><br /></div>
<div>
That's probably a little unfair actually. Although there have been several drafts in quick succession over the past few weeks the protocol itself has only changed very slightly. The majority of the changes have simply been to the wording and arrangement of the document.
</div>
<div><br /></div>
<div>
<a href="http://www.lenholgate.com/blog/2011/07/the-websocket-protocol-design-by-committee-and-requirements-tracing.html">I was fairly cynical</a> about the likely quality of the final RFC when I started looking at the 09 draft and then, in search of clarification, started following the <a href="http://www.ietf.org/mail-archive/web/hybi/current/maillist.html" target="_blank">HyBi Working Group's mailing list</a>. As I said at the time, there are a lot of interested parties and they all want their own special requirements reflected in the document. What I wasn't really aware of then was that once the document moved towards standardisation the issues would be managed in a much more controlled manner. Since then, Peter Saint-Andre has guided the Working Group and the document in a subtle but controlled manner. The discussions have still been heated (and in many cases circular) but each outstanding issue has finally been resolved and the document has moved forward.
</div>
<div><br /></div>
<div>
When I started following the Working Group I felt that I couldn't make a difference. There were lots of loud personalities that had been involved from the start and came across as having a lot more weight in the process than others on the list. I'm pleased that I decided to ignore my initial fears and raise some of the issues that I was concerned about as in some cases I feel that it made a difference.
</div>
<div><br /></div>
<div>
So, where are we on my list of rants from back in July?
</div>
<div><br /></div>
<div>
<ol>
<li><a href="http://www.lenholgate.com/blog/2011/07/websockets-is-a-stream-not-a-message-based-protocol.html">WebSockets is a stream, not a message based protocol...</a> - The wording of the RFC has been changed so that it doesn't imply that a message based API is the only one that should be considered and private use extension tokens are no longer allowed (so no x-tcp-stream)</li>
<li><a href="http://www.lenholgate.com/blog/2011/07/websockets---why-differentiate-between-text-and-binary-frames.html">Why differentiate between text and binary frames?</a> - No change. The WebSocket protocol needs to deal with UTF8 transformations just so that the users don't.</li>
<li><a href="http://www.lenholgate.com/blog/2011/07/websockets---why-do-we-need-to-mask-data-from-client-to-server.html">Why do we need to mask data from client to server?</a> - The document has been updated to explain the rationale behind this requirement.</li>
<li><a href="http://www.lenholgate.com/blog/2011/07/websockets---the-deflate-stream-extension-is-broken-and-badly-designed.html">How the deflate-stream extension is broken and badly designed</a> - The extension has been removed.</li>
<li><a href="http://www.lenholgate.com/blog/2011/07/websockets---i-miss-the-tcp-half-close.html">I miss the TCP half-close</a> - No change.</li>
</ol>
</div>
<div><br /></div>
<div>
So the main issues that I was concerned about have been dealt with and the remaining two are pretty minor. It's somewhat annoying that <code>deflate-stream</code> was removed after I implemented it, but since I implemented it as a <a href="http://www.serverframework.com/ServerFramework/latest/Docs/class_jet_byte_tools_1_1_socket_1_1_i_filter_stream_socket_connections.html" target="_blank">general purpose connection filter</a> the code can be reused by anyone using <a href="http://www.serverframework.com/" target="_blank">The Server Framework</a> who wants to deflate their TCP data.
</div>
<div><br /></div>
<div>
WebSocket support is available in <a href="http://www.serverframework.com/products---the-websockets-option.html" target="_blank">The Server Framework</a> from release 6.5 which is currently in final testing.
</div>]]>
        
    </content>
</entry>

<entry>
    <title>Autobahn WebSockets protocol compliance test suite</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/08/autobahn-websockets-protocol-compliance-test-suite.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1132</id>

    <published>2011-08-31T07:27:29Z</published>
    <updated>2011-08-31T07:37:25Z</updated>

    <summary> I&apos;m nearing the end of my WebSockets implementation for The Server Framework and have been dealing with various protocol compliance issues. Whilst I have decent unit test coverage I haven&apos;t, yet, sat down and produced compliance specific unit tests...</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Testing" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
I'm nearing the end of my <a href="http://www.lenholgate.com/blog/2011/07/the-websocket-protocol-design-by-committee-and-requirements-tracing.html">WebSockets implementation</a> for <a href="http://www.serverframework.com/">The Server Framework</a> and have been dealing with various protocol compliance issues. Whilst I have decent unit test coverage I haven't, yet, sat down and produced compliance specific unit tests which walk through the various parts of the (ever changing) draft RFC and test each aspect. Looking back, I probably should have taken this approach even though the RFC was fluid. Anyway. One of the people involved in the WebSockets Working Group has a nice set of compliance tests for their implementation and they have made these tests are freely available; so I've been using them! They've really helped nail a few subtle issues in my implementation (and one or two not so subtle issues!).
</div>
<div><br/></div>
<div>
The <a href="http://www.tavendo.de/autobahn/testsuite.html" target="_blank">Autobahn tests can be found here</a>, and the report generated by the current pre-release version of my implementation can be found <a href="http://www.serverframework.com/ServerFramework/6.5/WebSockets/">here</a>.
</div>   ]]>
        
    </content>
</entry>

<entry>
    <title>WebSockets - I miss the TCP half close...</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/07/websockets---i-miss-the-tcp-half-close.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1128</id>

    <published>2011-07-08T15:25:59Z</published>
    <updated>2011-07-26T05:18:43Z</updated>

    <summary> As I mentioned here, the WebSockets protocol is, at this point, a bit of a mess due to the evolution of the protocol and the fact that it&apos;s being pulled in various directions by various interested parties. I&apos;m just...</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Rants" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
As I mentioned <a href="http://www.lenholgate.com/blog/2011/07/the-websocket-protocol-design-by-committee-and-requirements-tracing.html">here</a>, the <a href="http://en.wikipedia.org/wiki/WebSockets" target="_blank">WebSockets protocol</a> is, at this point, a bit of a mess due to the evolution of the protocol and the fact that it's being pulled in various directions by various interested parties. I'm just ranting about some of the things that I find annoying...
</div>
<div><br /></div>
<div>
The WebSockets protocol includes a way for the endpoints to shut down the connection.
</div>
<div>
<pre><small>
   If an endpoint receives a Close frame and that endpoint did not
   previously send a Close frame, the endpoint MUST send a Close frame
   in response.  It SHOULD do so as soon as is practical.  An endpoint
   MAY delay sending a close frame until its current message is sent
   (for instance, if the majority of a fragmented message is already
   sent, an endpoint MAY send the remaining fragments before sending a
   Close frame).  However, there is no guarantee that the endpoint which
   has already sent a Close frame will continue to process data.

   After both sending and receiving a close message, an endpoint
   considers the WebSocket connection closed, and MUST close the
   underlying TCP connection.  The server MUST close the underlying TCP
   connection immediately; the client SHOULD wait for the server to
   close the connection but MAY close the connection at any time after
   sending and receiving a close message, e.g. if it has not received a
   TCP close from the server in a reasonable time period.
</small>
</pre>
</div>
Unfortunately it's a full close of the connection in both directions rather than an indication that the endpoint sending it has nothing more to send. In effect it's a <code>close()</code> rather than a <code>shutdown()</code>. This means that if you ever want to indicate that you're done sending but that you'd like the other end to finish up and then close you have to implement it yourself...]]>
        <![CDATA[<div>
TCP allows you to close each direction of the connection independently. The first peer to shut down their sending side is deemed to have issued the active close. Whoever issues the active close ends up in <code>TIME_WAIT</code> state (see <a href="http://www.serverframework.com/asynchronousevents/2011/01/time-wait-and-its-design-implications-for-protocols-and-scalable-servers.html" target="_blank">here</a> for more details on that). The WebSockets protocol provides a protocol level close message which is intended to do the following:
</div>
<div>
<pre>
<small>
   The closing handshake is intended to complement the TCP closing
   handshake (FIN/ACK), on the basis that the TCP closing handshake is
   not always reliable end-to-end, especially in the presence of man-in-
   the-middle proxies and other intermediaries.

   By sending a close frame and waiting for a close frame in response,
   certain cases are avoided where data may be unnecessarily lost.  For
   instance, on some platforms, if a socket is closed with data in the
   receive queue, a RST packet is sent, which will then cause recv() to
   fail for the party that received the RST, even if there was data
   waiting to be read.
</small>
</pre>
</div>
<div>
Which is all well and good but the ability to perform a half-close would be very useful and its unfortunate omission will no doubt lead to applications inventing their own...
</div> ]]>
    </content>
</entry>

<entry>
    <title>WebSockets - The deflate-stream extension is broken and badly designed</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/07/websockets---the-deflate-stream-extension-is-broken-and-badly-designed.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1126</id>

    <published>2011-07-08T15:00:00Z</published>
    <updated>2011-07-08T15:00:00Z</updated>

    <summary> As I mentioned here, the WebSockets protocol is, at this point, a bit of a mess due to the evolution of the protocol and the fact that it&apos;s being pulled in various directions by various interested parties. I&apos;m just...</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Rants" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
As I mentioned <a href="http://www.lenholgate.com/blog/2011/07/the-websocket-protocol-design-by-committee-and-requirements-tracing.html">here</a>, the <a href="http://en.wikipedia.org/wiki/WebSockets" target="_blank">WebSockets protocol</a> is, at this point, a bit of a mess due to the evolution of the protocol and the fact that it's being pulled in various directions by various interested parties. I'm just ranting about some of the things that I find annoying...
</div>
<div><br /></div>
<div>
The WebSockets protocol is designed to be extended, which is all well and good. Extensions can, at present, be formally specified by RFCs or be "private use" extensions with names that are prefixed with an "x-". So far the only "official" extension is the <code>deflate-stream</code> extension that's detailed in the WebSockets protocol RFC itself. 
</div>
<div><br /></div>
<div>
Unfortunately, the <code>deflate-stream</code> extension isn't really an ideal example of how future extensions should work. A far better example would be the alternative <code>deflate-application-data</code> extension that's detailed <a href="http://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate-01" target="_blank">here</a>.
</div>
<div><br /></div>
So, what's wrong with <code>deflate-stream</code>?]]>
        <![CDATA[<div>
The WebSockets protocol is very open to extension, possibly too open.
</div>
<div>
<pre><small>
4.8.  Extensibility

   The protocol is designed to allow for extensions, which will add
   capabilities to the base protocols.  The endpoints of a connection
   MUST negotiate the use of any extensions during the opening
   handshake.  This specification provides opcodes 0x3 through 0x7 and
   0xB through 0xF, the extension data field, and the frame-rsv1, frame-
   rsv2, and frame-rsv3 bits of the frame header for use by extensions.

   The negotiation of extensions is discussed in further detail in
   Section 9.1.  Below are some anticipated uses of extensions.  This
   list is neither complete nor proscriptive.

   o  Extension data may be placed in the payload data before the
      application data.

   o  Reserved bits can be allocated for per-frame needs.

   o  Reserved opcode values can be defined.

   o  Reserved bits can be allocated to the opcode field if more opcode
      values are needed.

   o  A reserved bit or an "extension" opcode can be defined which
      allocates additional bits out of the payload data to define larger
      opcodes or more per-frame bits.
</small>
</pre>
</div>
<div>
But even with all of this available the <code>deflate-stream</code> extension goes further. The <code>deflate-stream</code> extension completely replaces the wire format of the WebSockets protocol with a stream of compressed data. That is, all framing and headers are included in the compression and you can't decompress a portion of the stream without decompressing all of it. It means that any form of proxy that wants to inspect the contents of WebSocket traffic has to decompress the whole stream to look at the individual frames; it can't even simply use the header information to skip the data portions of the frames as the headers are also compressed. The WebSocket protocol doesn't really even hint at this being the intended use of the extension mechanism, in fact it seems to suggest that whilst extensions can fiddle with the header contents and the frame contents they can't simply replace the entire wire format. There are <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg07093.html" target="_blank">those who think</a> the inclusion of "connection-level" extensions is a bad idea and I agree with them. After all, by following the example of the <code>deflate-stream</code> extension surely the obvious solution to the <a href="http://www.lenholgate.com/blog/2011/07/websockets-is-a-stream-not-a-message-based-protocol.html">rather broken message based</a> aspect of the protocol is simply to write an extension that replaces the entire WebSocket wire format with one that pleases you better; <code>x-raw-tcp-stream</code> anyone? 
</div>
<div><br /></div>
<div>
If the fact that the <code>deflate-stream</code> extension isn't exactly an ideal example of how extensions should be built isn't enough of a reason to remove it from the RFC then surely the fact that it <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg07581.html" target="_blank">doesn't actually work</a> as expected might be? It doesn't seem likely. The problem is that now that <a href="http://www.lenholgate.com/blog/2011/07/websockets---why-do-we-need-to-mask-data-from-client-to-server.html">WebSockets requires client to server data frames to be masked</a> the data being sent from client to server is sufficiently random that compression can't be applied. So, at best, <code>deflate-stream</code>, simply burns server-side CPU when dealing with inbound WebSocket data and at worst it makes the data stream from client to server bigger than it need be. Ideally you'd simply not mask if you were going to use <code>deflate-stream</code> but that doesn't seem to be an option; there appear to be concerns that the extremely unlikely situation that client to server masking is supposed to protect against could occur using unmasked compressed data. Of course the attacker would have to know exactly how the data was going to be deflated and could therefore somehow come up with some payload data that results in a useful stream of deflated data; but really... 
</div>
<div><br /></div>
<div>
Ripping <code>deflate-stream</code> out of the RFC entirely and/or replacing it with <code>deflate-application-data</code> would seem to be the obvious course of action, but there <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg07629.html" target="_blank">seems to be resistance</a> to this. Making it possible to enable <code>deflate-stream</code> in one direction only, i.e. from server to client, would also seem to be a potential win as you'd get your deflated stream in the direction that it can work and not waste time on data that can't be meaningfully compressed. 
</div>
]]>
    </content>
</entry>

<entry>
    <title>Another day, another deadlock avoided with no harm done</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/07/another-day-another-deadlock-avoided-with-no-harm-done.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1127</id>

    <published>2011-07-07T08:43:50Z</published>
    <updated>2011-07-07T09:23:10Z</updated>

    <summary><![CDATA[ I'm currently building a new example server for The&nbsp;Server&nbsp;Framework. This is a variation on one of our proxy server examples for a client that's doing some WebSockets work. The idea is that the server takes an inbound WebSockets connection,...]]></summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Lock Explorer" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
I'm currently building a new example server for <a href="http://www.serverframework.com" target="_blank">The&nbsp;Server&nbsp;Framework</a>. This is a variation on one of our proxy server examples for a client that's doing some <a href="http://en.wikipedia.org/wiki/WebSockets" target="_blank">WebSockets</a> work. The idea is that the server takes an inbound WebSockets connection, creates an outbound TCP connection to the target server and routes data to and from the remote server and the WebSockets client. It's fairly simple stuff to put together once you're up to speed on <a href="http://www.serverframework.com" target="_blank">The&nbsp;Server&nbsp;Framework</a> but my client needed a helping hand and it's another nice example of what you can do with the framework.
</div>
<div><br /></div>
<div>
As I've mentioned before, all of these example servers run a set of black box integration tests during the build process. Once the code has compiled the tests kick off automatically, start the server, run a client against it, check the results are as expected, etc. If the test fails then the build fails. 
</div>
<div><br /></div>
This works great at flushing out any latent issues that the unit tests of all the framework code don't happen to catch. It's good for race condition problems and deadlocks and the like. The fact that the integration tests run on all of my build servers (which are a nice mix of power, memory and processors) means that race conditions and whatever get shaken out of the framework pretty quickly.
]]>
        <![CDATA[<div>
As I mentioned a while back, I've now got <a href="http://www.lenholgate.com/blog/2010/11/tangential-testing.html">memory leak analysis</a> and <a href="http://www.lenholgate.com/blog/2010/11/a-lock-inversion-detector-as-part-of-the-build-is-good.html">lock inversion detection</a> built into the integration test runners. The lock inversion detection can find and report on potential deadlocks without the code under test needing to actually deadlock. It detects that the code COULD deadlock and reports why. You can download the lock inversion detector that I use from <a href="http://www.lockexplorer.com/lock-inversion-detector-download-free.html" target="_blank">here</a> on my <a href="http://www.lockexplorer.com/" target="_blank">www.lockexplorer.com</a> site.
</div>
<div><br /></div>
<div>
Anyway, I set up the integration tests for my new server example this morning and ran it. The tests ran fine but <a href="http://www.lockexplorer.com/lock-inversion-detector-download-free.html" target="_blank">LID</a> reported lock inversions. Every lock inversion is a deadlock waiting to happen and although the tests had run through fine and the server hadn't deadlocked the report from LID was showing me that, given the right set of threading circumstances, it could...  
</div>
<div><br /></div>
<div>
By default I run LID during the integration tests as this runs slightly faster than <a href="http://www.lockexplorer.com/lock-inversion-analyser-buy-now.html" target="_blank">LIA</a> the full featured lock inversion analyser. A simple adjustment to the configuration of the integration test lets me run LIA instead and the report was quite clear as to where the lock inversions were.
</div>
<div>
<small>
<pre class="brush: text gutter: false">****************New Log*****************
Target process has terminated
Process "E:\OutboundGatewayServer\Output\VS2010\URelease\OutboundGatewayServer.exe" exit code: 0
Checking 3151 lock acquisition sequences for inversions

Lock inversions detected!

Lock inversion in acquisition of locks 164 and 41
Primary lock acquisition sequence: 164 @ 171, 41 @ 173
Executed on thread: 8 [6164] "IOPool"
Secondary lock acquisition sequence: 41 @ 154, 164 @ 178
Executed on threads: 5 [1064] "IOPool", 17 [1236] "IOPool", 16 [1288] "IOPool", 3 [2028] "IOPool", 13 [3652] "IOPool", 9 [4056] "IOPool", 12 [4676] "IOPool", 10 [4948] "IOPool", 7 [5444] "IOPool", 8 [6164] "IOPool", 4 [6232] "IOPool", 15 [6412] "IOPool", 11 [6704] "IOPool", 6 [6836] "IOPool", 14 [6876] "IOPool", 18 [7080] "IOPool"
Secondary lock acquisition sequence: 41 @ 154, 164 @ 187
Executed on threads: 5 [1064] "IOPool", 17 [1236] "IOPool", 16 [1288] "IOPool", 3 [2028] "IOPool", 13 [3652] "IOPool", 9 [4056] "IOPool", 12 [4676] "IOPool", 10 [4948] "IOPool", 7 [5444] "IOPool", 8 [6164] "IOPool", 4 [6232] "IOPool", 15 [6412] "IOPool", 11 [6704] "IOPool", 6 [6836] "IOPool", 14 [6876] "IOPool", 18 [7080] "IOPool"
Secondary lock acquisition sequence: 41 @ 154, 164 @ 194
Executed on thread: 12 [4676] "IOPool"
Location: 154
e:\jetbytetools\win32tools\criticalsection.cpp(80) : CCriticalSection::Enter
e:\jetbytetools\win32tools\icriticalsection.cpp(44) : ICriticalSection::Owner::Owner
e:\jetbytetools\websockettools\hybi08\protocolhandler.cpp(260) : CProtocolHandler::OnDataReceived
e:\outboundgatewayserver\socketserver.cpp(206) : CSocketServer::OnReadCompleted
e:\jetbytetools\sockettools\streamsocketconnectionmanagerbase.cpp(128) : CStreamSocketConnectionManagerBase::OnReadCompleted
e:\jetbytetools\sockettools\streamsocketconnectionmanager.h(933) : TStreamSocketConnectionManager&lt;cstreamsocketconnectionmanagerbase&gt;::HandleOperation
e:\jetbytetools\sockettools\tasyncsocket.h(565) : TAsyncSocket&lt;ipoolablestreamsocket,istreamsocketconnectionmanager,istreamsocketcallback&gt;::HandleOperation
e:\jetbytetools\iotools\iopool.cpp(319) : CIOPool::WorkerThread::Run
e:\jetbytetools\win32tools\thread.cpp(241) : CThread::ThreadFunction
---
Location: 171
e:\jetbytetools\win32tools\criticalsection.cpp(80) : CCriticalSection::Enter
e:\jetbytetools\win32tools\icriticalsection.cpp(44) : ICriticalSection::Owner::Owner
e:\outboundgatewayserver\connection.cpp(128) : CConnection::OnConnectionEstablished
e:\outboundgatewayserver\socketserver.cpp(157) : CSocketServer::OnConnectionEstablished
e:\jetbytetools\sockettools\streamsocketconnectionmanagerbase.cpp(86) : CStreamSocketConnectionManagerBase::OnConnectionEstablished
e:\jetbytetools\sockettools\streamsocketconnectionmanager.h(1422) : TStreamSocketConnectionManager&lt;cstreamsocketconnectionmanagerbase&gt;::ConnectCompleted
e:\jetbytetools\sockettools\streamsocketconnectionmanager.h(981) : TStreamSocketConnectionManager&lt;cstreamsocketconnectionmanagerbase&gt;::HandleOperation
e:\jetbytetools\sockettools\tasyncsocket.h(565) : TAsyncSocket&lt;ipoolablestreamsocket,istreamsocketconnectionmanager,istreamsocketcallback&gt;::HandleOperation
e:\jetbytetools\iotools\iopool.cpp(319) : CIOPool::WorkerThread::Run
e:\jetbytetools\win32tools\thread.cpp(241) : CThread::ThreadFunction
---
Location: 173
e:\jetbytetools\win32tools\criticalsection.cpp(80) : CCriticalSection::Enter
e:\jetbytetools\win32tools\icriticalsection.cpp(44) : ICriticalSection::Owner::Owner
e:\jetbytetools\websockettools\hybi08\protocolhandler.cpp(996) : CProtocolHandler::TryRead
e:\jetbytetools\websockettools\hybi08\websocket.cpp(166) : CWebSocket::TryRead
e:\jetbytetools\websockettools\hybi08\websocket.cpp(145) : CWebSocket::TryRead
e:\outboundgatewayserver\connection.cpp(143) : CConnection::OnConnectionEstablished
e:\outboundgatewayserver\socketserver.cpp(157) : CSocketServer::OnConnectionEstablished
e:\jetbytetools\sockettools\streamsocketconnectionmanagerbase.cpp(86) : CStreamSocketConnectionManagerBase::OnConnectionEstablished
e:\jetbytetools\sockettools\streamsocketconnectionmanager.h(1422) : TStreamSocketConnectionManager&lt;cstreamsocketconnectionmanagerbase&gt;::ConnectCompleted
e:\jetbytetools\sockettools\streamsocketconnectionmanager.h(981) : TStreamSocketConnectionManager&lt;cstreamsocketconnectionmanagerbase&gt;::HandleOperation
e:\jetbytetools\sockettools\tasyncsocket.h(565) : TAsyncSocket&lt;ipoolablestreamsocket,istreamsocketconnectionmanager,istreamsocketcallback&gt;::HandleOperation
e:\jetbytetools\iotools\iopool.cpp(319) : CIOPool::WorkerThread::Run
e:\jetbytetools\win32tools\thread.cpp(241) : CThread::ThreadFunction
---
Location: 178
e:\jetbytetools\win32tools\criticalsection.cpp(80) : CCriticalSection::Enter
e:\jetbytetools\win32tools\icriticalsection.cpp(44) : ICriticalSection::Owner::Owner
e:\outboundgatewayserver\connection.cpp(165) : CConnection::OnReadCompleted
e:\outboundgatewayserver\socketserver.cpp(322) : CSocketServer::OnDataFrame
e:\jetbytetools\websockettools\hybi08\protocolhandler.cpp(917) : CProtocolHandler::HandleData
e:\jetbytetools\websockettools\hybi08\protocolhandler.cpp(692) : CProtocolHandler::DispatchFrame
e:\jetbytetools\websockettools\hybi08\protocolhandler.cpp(536) : CProtocolHandler::ProcessDataReceived
e:\jetbytetools\websockettools\hybi08\protocolhandler.cpp(341) : CProtocolHandler::HandleDataReceived
e:\jetbytetools\websockettools\hybi08\protocolhandler.cpp(284) : CProtocolHandler::OnDataReceived
e:\outboundgatewayserver\socketserver.cpp(206) : CSocketServer::OnReadCompleted
e:\jetbytetools\sockettools\streamsocketconnectionmanagerbase.cpp(128) : CStreamSocketConnectionManagerBase::OnReadCompleted
e:\jetbytetools\sockettools\streamsocketconnectionmanager.h(933) : TStreamSocketConnectionManager&lt;cstreamsocketconnectionmanagerbase&gt;::HandleOperation
e:\jetbytetools\sockettools\tasyncsocket.h(565) : TAsyncSocket&lt;ipoolablestreamsocket,istreamsocketconnectionmanager,istreamsocketcallback&gt;::HandleOperation
e:\jetbytetools\iotools\iopool.cpp(319) : CIOPool::WorkerThread::Run
e:\jetbytetools\win32tools\thread.cpp(241) : CThread::ThreadFunction
---
</pre>
</small>
</div>
<div>
Diving into the code for the lock acquisitions in question shows me that in one of the objects concerned I'm holding the lock for longer than I need to. Reducing the scope of the lock means that I don't hold it across the use of the other object which removes the lock inversion. 2 minutes and one recompile from discovery to confirmed fix. A nice start to the day.
</div>]]>
    </content>
</entry>

<entry>
    <title>WebSockets - Why do we need to mask data from client to server?</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/07/websockets---why-do-we-need-to-mask-data-from-client-to-server.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1125</id>

    <published>2011-07-06T14:52:04Z</published>
    <updated>2011-07-06T19:41:44Z</updated>

    <summary> As I mentioned here, the WebSockets protocol is, at this point, a bit of a mess due to the evolution of the protocol and the fact that it&apos;s being pulled in various directions by various interested parties. I&apos;m just...</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Rants" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
As I mentioned <a href="http://www.lenholgate.com/blog/2011/07/the-websocket-protocol-design-by-committee-and-requirements-tracing.html">here</a>, the <a href="http://en.wikipedia.org/wiki/WebSockets" target="_blank">WebSockets protocol</a> is, at this point, a bit of a mess due to the evolution of the protocol and the fact that it's being pulled in various directions by various interested parties. I'm just ranting about some of the things that I find annoying...
</div>
<div><br /></div>
<div>
<small>
<pre>   The client MUST mask all frames sent to the server.  A server MUST
   close the connection upon receiving a frame with the MASK bit set to
   0.  In this case, a server MAY send a close frame with a status code
   of 1002 (protocol error) as defined in Section 7.4.1.
</pre>
</small>
</div>
<div>
Fair enough, but why?
</div>
]]>
        <![CDATA[<div>
The masking in itself is relatively painless to achieve but it interacts poorly with the albeit badly designed <code>deflate-stream</code> extension and forcing the client to mask zero length frames seems unnecessary - though I agree that <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg07645.html" target="_blank">special cases</a> don't really seem warranted.
</div>
<div><br /></div>
<div>
The RFC doesn't explain why masking from client to server is considered essential but a search through the discussion list brings up plenty of <a href="http://www.google.co.uk/search?q=data+masking+site%3Ahttp%3A%2F%2Fwww.ietf.org%2Fmail-archive%2Fweb%2Fhybi%2Fcurrent%2F&amp;hl=en&amp;biw=1258&amp;bih=914&amp;num=10&amp;lr=&amp;ft=i&amp;cr=&amp;safe=off&amp;tbs=" target="_blank">hits</a>. The best descriptions of why can be found <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg05292.html" target="_blank">here</a> and <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg06173.html" target="_blank">here</a>.
</div>
<div><br /></div>
<div>
Masking of WebSocket traffic from client to server is required because of the unlikely chance that malicious code could cause some broken proxies to do the wrong thing and use this as an attack of some kind. Nobody has proved that this could actually happen, but since  the fact that it could happen was reason enough for browser vendors to get twitchy, masking was added to remove the possibility of it being used as an attack.
</div>
<div><br /></div>
<div>
The idea being that since the API level code generating the WebSocket frame gets to select a masking key and mask the data supplied by the application code the application code cannot in any meaningful way dictate the data that ends up passing through the potentially broken intermediaries and therefore can't cause trouble. Since the masking key is in the frame intermediaries can be written to understand and unmask the data to perform some form of clever inspection if they want to. 
</div>
<div><br /></div>
<div>
Now, would it be so hard to add something that explains this to the RFC?
</div>]]>
    </content>
</entry>

<entry>
    <title>WebSockets - Why differentiate between text and binary frames?</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/07/websockets---why-differentiate-between-text-and-binary-frames.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1124</id>

    <published>2011-07-06T13:14:49Z</published>
    <updated>2011-07-06T19:39:06Z</updated>

    <summary> As I mentioned here, the WebSockets protocol is, at this point, a bit of a mess due to the evolution of the protocol and the fact that it&apos;s being pulled in various directions by various interested parties. I&apos;m just...</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Rants" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
As I mentioned <a href="http://www.lenholgate.com/blog/2011/07/the-websocket-protocol-design-by-committee-and-requirements-tracing.html">here</a>, the <a href="http://en.wikipedia.org/wiki/WebSockets" target="_blank">WebSockets protocol</a> is, at this point, a bit of a mess due to the evolution of the protocol and the fact that it's being pulled in various directions by various interested parties. I'm just ranting about some of the things that I find annoying...
</div>
<div><br /></div>
<div>
Back when binary frames were mentioned in the <a href="http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76" target="_blank">WebSocket protocol specification</a> as a slightly hand wavy "something for the future" and only text frames were actually possible to send and receive using the clients at the time then there MAY (in the strictest RFC meaning of the word) have been a need to differentiate between text and binary frames. Especially since text frames were <code>0xFF</code> terminated rather than length prefixed. Now, however, it seems pointless to have a protocol level differentiation between text and binary frame types.
</div>
<div><br /></div>
<div>
This would be, perhaps, less pointless if a general purpose protocol handler could reliably deliver complete messages to an application, but as we've <a href="http://www.lenholgate.com/blog/2011/07/websockets-is-a-stream-not-a-message-based-protocol.html">seen before</a>, that's not possible. Although backtracking to the last complete character in the UTF-8 stream is relatively straight forward (see <a href="http://debuggable.com/posts/streaming-utf-8-with-node-js:4bf28e8b-a290-432f-a222-11c1cbdd56cb" target="_blank">here</a>) there seems to be little value in converting a partial message to a wide string form only to have the have the application layer have to store and concatenate to obtain a complete message... 
</div>
<div><br /></div>
<div>
Robert Gezelter probably says it far better than I can <a href="http://www.rlgsc.com/blog/ruminations/websocket-rediscovered-travails.html" target="_blank">here</a> on his blog; the differentiation between binary and text should occur at the application level.
</div>]]>
        
    </content>
</entry>

<entry>
    <title>WebSockets is a stream, not a message based protocol...</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/07/websockets-is-a-stream-not-a-message-based-protocol.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1123</id>

    <published>2011-07-06T12:34:17Z</published>
    <updated>2012-01-30T17:55:08Z</updated>

    <summary> As I mentioned here, the WebSockets protocol is, at this point, a bit of a mess due to the evolution of the protocol and the fact that it&apos;s being pulled in various directions by various interested parties. I&apos;m just...</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Rants" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
As I mentioned <a href="http://www.lenholgate.com/blog/2011/07/the-websocket-protocol-design-by-committee-and-requirements-tracing.html">here</a>, the <a href="http://en.wikipedia.org/wiki/WebSockets" target="_blank">WebSockets protocol</a> is, at this point, a bit of a mess due to the evolution of the protocol and the fact that it's being pulled in various directions by various interested parties. I'm just ranting about some of the things that I find annoying...
</div>
<div><br /></div>
<div>
The first thing to realise about the WebSockets protocol is that it isn't really message based at all despite what the RFC claims.
</div>
<div><br /></div>
<div>
<small>
<pre>   Clients and servers, after a successful handshake, transfer data back
   and forth in conceptual units referred to in this specification as
   "messages".  A message is a complete unit of data at an application
   level, with the expectation that many or most applications
   implementing this protocol (such as web user agents) provide APIs in
   terms of sending and receiving messages.  The WebSocket message does
   not necessarily correspond to a particular network layer framing, as
   a fragmented message may be coalesced, or vice versa, e.g. by an
   intermediary.
</pre>
</small>
</div>
<div>
and...
</div>
<div><br /></div>
<div>
<small>
<pre>   The WebSocket protocol uses this framing so that specifications that
   use the WebSocket protocol can expose such connections using an
   event-based mechanism instead of requiring users of those
   specifications to implement buffering and piecing together of
   messages manually.
</pre>
</small>
</div>
<div>
Suggest that a message based, event driven design which presents complete messages to the application layer would be a sensible design. Unfortunately once you realise exactly how a message is made up it becomes impossible to provide an interface where you ONLY deliver messages as complete units to the application layer. 
</div>
]]>
        <![CDATA[<div>
WebSocket messages consist of one or more frames. A frame can be either a complete frame or a fragmented frame. Messages themselves do not have any length indication built into the protocol, only frames do. Frames can have a payload length of up to 9,223,372,036,854,775,807 bytes (due to the fact that the protocol allows for a 63bit length indicator) and finally...
</div>
<div><br /></div>
<div>
<small>
<pre>   The primary purpose of fragmentation is to allow sending a message
   that is of unknown size when the message is started without having to
   buffer that message.  If messages couldn't be fragmented, then an
   endpoint would have to buffer the entire message so its length could
   be counted before first byte is sent.  With fragmentation, a server
   or intermediary may choose a reasonable size buffer, and when the
   buffer is full write a fragment to the network.
</pre>
</small>
</div>
<div>
So a single WebSocket "message" can consist of an unlimited number of 9,223,372,036,854,775,807 byte fragments. This makes it impossible for a general purpose Websocket protocol parser to only present complete messages to the application layer in such a way that the application doesn't need to do some form of <i>"buffering and piecing together of messages manually"</i>. At best a general purpose parser could present Websocket data as a 'sequence of streams', given that each "message" is in fact simply a potentially infinite stream of bytes with a message terminator (the FIN bit in the frame header) at the end. It could do this by passing the application layer <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg07683.html" target="_blank">an interface that allowed the application to pull data</a> from the Websocket "message" until it was complete, and that's less than ideal if you are used to working with asynchronous, push, APIs, or trying to avoid unnecessary memory copies...
</div>
<div><br /></div>
<div>
Even if the maximum frame size was reduced, <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg07641.html" target="_blank">as some propose</a>, the problem would still be present due to the fact that a single message can consist of an infinite number of fragments. Likewise a protocol parser can not take the easy route and simply disallow fragmented frames since the RFC states that...
</div>
<div><br /></div>
<div>
<small>
<pre>   o  Clients and servers MUST support receiving both fragmented and
      unfragmented messages.

   o  An intermediary MUST NOT change the fragmentation of a message if
      any reserved bit values are used and the meaning of these values
      is not known to the intermediary.

   o  An intermediary MUST NOT change the fragmentation of any message
      in the context of a connection where extensions have been
      negotiated and the intermediary is not aware of the semantics of
      the negotiated extensions. 
</pre>
</small>
</div>
<div>
Which means that although the application that you've written may send and receive WebSocket messages of an application restricted maximum size you may still find that you receive fragments because an intermediary has decided to fragment your frames. Unless, of course, you subvert the protocol extensions functionality by negotiating "<code>x-{My own private GUID}</code>" extension between your client and server which would neatly prevent any intermediaries (except ones that you'd written yourself) from changing the fragmentation of your frames... Then, of course, the intermediaries may simply decide to remove the client's request for your unknown extension from its initial handshake request to prevent it being negotiated. Or, perhaps more likely, close your connection with a <a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-09#section-11.13" target="_blank">1004 close code</a>...
</div>
<div><br /></div>
<div>
There's <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg07642.html" target="_blank">resistance to proposals</a> to allow the maximum frame size to be negotiated during the handshake phase but there's a standard close code for "frame too big"... Should an application just guess how large it's allowed to go?
</div>
<div><br /></div>
<div>
The <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg07668.html" target="_blank">view of some</a> on the discussion list seems to be that <i>"A server (or client) which exposes the frames as its primary API is doing it wrong."</i> but it seems to me that to write a flexible and general purpose protocol parser which can be used by both push and pull APIs you have no option but to expose details of the message framing. The reason for this is that a general purpose parser cannot buffer complete messages, or even complete frames and so must deliver the data either as a stream of bytes at an application level or as a sequence of partial frames and allow the application to decide how to accumulate the frames into messages. By hiding all of the framing from the application the application developer cannot take advantage of knowledge that he has of the message structure of his particular messages. This is especially useful with asynchronous APIs where the application might be pushed buffers with data in them as the data arrives - which is how  most of <a href="http://www.serverframework.com">The&nbsp;Server&nbsp;Framework</a> happens to operate and how I/O Completion Port centric designs would tend to work. If an application works in terms of, say, messages that could be at most 4096 bytes and is dealing with buffers that can contain complete messages then it could use the details of the data framing to allow it to efficiently accumulate the data into a single buffer and then dispatch the complete message for processing when it receives the final frame. The alternative is to add complexity to the protocol parser by allowing it to accumulate 'messages' up to a configurable size and present complete messages via one callback and incomplete messages via another, or to provide only a stream based pull API which requires the application to needlessly copy data from the protocol parser's buffers into its own.
</div>
<div><br /></div>
<div>
The 63bit fragment size and fragmentation in general appear to come from a requirement for streaming data from one end of the connection to the other, see <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg07661.html" target="_blank">here</a> where a Unixy design idea of simply telling the application to "read x amount of data from this file handle" seems perfectly sensible... Of course this design will fail as soon as you need to send a stream that's bigger than the 63bit frame size will allow and it'll also fail if the frame is fragmented as then the API becomes "read x amount of data from this file handle, but you're not done yet, wait and I'll call you again with more"... At which point and given the possibility of intermediaries that fragment your large fragment down to, lets be generous, 1024 byte fragments anyway, you may as well simply limit the maximum size of frames to something more manageable... But I suppose "nobody will ever need more than 63bits of data length"... 
</div>
<div><br /></div>
<div>
Unfortunately, large frame sizes also open the protocol up to lazy application design. Lets say we're sending a file, we open the file and read some, send a fragmented frame header for the total file length and then simply start sending data. Cool, we don't need to worry about the protocol any more, no need to build messages, just pull the data from disk and send it to the other side. This works fine until you have a read failure, or any other reason to terminate the connection. Since you're in the middle of sending a single huge frame you can't send an application level frame that informs the other side of the problem. You can't even send a WebSocket close frame to shut down the connection cleanly, all you can do is abort the connection...
</div>
<div><br /></div>
<div>
So, WebSockets presents a sequence of infinitely long byte streams with a termination indicator (the FIN bit in the frame header) and not a message based interface as you might initially believe. Given that a general purpose protocol handler can only work in terms of partial frames, we effectively have a stream based protocol with lots of added complexity to provide the illusion of a message based protocol that can actually only ever be dealt with as a stream of bytes. 
</div>
<div><br /></div>
<div>
</div>]]>
    </content>
</entry>

<entry>
    <title>The WebSocket protocol, design by committee and requirements tracing</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/07/the-websocket-protocol-design-by-committee-and-requirements-tracing.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1122</id>

    <published>2011-07-06T07:37:14Z</published>
    <updated>2011-07-08T15:33:12Z</updated>

    <summary><![CDATA[ I've been working with the WebSocket protocol recently, updating the code that implements the protocol in The&nbsp;Server&nbsp;Framework to the latest version of the draft standard (the HyBi 09 version). Whilst this looks like it's almost a real standard, there...]]></summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Geek Speak" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
I've been working with the <a href="http://en.wikipedia.org/wiki/WebSockets" target="_blank">WebSocket protocol</a> recently, updating the code that implements the protocol in <a href="http://www.serverframework.com">The&nbsp;Server&nbsp;Framework</a> to the latest version of the draft standard (the <a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-09" target="_blank">HyBi 09 version</a>). Whilst this looks like it's almost a real standard, there are still lots of potentially open issues as can be seen from the <a href="http://www.ietf.org/mail-archive/web/hybi/current/maillist.html" target="_blank">HyBi discussion mailing list</a>.
</div>
<div><br /></div>
<div>
It's quite clear from some of the less cohesive parts of the draft spec (and more so from the mailing list) that the protocol is very much a design by committee effort. This is both good and bad: It's good that the protocol includes support for a wide range of use cases and, well, it's bad that the protocol is more complex because it includes support for a wide range of use cases...
</div>
<div><br /></div>
<div>
It would be fascinating (and time consuming) to read through the discussion lists from the start and track the reasons behind the various changes and evolutionary steps that the protocol has gone through. Unfortunately, at present some of the elements of the protocol require you to do that if you want to understand why they exist. Without reading all of the discussion list there's a lack of traceability from the various elements of the protocol to the various use case requirements that caused them to be included. Given the evolution of the protocol it's likely that some areas of the protocol have become detached from the original requirements (as other areas have been modified and now no longer support the original requirements, for example, the idea that WebSockets is a message based protocol is undermined by defining a message in terms of an infinite number of fragments without any form of message length indication).
</div>
<div><br /></div>
<div>
All of this means that implementing the protocol from the current RFC is harder than it needs to be and often the wording of the RFC itself will lead you towards designs that don't work well with the actual protocol. Ideally all of these loose ends will get cleaned up before the standard is ratified but the protocol has been in draft form for a long time and I'm sure <a href="http://www.ietf.org/mail-archive/web/hybi/current/msg07647.html" target="_blank">some would prefer</a> it to be ratified as is rather than go through yet another round of changes... 
</div>
<div><br /></div>
<div>
I've been accumulating several rants about the protocol and I'll be presenting them as stand alone blog entries (mainly because they've each grown too large to be joined together in one entry). Often the solution to my frustrations would simply be a modification of the descriptive portions of the RFC text to give a little more explanation as to the thoughts behind the decisions.
</div>
<div><br /></div>
<div>
<ul>
<li><a href="http://www.lenholgate.com/blog/2011/07/websockets-is-a-stream-not-a-message-based-protocol.html">WebSockets is a stream, not a message based protocol...</a></li>
<li><a href="http://www.lenholgate.com/blog/2011/07/websockets---why-differentiate-between-text-and-binary-frames.html">Why differentiate between text and binary frames?</a></li>
<li><a href="http://www.lenholgate.com/blog/2011/07/websockets---why-do-we-need-to-mask-data-from-client-to-server.html">Why do we need to mask data from client to server?</a></li>
<li><a href="http://www.lenholgate.com/blog/2011/07/websockets---the-deflate-stream-extension-is-broken-and-badly-designed.html">How the deflate-stream extension is broken and badly designed</a></li>
<li><a href="http://www.lenholgate.com/blog/2011/07/websockets---i-miss-the-tcp-half-close.html">I miss the TCP half-close</a></li>
</ul></div>]]>
        
    </content>
</entry>

<entry>
    <title>GetExtendedTcpTable(), MIB_TCPTABLE_OWNER_PID and TIME_WAIT</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2011/02/getextendedtcptable-mib-tcptable-owner-pid-and-time-wait.html" />
    <id>tag:www.lenholgate.com,2011:/blog//12.1068</id>

    <published>2011-02-07T16:49:28Z</published>
    <updated>2011-06-23T10:46:25Z</updated>

    <summary> I have a client who is possibly suffering from TIME_WAIT accumulation issues and I thought that the best way to find out for sure was to get them to add the TIME_WAIT perfmon counter to their normal counter logs...</summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Geek Speak" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<div>
I have a client who is possibly <a href="http://www.serverframework.com/asynchronousevents/2011/01/time-wait-and-its-design-implications-for-protocols-and-scalable-servers.html">suffering from <code>TIME_WAIT</code> accumulation issues</a> and I thought that the best way to find out for sure was to get them to add the <code>TIME_WAIT</code> perfmon counter to their normal counter logs so that we could see how and when sockets in <code>TIME_WAIT</code> accumulate on the machine.
</div>
<div><br /></div>
<div>
The problem is that <a href="http://serverfault.com/questions/232091/is-it-possible-to-monitor-the-number-of-tcp-connections-in-time-wait-using-perfmo" target="_blank">there doesn't seem to be a perfmon counter for this</a>, which is unfortunate, especially since you can easily get the number of <i>established</i> and <i>reset</i> connections from the TCPv4 and TCPv6 performance objects.
</div>
<div><br /></div>
<div>
Since all of this information is available by querying the TCP table with <code>GetTcpTable()</code> or <code>GetExtendedTcpTable()</code> I might put together a utility that polls the TCP table and publishes the a <code>TIME_WAIT</code> counter, however, before doing that I decided to hack up a simple example that polls the TCP table and simply dumps the number of connections in <code>TIME_WAIT</code> to the console. This is a bit like <code>netstat</code> and post processing the output.
</div>
<div><br /></div>
<div>
I got this working quite nicely and then thought it might be useful to switch to using <code>MIB_TCPTABLE_OWNER_PID</code> so that I could group the connections by process and so show which processes were causing the <code>TIME_WAIT</code> connections to accumulate. Unfortunately the <code>dwOwningPid</code> field is set to zero for connections in <code>TIME_WAIT</code>, which is somewhat understandable, as they can outlive the process that generated them, but unfortunate when they haven't...
</div>]]>
        
    </content>
</entry>

<entry>
    <title>Lock inversion detector finally fully integrated in my build</title>
    <link rel="alternate" type="text/html" href="http://www.lenholgate.com/blog/2010/11/lock-inversion-detector-finally-fully-integrated-in-my-build.html" />
    <id>tag:www.socketframework.com,2010:/blog//12.991</id>

    <published>2010-11-23T09:25:00Z</published>
    <updated>2011-07-07T07:19:36Z</updated>

    <summary><![CDATA[After a week or so of serious dog fooding I've finally got a nice reliable lock inversion detector running as part of my build system for The&nbsp;Server&nbsp;Framework's example servers. Note: the deadlock detector mentioned in this blog post is now...]]></summary>
    <author>
        <name>Len</name>
        
    </author>
    
        <category term="Geek Speak" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Lock Explorer" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Socket Servers" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.lenholgate.com/blog/">
        <![CDATA[<p>After a week or so of serious <a href="http://en.wikipedia.org/wiki/Eating_your_own_dog_food">dog fooding</a> I've finally got a nice reliable lock inversion detector running as part of my build system for <a href="http://www.serverframework.com/">The&nbsp;Server&nbsp;Framework's</a> <a href="http://www.serverframework.com/ServerFramework/latest/Docs/socketsamples.html">example servers</a>.</p>

<p><b>Note:</b> the deadlock detector mentioned in this blog post is now available for download from <a href="http://www.lockexplorer.com" target="_blank">www.lockexplorer.com</a>.</p>

<p>The build system has always run a set of 'black box' server tests for each server example as part of the build. These start up the example server in question, run a set of connections against it and shut the server down. This proves that the example servers actually work and has also proved a very useful technique for flushing out hard to reproduce bugs; generally race conditions. Since the build system runs so often and on so many different build machines the code gets run enough and on varied enough hardware to flush out these problems.</p>

<p>I've been aiming to get some form of <a href="http://www.lenholgate.com/archives/000643.html">deadlock testing</a> into this build system for a while. The original deadlock detector tool was too slow to run on the build servers and so I developed a cut down version and tuned the injection and monitoring engine. That gave me a detector that COULD run as part of the build system...</p>

<p>This last piece of work has involved <a href="http://www.lenholgate.com/archives/000937.html">integrating that detector</a> into the test scripts so that it gets run and can report failures in a way that will flag the build as failed if it detects any lock inversions. Of course it also detects full blown deadlocks but the lock inversion detection is much more powerful as the code under test need never actually be coaxed into deadlocking it just has to show the possibility of deadlocking for the tests to fail.</p>

<p>I've now run the new build system for the 70+ example servers and I've found one lock inversion in three places of the framework; the inversion was due to a pattern that I repeated for the <a href="http://www.serverframework.com/products---the-ssltls-using-openssl-option.html">OpenSSL</a>, <a href="http://www.serverframework.com/products---the-ssltls-using-schannel-option.html">SChannel</a> and <a href="http://www.serverframework.com/products---the-sspi-negotiate-option.html">SSPI</a> connectors and was easily fixed by removing the lock that was the cause of the inversion and instead using one lock rather than two. This clearly shows what I've known for a long time, object oriented programming and encapsulation in particular are often at odds with concurrency. It's obvious to make an object thread safe by giving it a lock that it can use to protect itself; it's often then more complex to ensure that these objects don't deadlock as they call into each other whilst holding locks that aren't evident at the call site. At present I consider it a post design optimisation to break encapsulation and, potentially, share locks across related objects. The lock inversion detector as part of the build makes it obvious when it's not just an optimisation but a requirement.</p>

The lock inversions mentioned above are removed in <a href="http://www.serverframework.com/asynchronousevents/2010/11/latest-release-of-the-server-framework-632.html">release 6.3.2 of The&nbsp;Server&nbsp;Framework which was released today</a>.]]>
        
    </content>
</entry>

</feed>



