Improve formatting for architecture diagram

This commit is contained in:
Keavon Chambers
2021-03-28 01:50:23 -07:00
parent 8f922c7b9a
commit 00fa95aa91
+55 -52
View File
@@ -5,15 +5,16 @@
#direction: down #direction: down
#bendSize: 0.2 #bendSize: 0.2
#.dependencies: visual=note direction=right title=bold #.hdiagram: visual=note direction=right title=bold
#.vdiagram: visual=note direction=down title=bold
#.client: visual=roundrect fill=lightgreen title=bold #.client: visual=roundrect fill=lightgreen title=bold
#.editor: fill=lightblue title=bold #.editor: fill=lightblue title=bold
#.document: fill=darkorange title=bold #.document: fill=darkorange title=bold
#.renderer: fill=gold title=bold #.renderer: fill=gold title=bold
// Dependencies // Clients and Core Libraries
[<dependencies> Clients and Core Libraries| [<hdiagram> Clients and Core Libraries - Usage Overview|
[<client> Frontend Editor Client] [<client> Frontend Editor Client]
[<client> Headless Editor Client] [<client> Headless Editor Client]
[<client> Application Client [<client> Application Client
@@ -29,16 +30,17 @@
[Application Client] Depends On -> [Renderer Core Library] [Application Client] Depends On -> [Renderer Core Library]
] ]
// Client [<vdiagram> Clients and Core Libraries - Major Modules|
// Client
[<client> Frontend Implementation| [<client> Frontend Implementation|
One of many possible frontend implementations, One of many possible frontend implementations,
such as the native or web client. such as the native or web client.
] ]
[Frontend Implementation] Response <-> Event [Dispatcher] [Frontend Implementation] Response <-> Event [Dispatcher]
[Frontend Implementation] <-- Rendered Viewport [<renderer> From: Final Render Assembler] [Frontend Implementation] <-- Rendered Viewport [<renderer> From: Final Render Assembler]
[<client> CLI Implementation| [<client> CLI Implementation|
A possible text-based CLI program that A possible text-based CLI program that
wraps Graphite Document. Users can wraps Graphite Document. Users can
pass a .gdd document and operation to pass a .gdd document and operation to
@@ -46,77 +48,77 @@
to the supplied .gdd file. Users can also to the supplied .gdd file. Users can also
pass a .gdd document and request a pass a .gdd document and request a
render. Caches are saved to disk. render. Caches are saved to disk.
] ]
[CLI Implementation] -> [Design Document Maintainer] [CLI Implementation] -> [Design Document Maintainer]
// Editor // Editor
[<editor> Dispatcher| [<editor> Dispatcher|
Convert all events from the frontend into Actions Convert all events from the frontend into Actions
and Operations. Actions are diffs to update state and Operations. Actions are diffs to update state
stores. Operations are history events in a .gdd stores. Operations are history events in a .gdd
file. Operations and document-specific Actions file. Operations and document-specific Actions
include the document ID in the call. include the document ID in the call.
] ]
[Dispatcher] <-> Action [Editor State Store] [Dispatcher] <-> Action [Editor State Store]
[Dispatcher] <-> Action [Open Documents State Store] [Dispatcher] <-> Action [Open Documents State Store]
[Dispatcher] -> Update Bounds [Scheduler] [Dispatcher] -> Update Bounds [Scheduler]
[Dispatcher] -> Operation [Design Document Maintainer] [Dispatcher] -> Operation [Design Document Maintainer]
[<editor> Open Documents State Store| [<editor> Open Documents State Store|
For each open document:| For each open document:|
[<state> Pan and zoom viewport bounds]| [<state> Pan and zoom viewport bounds]|
[<state> Selected layers] [<state> Selected layers]
] ]
[Tool State Machine] <- [Open Documents State Store] [Tool State Machine] <- [Open Documents State Store]
[<editor> Editor State Store| [<editor> Editor State Store|
[<state> Panel Layout]| [<state> Panel Layout]|
[<state> Working Colors]| [<state> Working Colors]|
[<state> Active Tool]| [<state> Active Tool]|
[<state> Tool Options]| [<state> Tool Options]|
[<state> Modifier Key Input]| [<state> Modifier Key Input]|
[<state> Currently Hovered Panel] [<state> Currently Hovered Panel]
] ]
[Editor State Store] -> [Tool State Machine] [Editor State Store] -> [Tool State Machine]
[<editor> Tool State Machine| [<editor> Tool State Machine|
List the possible operations in current context List the possible operations in current context
] ]
[Tool State Machine] -> [Dispatcher] [Tool State Machine] -> [Dispatcher]
// Document // Document
[<document> Design Document Maintainer| [<document> Design Document Maintainer|
Process each operation and apply changes to the given document's Process each operation and apply changes to the given document's
operation chain. Consolidate changes where possible by modifying operation chain. Consolidate changes where possible by modifying
the previous operation if it's the same as this one and append partial the previous operation if it's the same as this one and append partial
updates to operations from in-progress interactive tools. updates to operations from in-progress interactive tools.
] ]
[Design Document Maintainer] -> Design Document Diff [Render Graph Maintainer] [Design Document Maintainer] -> Design Document Diff [Render Graph Maintainer]
[Design Document Maintainer] <-> Design Document [Open Documents File Store] [Design Document Maintainer] <-> Design Document [Open Documents File Store]
[<document> Render Graph Maintainer| [<document> Render Graph Maintainer|
Bake operations into a complete graph including history references. Bake operations into a complete graph including history references.
Starting from the beginning of document history, each operation Starting from the beginning of document history, each operation
modifies the graph in a specific way. If an operation creates a node modifies the graph in a specific way. If an operation creates a node
that references this point in history, duplicate the current graph pieces that references this point in history, duplicate the current graph pieces
between the live graph and each additional history reference so between the live graph and each additional history reference so
changed nodes in history are "ghost variants" living in the live graph. changed nodes in history are "ghost variants" living in the live graph.
] ]
[Render Graph Maintainer] -> Render Graph [Scheduler] [Render Graph Maintainer] -> Render Graph [Scheduler]
[Render Graph Maintainer] <-> Render Graph [Open Documents File Store] [Render Graph Maintainer] <-> Render Graph [Open Documents File Store]
[<document>Open Documents File Store| [<document>Open Documents File Store|
Kept in-memory or written to disk.| Kept in-memory or written to disk.|
For each open document:| For each open document:|
[<state> Design Document (.gdd)]| [<state> Design Document (.gdd)]|
[<state> Render Graph (.grd)] [<state> Render Graph (.grd)]
] ]
// Renderer // Renderer
[<renderer> Scheduler| [<renderer> Scheduler|
Manage a thread pool and GPU time. Perform progressive enhancement Manage a thread pool and GPU time. Perform progressive enhancement
and speculative tile rendering. Request re-render of dirtied document within and speculative tile rendering. Request re-render of dirtied document within
bounds and stitch them over dirty raster cache tiles. Maintain interactive bounds and stitch them over dirty raster cache tiles. Maintain interactive
@@ -126,12 +128,12 @@
keep the Precompute and Raster Tile caches up-to-date with minimal keep the Precompute and Raster Tile caches up-to-date with minimal
onscreen latency. Also notifies the Final Render Assembler when the cache onscreen latency. Also notifies the Final Render Assembler when the cache
tiles for the root document visible in bounds have finished being updated. tiles for the root document visible in bounds have finished being updated.
] ]
[Scheduler] -> [Node Rasterizer] [Scheduler] -> [Node Rasterizer]
[Scheduler] <-> [Node Cache Manager] [Scheduler] <-> [Node Cache Manager]
[Scheduler] -> [Final Render Assembler] [Scheduler] -> [Final Render Assembler]
[<renderer> Node Cache Manager| [<renderer> Node Cache Manager|
Purges old or less useful cached data Purges old or less useful cached data
as necessary.| as necessary.|
[<state> Precompute Node Cache| [<state> Precompute Node Cache|
@@ -144,21 +146,22 @@
Only reevaluate downstream. Only reevaluate downstream.
Reuse when panning. Reuse when panning.
] ]
] ]
[Node Cache Manager] -> [Final Render Assembler] [Node Cache Manager] -> [Final Render Assembler]
[<renderer> Node Rasterizer| [<renderer> Node Rasterizer|
Rasterize and update the cache for a specified node Rasterize and update the cache for a specified node
given a preferred bounds (but it can give a different given a preferred bounds (but it can give a different
sized output), resolution, and quality level. sized output), resolution, and quality level.
] ]
[Node Rasterizer] <-> [Node Cache Manager] [Node Rasterizer] <-> [Node Cache Manager]
[<renderer> Final Render Assembler| [<renderer> Final Render Assembler|
Look up the rasterized cached tiles from Look up the rasterized cached tiles from
the document root and assemble them into the document root and assemble them into
an image for live display by the frontend. an image for live display by the frontend.
Operates when woken up by the scheduler Operates when woken up by the scheduler
when root tiles or render bounds are updated. when root tiles or render bounds are updated.
]
[Final Render Assembler] --> Rendered Viewport [<client> To: Frontend Implementation]
] ]
[Final Render Assembler] --> Rendered Viewport [<client> To: Frontend Implementation]