on master help sign in
graph store and arch docs modifications per request
1d5c6d9David Kerschner
tutorials/concepts/arch.md+3−3
@@ -6,11 +6,11 @@ template = "doc.html"
6
6
7# Landscape Architecture
7# Landscape Architecture
8
8
9−Landscape is designed using a particular userspace architecture model known as store/hook/thread. This model divides applications into multiple parts, two gall applications and threads.
9+Landscape is designed using a particular userspace architecture mode consisting of stores, hooks, and threads.
10
10
11## Stores
11## Stores
12
12
13−Stores are the first of the two gall models to form this architecture. A store is intended to maintain all the state required for an application or set of applications. Stores are intended to be only accessible by the ship it's running on. A store may not send pokes, peeks, or watches. A store should be treated and thought of as a database table. While this is not enforced, it is the convention. The primary example of a store is `graph-store` which can be found at `app/graph-store`
13+Stores are the first of the two gall models to form this architecture. A store is intended to maintain all the state required for an application or set of applications. Stores are intended to be only accessible by the ship it's running on. A store may not send pokes, peeks, or watches. A store should be treated and thought of as a database. While this is not enforced, it is the convention. The primary example of a store is `graph-store` which can be found at `app/graph-store`
14
14
15## Hooks
15## Hooks
16
16
@@ -18,4 +18,4 @@ Hooks are the second gall application used in this architecture and are not alwa
18
18
19## Thread
19## Thread
20
20
21−Threads are used when you want to have a series of transactions to a store where the order of those transactions matters. No guarantees are made about what order things process in for individual requests to a gall application and threads are intended to address this. Threads do not maintain their own state while inactive and are instead run only upon request. A good example is `ted/graph/create`
21+Threads are used when you want to have a series of transactions on a store where the order of those transactions matters. No guarantees are made about the order in which individual requests to a gall applications are processed; threads were introduced to address this. Threads do not maintain their own state while inactive and are instead run only upon request. A good example is `ted/graph/create`
tutorials/hoon/graph.md+18−13
@@ -6,7 +6,7 @@ template = "doc.html"
6
6
7# What is Graph Store?
7# What is Graph Store?
8
8
9−Graph store is a gall implementation of a tree-based database that has an affordance for cyclic structures by allowing nodes to reference other nodes. It is most comparable to modern NoSQL databases in structure, though it allows for schemas to be written in the form of marks. It is used as the backend for an increasing number of Landscape applications, and is considered to be best used for social data.
9+Graph Store is a gall implementation of a tree with additional virtual edges by allowing nodes to reference other nodes. It is most comparable to modern NoSQL databases in structure, though it allows for schemas to be written in the form of marks. It is used as the backend for an increasing number of Landscape applications, and is considered to be best used for social data.
10
10
11## Data types
11## Data types
12
12
@@ -22,12 +22,17 @@ Graph store is a gall implementation of a tree-based database that has an afford
22
22
23`post` is defined in `sur/post`. It contains:
23`post` is defined in `sur/post`. It contains:
24
24
25+```hoon
26++$ post
25−`author=ship`
27+ $: author=ship
26−`index`
28+ =index
27−`time-sent=time`
29+ time-sent=time
28−`contents=(list content)`
30+ contents=(list content)
29−`hash=(unit hash)`
31+ hash=(unit hash)
30−`signatures`
32+ =signatures
33+ ==
34+```
35+
31
36
32Most of these elements are self explanatory.
37Most of these elements are self explanatory.
33
38
@@ -45,11 +50,11 @@ When interacting with `graph-store` you will need to create an `update`
45
50
46The reason this is a union is to serve as future proofing for version changes.
51The reason this is a union is to serve as future proofing for version changes.
47
52
48−An `update-0` can either be logged in the case of adding and removing nodes or signatures or non logged as in the case of adding or removing a graph. This logging refers to if this action adds an entry to the update log that is used to synchronize state between ships.
53+An `update-0` can either be logged in the case of adding/removing nodes or signatures, or non-logged as in the case of adding/removing a graph. This logging refers to if this action adds an entry to the update log that is used to synchronize state between ships.
49
54
50−Below is an excerpt or `sur/graph-store.hoon` at the time of writing showing the definition of `logged-update-0` and `update-0` which should now be readable.
55+Below is an excerpt of `sur/graph-store.hoon` at the time of writing, showing the definition of `logged-update-0` and `update-0` which should now be readable.
51
56
52−```
57+```hoon
53+$ logged-update-0
58+$ logged-update-0
54 $% [%add-nodes =resource nodes=(map index node)]
59 $% [%add-nodes =resource nodes=(map index node)]
55 [%remove-nodes =resource indices=(set index)]
60 [%remove-nodes =resource indices=(set index)]
@@ -80,7 +85,7 @@ Below is an excerpt or `sur/graph-store.hoon` at the time of writing showing the
80
85
81## Pokes
86## Pokes
82
87
83−Graph store can be poked with a `graph-update` which can:
88+Graph Store can be poked with a `graph-update`, which can:
84 - add and remove a graph
89 - add and remove a graph
85
90
86 `[%add-graph =resource =graph mark=(unit mark)]`
91 `[%add-graph =resource =graph mark=(unit mark)]`
@@ -111,7 +116,7 @@ Graph store can be poked with a `graph-update` which can:
111
116
112 `[%unarchive-graph =resource]`
117 `[%unarchive-graph =resource]`
113
118
114−## Scrys
119+## Scries
115
120
116What follows is a summary of the scrys available in graph-store
121What follows is a summary of the scrys available in graph-store
117
122
@@ -150,4 +155,4 @@ What follows is a summary of the scrys available in graph-store
150
155
151## Marks
156## Marks
152
157
153−There are marks in `mar/graph/validator` that are worth review. They are each short enough to read quickly. They are used to validate the shapes of various nouns to be stored in the graph-store.
158+There are marks in `mar/graph/validator` that are worth reviewing. They are each short enough to read quickly. They are used to validate the shapes of various nouns to be stored in the graph-store.