摘要:
A forward and backward compatible streaming protocol quires subsequent versions of the protocol to be purely additive relative to earlier versions. When a data segment is transmitted as a data stream, a first stream of data that is in accordance with a first version of the protocol is transmitted, with additional streams of data that are in accordance with subsequent versions of the protocol appended in sequence to the first stream of data. When a read module implements an earlier version of the protocol than a write module, the data segment is truncated to include only the data supported by the version implemented by the read module. On the other hand, when the read module implements a later version of the protocol than the write module, receipt of the data segment is terminated after the data supported by the version implemented by the write module is received.
摘要:
A forward and backward compatible streaming protocol requires subsequent versions of the protocol to be purely additive relative to earlier versions. When a data segment is transmitted as a data stream, a first stream of data that is in accordance with a first version of the protocol is transmitted, with additional streams of data that are in accordance with subsequent versions of the protocol appended in sequence to the first stream of data. When a read module implements an earlier version of the protocol than a write module, the data segment is truncated to include only the data supported by the version implemented by the read module. On the other hand, when the read module implements a later version of the protocol than the write module, receipt of the data segment is terminated after the data supported by the version implemented by the write module is received.
摘要:
A set of stream writer and reader classes and methods enable object frameworks to communicate with each other despite problems with missing classes due to mismatched versions. The stream writers are modified to deal with a new version of a class that extends from a class in an existing version by writing alternate object information compatible with the existing version when the future object class information is streamed. In this manner, alternate object information is written for each older version. The information for each of the alternate objects corresponding to each older version is added after the existing object information as an extension with the length of the extension written at the beginning. The stream readers are modified so that when an older version stream reader reads the object information and does not understand the first alternate object (which might correspond to a later version), it skips the length specified for that extension and reads the second alternate object. If the second alternate object information is not understood, the reader skips the non-understood object information and continues with each alternate object. If none of the alternates is understood, then an exception is thrown. In one embodiment, the information for alternate objects which are not used is not discarded, but is instead saved in a temporary storage. Then, if the object is streamed out again, the stored information is added back into the stream.
摘要:
A forward and backward compatible streaming protocol requires subsequent versions of the protocol to be purely additive relative to earlier versions. When a data segment is transmitted as a data stream, a first stream of data that is in accordance with a first version of the protocol is transmitted, with additional streams of data that are in accordance with subsequent versions of the protocol appended in sequence to the first stream of data. When a read module implements an earlier version of the protocol than a write module, the data segment is truncated to include only the data supported by the version implemented by the read module. On the other hand, when the read module implements a later version of the protocol than the write module, receipt of the data segment is terminated after the data supported by the version implemented by the write module is received.