How mariuscrsn/globalstatesnapshot works
GlobalStateSnapshot is a Go implementation of Chandy–Lamport distributed snapshots. A user sends application messages or requests a snapshot through the App RPC service; the App coordinates the local Node and SnapNode, which exchange messages and marks among processes, record local and channel state, and gather a global snapshot. The README also documents network configuration and exporting GoVector traces for Shiviz. The graph follows relationships visible in the excerpts and README; deployment details beyond these are not inferred.
Main entry points: Node.go Node broker · Snapshot.go SnapNode · App.go App RPC service · Utils.go Logger and GoVector
Components 13
Application interface
- App RPC service
App.go
Snapshot algorithm
- SnapNode
src/snapshot/Snapshot.go
Distributed transport
- Node broker
src/node/Node.go
State and observability
- Network layout
network.json - Config loader
src/utils/Utils.go - Message types
src/utils/Message.go - Snapshot state types
src/utils/States.go - Logger and GoVector
src/utils/Utils.go - SSH helpers
src/utils/SSHUtils.go
Other components
- User
- RPC client
- Peer processes
- Shiviz
Connections 18
- User → RPC client: issues commands
README.md - RPC client → App RPC service: calls RPC
App.go - App RPC service → Node broker: creates and wires
App.go - App RPC service → SnapNode: creates and requests
App.go - Node broker → Config loader: loads layout
src/node/Node.go - Config loader → Network layout: reads configuration
README.md - Node broker → Peer processes: sends TCP messages
src/node/Node.go - Peer processes → Node broker: delivers TCP messages
src/node/Node.go - Node broker → SnapNode: forwards marks and messages
src/node/Node.go - SnapNode → Node broker: sends marks and state
src/snapshot/Snapshot.go - Node broker → App RPC service: delivers application messages
App.go - Node broker → Logger and GoVector: records message trace
src/node/Node.go - SnapNode → Logger and GoVector: records snapshot trace
src/snapshot/Snapshot.go - SnapNode → Snapshot state types: builds global state
src/snapshot/Snapshot.go - Node broker → Message types: handles message types
src/node/Node.go - App RPC service → Message types: accepts outgoing messages
App.go - Logger and GoVector → Shiviz: exports trace for
README.md - User → SnapNode: requests snapshot
README.md