Commit adb0e53c authored by Nils Goroll's avatar Nils Goroll

dev doc

parent 0f30a816
......@@ -6,15 +6,29 @@ digraph bytes_node_state {
node_insert -> ST_PRIVATE
vdp_pesi_init -> ST_PRIVATE
ST_PRIVATE -> ST_OPEN
ST_PRIVATE -> ST_CLOSED [label="set_closed()"]
tree_free [label="tree_free()"]
ST_OPEN -> ST_CLOSED [label="set_closed()"]
subgraph cluster_T_NEXUS {
label="T_NEXUS"
ST_DATA -> ST_UNPENDING [label="set_unpending()"]
ST_PRIVATE -> ST_OPEN [label="set_open()"]
ST_PRIVATE -> ST_CLOSED [label="set_closed()"]
ST_DATA -> ST_DELIVERED [label="set_delivered()\nOnly for magic nodes"]
ST_OPEN -> ST_CLOSED [label="set_closed()"]
}
subgraph cluster_leaf {
label="leaf nodes:\nT_DATA\nT_CRC\nT_SUBREQ\nT_FINAL"
ST_DATA -> ST_UNPENDING [label="set_unpending()"]
}
ST_CLOSED -> ST_DELIVERED [label="set_delivered()\n"]
ST_UNPENDING -> ST_DELIVERED [label="set_delivered()"]
ST_CLOSED -> ST_DELIVERED [label="set_delivered()\nAll children must be delivered"]
ST_DATA -> ST_DELIVERED [label="set_delivered()\nif NULL data"]
ST_DELIVERED -> tree_free
ST_PRIVATE -> ST_DATA [label="node_mutate_*()"]
}
\ No newline at end of file
digraph tree {
root [shape=diamond]
subgraph cluster_ex {
label="Example"
root -> a
root -> b
root -> c
root -> d
root -> e
root [shape=diamond]
a [shape=triangle]
b [shape=box]
c [shape=triangle]
d [shape=diamond]
e [shape=triangle]
root -> a
root -> b
root -> c
root -> d
root -> e
// -
a [shape=triangle]
b [shape=box]
c [shape=triangle]
d [shape=diamond]
e [shape=triangle]
d -> da
d -> db
d -> dc
d -> dd
// -
da [shape=triangle]
db [shape=box]
dc [shape=triangle]
dd [shape=triangle]
d -> da
d -> db
d -> dc
d -> dd
da [shape=triangle]
db [shape=box]
dc [shape=triangle]
dd [shape=triangle]
}
subgraph cluster_types {
label="Types"
subgraph cluster {
/* legend */
T_NEXUS [shape=diamond]
T_DATA [shape=triangle]
T_SUBREQ [shape=box]
T_DATA [shape=triangle, label="T_DATA\nT_CRC\n(bytes to oc)"]
T_SUBREQ [shape=box, label="T_SUBREQ\nT_FINAL\n(oc / thread)"]
T_NEXUS -> T_DATA
T_NEXUS -> T_SUBREQ
T_NEXUS2 [shape=diamond, label=T_NEXUS]
T_NEXUS -> T_NEXUS2
T_NEXUS2 -> more1
T_NEXUS2 -> more2
T_NEXUS2 -> more3
more1 [shape=none, label="..."]
more2 [shape=none, label="..."]
more3 [shape=none, label="..."]
}
}
\ No newline at end of file
......@@ -112,22 +112,38 @@ enum n_type {
/*
* see state.dot:
*
* ST_DATA: may never have any children
* ST_DATA: may never have any children
*
* T_DATA / T_CRC / T_SUBREQ / T_FINAL
*
* ST_PRIVATE: may receive pushes creating children
* unpending must not yet touch it
* creating children unlocked
* XXX can change into other types
* unpending must not yet touch it
* children can be created unlocked
* can change into other types
*
* T_NEXUS only
*
* ST_OPEN: may receive pushes creating children
* unpending may deliver in parallel ("front delivery")
* any changes below loced only
*
* T_NEXUS only
*
* ST_OPEN: may receive pushes creating children
* unpending may deliver in parallel
* XXX OR NOT - WIP
*
* ST_CLOSED: the request is done, no pushes can occur
* ST_CLOSED: the request is done, no pushes can occur,
* unpending can proceed upwards
*
* T_NEXUS only
*
* ST_UNPENDING: in the process of being pushed to the client
*
* T_DATA / T_CRC / T_SUBREQ / T_FINAL
*
* ST_DELIVERED: We have pushed data up
*
* any type
*
* for T_NEXUS, means "anything below is delivered"
*/
enum n_state {
ST_INVALID = 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment