on master help sign in
graph store and arch docs modifications per request

https://github.com/urbit/docs/pull/973

commit1d5c6d93bb3111018e49a4cba25af0f261c90013 authorDavid Kerschner <dkerschner@hcoop.net> dateWed 25 Nov 2020, 11:40 (6 years ago) parent6ed5668
2 files changed+21−16
tutorials/concepts/arch.md+3−3 tutorials/hoon/graph.md+18−13
tutorials/concepts/arch.md+3−3
@@ -6,11 +6,11 @@ template = "doc.html"
66
77# Landscape Architecture
88
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.
1010
1111## Stores
1212
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`
1414
1515## Hooks
1616
@@ -18,4 +18,4 @@ Hooks are the second gall application used in this architecture and are not alwa
1818
1919## Thread
2020
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"
66
77# What is Graph Store?
88
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.
1010
1111## Data types
1212
@@ -22,12 +22,17 @@ Graph store is a gall implementation of a tree-based database that has an afford
2222
2323`post` is defined in `sur/post`. It contains:
2424
25−`author=ship`
26−`index`
27−`time-sent=time`
28−`contents=(list content)`
29−`hash=(unit hash)`
30−`signatures`
25+```hoon
26++$ post
27+ $: author=ship
28+ =index
29+ time-sent=time
30+ contents=(list content)
31+ hash=(unit hash)
32+ =signatures
33+ ==
34+```
35+
3136
3237Most of these elements are self explanatory.
3338
@@ -45,11 +50,11 @@ When interacting with `graph-store` you will need to create an `update`
4550
4651The reason this is a union is to serve as future proofing for version changes.
4752
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.
4954
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.
5156
52−```
57+```hoon
5358+$ logged-update-0
5459 $% [%add-nodes =resource nodes=(map index node)]
5560 [%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
8085
8186## Pokes
8287
83−Graph store can be poked with a `graph-update` which can:
88+Graph Store can be poked with a `graph-update`, which can:
8489 - add and remove a graph
8590
8691 `[%add-graph =resource =graph mark=(unit mark)]`
@@ -111,7 +116,7 @@ Graph store can be poked with a `graph-update` which can:
111116
112117 `[%unarchive-graph =resource]`
113118
114−## Scrys
119+## Scries
115120
116121What follows is a summary of the scrys available in graph-store
117122
@@ -150,4 +155,4 @@ What follows is a summary of the scrys available in graph-store
150155
151156## Marks
152157
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.