Skip to content

andradeandrey/webpipes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webpipes

Webpipes is a process-oriented, compositional web server toolkit written using the Go programming language. This toolkit utilizes utilizes an architecture where multiple functional components respond to requests, rather than the traditional monolithic web server model. The abstractions provided by this toolkit allow servers to be deployed using several concurrency strategies.

Paper

This toolkit is presented in detail by the paper "Serving Web Content with Dynamic Process Networks in Go". You can find a copy of this paper on the Communicating Process Architectures 2011 conference website.

Usage

You can goinstall the package by running:

 goinstall -u -v github.com/jnwhiteh/webpipes/webpipes

Once the package is installed you can import it using the same path:

 import github.com/jnwhiteh/webpipes/webpipes

A "Hello World" server might look like this:

 package main
 
 import "github.com/jnwhiteh/webpipes/webpipes"
 import "http"
 import "log"
 
 func main() {
 	http.Handle("/", webpipes.Chain(
 		webpipes.TextStringSource("Hello, World!"),
 		webpipes.OutputPipe,
 	))
 	server := &http.Server{
 		Addr: ":12345",
 		Handler: http.DefaultServeMux,
 	}
 
 	log.Printf("Starting server on %s", server.Addr)
 	err := server.ListenAndServe()
 	if err != nil {
 		log.Fatalf("Error: %s", err)
 	}
 }

About

A Compositional Web Server Toolkit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published