Giter Club home page Giter Club logo

webpipes's Introduction

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)
 	}
 }

webpipes's People

Contributors

jnwhiteh avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.