From 46923f775f2027e25113c11bc2291f778146c919 Mon Sep 17 00:00:00 2001 From: Koala Yeung Date: Thu, 19 Jul 2018 13:28:36 +0800 Subject: [PATCH] readme: improve top section * new illustration to illustate FastCGI. * some minor formatting and wording adjustment. --- README.md | 28 ++++++++++++---------------- docs/fastcgi-illustration.svg | 1 + 2 files changed, 13 insertions(+), 16 deletions(-) create mode 100644 docs/fastcgi-illustration.svg diff --git a/README.md b/README.md index 26c92af..95d30c0 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,16 @@ # gofast [![GoDoc][godoc-badge]][godoc] [![Go Report Card][goreport-badge]][goreport] [![Travis CI results][travis-badge]][travis] -**gofast** is a [FastCGI][fastcgi] -"client" library written purely in go. +**gofast** is a [FastCGI][fastcgi] "client" library written purely in +[golang][golang]. [fastcgi]: http://www.mit.edu/~yandros/doc/specs/fcgi-spec.html [godoc]: https://godoc.org/github.com/yookoala/gofast [godoc-badge]: https://godoc.org/github.com/yookoala/gofast?status.svg [travis]: https://travis-ci.org/yookoala/gofast?branch=master [travis-badge]: https://api.travis-ci.org/yookoala/gofast.svg?branch=master -[goreport]: (https://goreportcard.com/report/github.com/yookoala/gofast) +[goreport]: https://goreportcard.com/report/github.com/yookoala/gofast [goreport-badge]: https://goreportcard.com/badge/github.com/yookoala/gofast +[golang]: https://golang.org ## What does it do, really? @@ -19,28 +20,23 @@ request information to the application server through socket. The application server always listens to the socket and response to socket request accordingly. -``` -visitor → web server → application server → web server → visitor -``` +[![visitor → web server → application server → web server → visitor][fastcgi-illustration]][fastcgi-illustration] -In ordinary Apache + php-fpm hosting environment, this would be: -``` -visitor → Apache → php-fpm → Apache → visitor -``` +[fastcgi-illustration]: docs/fastcgi-illustration.svg -**gofast** help you to write the code on the web server part of this +**gofast** help you to write the code on the **web server** part of this picture. It helps you to pass the request to application server and receive response from it. You may think of **gofast** as a "client library" to consume any FastCGI application server. -Why? ----- +## Why? + Many popular languages (e.g. [Python][python/webservers], -[PHP][php-fpm], [nodejs][node-fastcgi]) has FastCGI server -implementations. With **gofast**, you may mix the languages -without too much complication. +[PHP][php-fpm], [nodejs][node-fastcgi]) has FastCGI application +server implementations. With **gofast**, you may mix using the languages +in a simple way. Also, this is fun to do :-) diff --git a/docs/fastcgi-illustration.svg b/docs/fastcgi-illustration.svg new file mode 100644 index 0000000..4a1b2f7 --- /dev/null +++ b/docs/fastcgi-illustration.svg @@ -0,0 +1 @@ + \ No newline at end of file