TFixedFrameTransport
--------------------
Key: THRIFT-124
URL: https://issues.apache.org/jira/browse/THRIFT-124
Project: Thrift
Issue Type: New Feature
Reporter: Pete Wyckoff
Priority: Minor
TFixedFrameTransport (TFFT) will write data to another transport in units of
sub-frames that will be fit into frames consisting of:
A FrameHeader,
N SubFrameHeaders,
N SubFrameData Payloads
...
With each frame being the same size. TFixedFrameTransport will checksum both
the frame header and the subframe headers and will have the option of providing
a checksum per subframe. Note that a sub-frame may span multiple frames.
See [https://issues.apache.org/jira/browse/THRIFT-111] for the exact format of
the headers.
The spec would look something like the following although it's sure to change a
bit.
{code:title=TFixedFrameTransport}
// TFixedFrameHeader and TFixedFrameSubHeader are thrift generated
class TFixedFrameTransport {
public TFixedFrameHeader(TFixedFrameHeader, i32 frameSize, TTransport otrans);
public void writeSubFrame(TFixedFrameSubHeader, buf, length) {
startSubFrame(subHeader), write(buf, length); }
public void startSubFrame(TFixedFrameSubHeader);
public void write(buf, length);
public TFixedFrameSubFrameHeader readSubFrameHeader() ;
public TFrameHeader readFrameHeader();
public i32 read(buf, length);
public void bytesLeftInCurrentSubFrame();
}
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.