Frame header format
gritzko opened this issue · comments
Needs specification, esp event/ref uuids
например, может быть header без содержимого, если, скажем, query просит последние изменения, а их нет, всё так же
метаданные - event id и ref id, которые задают интервал event id, входящих во фрейм
ref id == 0 значит, что это полное состояние
event id = 0 значит, что это пустое состояние
What is a header? Is it mandatory? Must there be exactly 1 header?
A reducer's output is always a frame that MUST start with a header.
A reducer MAY produce several headers thus delimiting chunks of output.
A general frame may contain a mix of raw ops and reducer outputs, thus it can contain any number of headers (may have none if empty or all-raw).
Consider frame containing reducer output and then some raw ops. What does it look like in the text format? Are there any means to signal an end of the frame or start another chunk in the text format?
*lww #obj @time1+origin !
:one =1 ,
:two 'два' ,
@time2+origin :three ^3.0 ;
.
(lww reducer output plus one yet-unreduced op)
- another chunk starts with another header;
- a raw op does not belong to any output, hence any chunk;
- a frame is explicitly finalised with a period
.
(required for separating frames in a byte stream, otherwise optional)
I'm sorry, but in example above I don't see how "another chunk starts with another header".
Also comma and semicolon seem not documented. What do they mean?
Also, the document states header is an op, but this header isn't, it has no location.
Also comma and semicolon seem not documented. What do they mean?
Oops. Comma terminates reduced ops, semicolon terminates raw ops.
Comma is optional.
another chunk starts with another header;
Let's reword this: a chunk consists of a header !
or a query header ?
op followed by reduced ,
ops belonging to the chunk. Raw ops form their own one-op chunk.
Also, the document states header is an op, but this header isn't, it has no location.
Omitted UUID is set to the default value, which is the same UUID of the previous op. For the first op, the default is 0
.
e.g. see https://github.com/gritzko/ron-test/blob/master/05-rga.in.ron#L38
I'll remove that zero default UUID. Indeed, it adds confusion but makes no huge savings.
e.g. *lww #object @version !
or *lww #object @version :0 !