The DTN Reference Implementation - Delay Tolerant Networking ...
The DTN Reference Implementation - Delay Tolerant Networking ...
The DTN Reference Implementation - Delay Tolerant Networking ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Persistent Storage Interface (2)<br />
• SerializableObject interface allows a single function<br />
to define marshal / unmarshal for all DB types<br />
int Bundle::Serialize(SerializeAction* a) {<br />
}<br />
a->process(“bundleid”, &bundleid_);<br />
a->process(“source”, &source_);<br />
a->process(“dest”, &dest_);<br />
a->process(“priority”, &priority_);<br />
a->process(“custreq”, &cust_req_);<br />
a->process(“return_rcpt”, &return_rcpt_);<br />
// ...<br />
• Adding a new DB implementation requires<br />
implementing a handful of functions for different<br />
basic types (int, string, etc)<br />
– Berkeley DB implementation packs fields into a byte array<br />
– SQL implementations generate an update command e.g.<br />
update bundles set custreq = true where bundleid = 10<br />
3/13/05 <strong>DTN</strong> <strong>Reference</strong> <strong>Implementation</strong> 26