Subject: My slides from the Sunday XML session

From: "Tim Bray" <[email-masked]>
Date: Sun, 2 Dec 2007 17:56:34 -0800

Online at http://www.tbray.org/tmp/IETF70.pdf

 -Tim

---

From: "Timur Shemsedinov" <[email-masked]>
Date: Tue, 4 Dec 2007 04:49:34 +0200

Hello,

> Online at  http://www.tbray.org/tmp/IETF70.pdf

Thanks for generalizing sight. In addition I wont to notice that it is
possible to combine plain text, binary format and xml-like hierarchical
language in one approach. It is possible to replace lacks of each approach
with of advantages of another.

My team in Research Institute of System Technologies has been using various
approaches and representation forms for a long time: like XML, Jason, Binary
and even own language for structured data called USP (since 1998). Having
the same problems with parsing speed and some syntactic excesses as an XML
have, we have got insignificant advantage in speed (20-25%) and the size
(15-20%). However, loving optimization, we were asked by a question of
improvement of this language. Now we have so simple and obvious structure
that I don't know why it has taken a lot of time.

Example:
1: Node1:Class1 Field1[value1] Field2[Value2] Link1<url1>
Set1{item1,item2,item3}
2: SubNode1 Field3[value3] Set2{} Set3{item4,item5} Link2<url2>
Field4[value4]
2: SubNode2 Field5[value5] Field6[value6]
3: SubSubNode1 Set4{item6,item7} Field7[value7] Field8[value8] Link3<url3>
2: SubNode3 Field9[value9]
3: SubSubNode2:Class2,Class3 Field10[value10] Link4<url4>

Comments:
- Each node of a tree in a new line
- Numbers in the beginning of a line is a hierarchy level of node, i.e. in
this example we have tree:
   Node1
     SubNode1
     SubNode2
       SubSubNode1
     SubNode3
       SubSubNode2
- Numbering hierarchy gives us two advantages at once: it is possible escape
analyzing quantity of open/close blocks, as in:
<tag1><tag2><tag1></tag1></tag2><tag2></tag2></tag1>
or
(...(...(...)...)...(...)...)
and it gives us possibility to skip entire branch of tree only with one
substring find operation
- This format does not concede Binary on brevity. For example, here is
binary analogue:
[Level 4
bytes][Name][0x00][Class][0x00][FieldName][0x00][Value][0x00][0x13][0x10]...
So, full "Binarization" gives no advantage in size or speed, neither in
brevity nor in simplicity of syntactic analysis.

This approach is tested on applications where the given structure is used
not only as an input data format but also as data representation in memory.
Besides we use this format for ours network protocols and even have made a
databases management system which stores data in this format, placing
everyone node in one or more memory page. DBMS organizes indexing, search
and fast binding together data of required nodes. So data storage format
through network packets (without extra repacking) is direct hits the client
application memory.

-Timur