Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Diagrams): Added puml diagrams. PE-4847 #63

Merged
merged 6 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/diagrams/src/Data.puml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ LAYOUT_TOP_DOWN()
' Define Elements

Person(user, "End User")
Container(arweave, "Arweave Blockweave")
Component(arweave, "Arweave Blockweave")
System_Boundary(gateway, "AR.IO Gateway"){
Component(core, "Core Service")
ContainerDb(index, "Indexed data")
}
Component(network, "AR.IO Network")


' Define Relationships
Rel(user, gateway, "User makes request for data to AR.IO Gateway.", "HTTPS")
Rel(gateway, core, "Gateway routes the request to Core Service.")
BiRel(core, index, "Core checks for requested data in gateway index.")
BiRel(core, arweave, "Core requests any missing data from the Arweave Blockweave.", "HTTPS")
BiRel(core, network,"")
BiRel(core, arweave, "Core requests any missing data from the AR.IO Network or trusted Arweave Node.", "HTTPS")
Rel(core, user, "Core serves the requested data to User.")


Expand Down
24 changes: 8 additions & 16 deletions docs/diagrams/src/Gateway.puml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,27 @@ LAYOUT_TOP_DOWN()

Person(user, "End User")
Component(arweave, "Arweave Blockweave")
Bobinstein marked this conversation as resolved.
Show resolved Hide resolved
Component(network, "AR.IO Network")

System_Boundary(ar-io, "AR.IO Gateway"){
Component(core, "AR.IO Core Service")
Component(envoy, "Envoy Service")
Component(observer, "Observer Service")

System(storage, "Local Storage"){
ContainerDb(chunks, "Chunk data")
ContainerDb(headers, "Header Data")
ContainerDb(contiguous, "Contiguous Data")
ContainerDb(indexes, "Index Data")
ContainerDb(reports, "Observer Reports")
}
ContainerDb(index, "Chain and Bundle Index", "Chunked, header, and contiguous data and Observer reports")
Bobinstein marked this conversation as resolved.
Show resolved Hide resolved
}

' Relationships
BiRel(user, envoy, "User requests data from Envoy", "HTTPS" )
BiRel(user, envoy, "User sends data, chain, or GraphQL request to Envoy", "HTTPS" )
BiRel(envoy, arweave, "Chain API requests get data directly from the Blockweave", "HTTP")
BiRel(envoy, arweave, "GraphQL API requests data from the Blockweave", "HTTP")
BiRel(envoy, core, "Data API requests are forwarded to the core service")
BiRel(envoy, core, "GraphQL API and Data API requests are forwarded to the core service")

Rel(core, chunks, "Saves chunked data")
Rel(core, headers, "saves header data")
Rel(core, contiguous, "saves contiguous data")
Rel(core, indexes, "indexes data and saves in db", "SQLite")

Rel(core, index, "Indexes and stores data locally")

Rel(observer, reports, "saves observer reports")
Rel(observer, arweave, "Checks the ability of other gateways to resolve ArNS names", "HTTPS")

Rel(observer, index, "saves observer reports")
Rel(observer, network, "Checks the ability of other gateways in the AR.IO Network to resolve ArNS names", "HTTPS")

' Legend
SHOW_LEGEND()
Expand Down
10 changes: 4 additions & 6 deletions docs/diagrams/src/GraphQL.puml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ LAYOUT_TOP_DOWN()
' Define Elements

Person(user, "End User")
Container(arweave, "Arweave Blockweave")
System_Boundary(gateway, "AR.IO Gateway"){
Component(envoy, "Envoy Service")
Component(core, "Core Service")
ContainerDb(index, "Indexed data")
}


' Define Relationships

Rel(user, gateway, "User makes GraphQL query to AR.IO Gateway.", "HTTPS")
Rel(gateway, envoy, "Gateway settings determine if query is processed locally or proxied to Arweave Blockweave.")
BiRel(envoy, index, "Envoy process and responds to query using local index.", "", "(based on Gateway settings)")
BiRel(envoy, arweave, "Envoy proxies query to pre-selected trusted Arweave node.","HTTP", "(based on Gateway settings)")
Rel(envoy, user, "Envoy returns query results to user.")
BiRel(user, envoy, "User makes GraphQL query to AR.IO Gateway.", "HTTPS")
BiRel(envoy, core, "Envoy forwards the query to the core service")
BiRel(core, index, "Core queries Indexed Data")


' Legend
Expand Down