Flowgraph package for scalable asynchronous system development
Clone or download
Latest commit 168dbcc Jan 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes Initial commit Aug 29, 2018
.gitignore got GCD working Nov 11, 2018
LICENSE add middle initial Aug 29, 2018
README.md Update README.md Jan 15, 2019
breaker.go working on lots Dec 5, 2018
flowgraph.go working on measuring multi-loop performance Dec 14, 2018
flowgraph_test.go working on measuring multi-loop performance Dec 14, 2018
graphhub.go working Nov 29, 2018
hub.go doc work Nov 15, 2018
hubcode.go working Nov 29, 2018
retriever.go working on lots Dec 5, 2018
sinker.go working on lots Dec 5, 2018
stream.go clean up GCD Nov 12, 2018
transformer.go working on lots Dec 5, 2018
transmitter.go working on lots Dec 5, 2018




Flowgraphs are built out of hubs interconnected by streams. The hubs are implemented with goroutines that use select to wait on incoming data or back-pressure handshakes. The data and handshakes travel on streams implemented with channels of empty interfaces for forward flow (interface{}) and channels of empty structs for back-pressure (struct{}).

The user of this package is completely isolated from the details of using goroutines, channels, and select, and only has to provide the empty interface functions that transform incoming data into outgoing data as needed for each hub of the flowgraph under construction. It includes the ability to log each data flow and transformation at the desired level of detail for debugging and monitoring purposes.

The package allows for correct-by-construction dataflow systems that avoid deadlock and gridlock by using back-pressure to manage empty space. It also supports looping constructs that can operate at the same efficiency as pipeline structures using channel buffering within the loop.

All of this is made available with an API designed to directly underlie a future HDL for a flowgraph language.

Getting Started

go get -u github.com/vectaport/flowgraph
go test