Thing Descriptions TD Serialization Carsten Bormann 2017-07-11 1 - - PowerPoint PPT Presentation

thing
SMART_READER_LITE
LIVE PREVIEW

Thing Descriptions TD Serialization Carsten Bormann 2017-07-11 1 - - PowerPoint PPT Presentation

Serializing Thing Descriptions TD Serialization Carsten Bormann 2017-07-11 1 Objectives Represent TD information What do we want optimize ? compactness? usefulness for processing? What are our assumptions about the


slide-1
SLIDE 1

Serializing

Thing

Descriptions

TD Serialization • Carsten Bormann • 2017-07-11 1
slide-2
SLIDE 2

Objectives ➔ Represent TD information What do we want optimize? — compactness? — usefulness for processing? What are our assumptions about the devices... — holding TDs? — processing TDs?

TD Serialization • Carsten Bormann • 2017-07-11 2
slide-3
SLIDE 3

Maximizing compactness — Use traditional data compression — e.g., deflate (algorithm behind gzip) — LZ77: exploit bytewise sharing over window — no relation to semantics — compression requires view of window — decompression is a copying process

TD Serialization • Carsten Bormann • 2017-07-11 3
slide-4
SLIDE 4

Choosing a compressor — LZ77: Sharing via <distance, length> — Need entropy encoder, too — Huffman, Arithmetic — Recent advances Classical algorithms: — Deflate (RFC 1951 from 1996): LZ77 + Huffman — LZ4 (low complexity)

TD Serialization • Carsten Bormann • 2017-07-11 4
slide-5
SLIDE 5

Maximizing processability — Keep data in a processable form — Minimize the need for copying — avoid escaping — avoid piecing together — Maybe avoid a classical compressor — "Semantic Sharing"?

TD Serialization • Carsten Bormann • 2017-07-11 5
slide-6
SLIDE 6

Experiment

wot-thing-description/test-bed/data/plugfest/2017-05-osaka/MyLED_f.jsonld

— JSON file: 3116 — JSON no whitespace: 1447 — deflate: 323, lz4: 415, lz4hc: 411 — CBOR: 1210 — deflate: 325, lz4: 416, lz4hc: 404 — CBOR packed (semantic sharing only): 793 — CBOR packed (prefix compression, too): 564

TD Serialization • Carsten Bormann • 2017-07-11 6
slide-7
SLIDE 7

Conclusion

— Packing (exploiting structural sharing) — maintains processability — saves ~ 1/3 (implementation not yet complete) — Prefix sharing helps with URLs, another 20 % — but reduces processability — Could further improve by adding static dictionary — In the example: 119 bytes of mostly static data:

["name","@type","links","application/json","outputData","mediaType","href", {"valueType":{"type":"number"}},["Property"],"writable","valueType","type"]

TD Serialization • Carsten Bormann • 2017-07-11 7