[branding] Rebrand tools, links and banners to use kawipiko

This commit is contained in:
Ciprian Dorin Craciun 2018-11-18 18:11:36 +02:00
parent cd07d24e6a
commit dd6469659e
7 changed files with 87 additions and 61 deletions

36
.x-run
View file

@ -5,13 +5,13 @@
<< go / execute / server / debug
"${X_RUN[@]}" ':: go / build / server / debug'
exec -- env -i ./.outputs/binaries/debug/cdb-http-server "${@}"
exec -- env -i ./.outputs/binaries/debug/kawipiko-server "${@}"
exit -- 1
!!
<< go / execute / server / release
"${X_RUN[@]}" ':: go / build / server / release'
exec -- env -i ./.outputs/binaries/release/cdb-http-server "${@}"
exec -- env -i ./.outputs/binaries/release/kawipiko-server "${@}"
exit -- 1
!!
@ -21,7 +21,7 @@
mkdir -p -- ./.outputs/binaries/debug
exec -- "${X_RUN[@]}" ':: go / tool' build \
-v \
-o ./.outputs/binaries/debug/cdb-http-server \
-o ./.outputs/binaries/debug/kawipiko-server \
-- ./sources/cmd/server.go \
#
exit -- 1
@ -33,7 +33,7 @@
exec -- "${X_RUN[@]}" ':: go / tool' build \
-v \
-ldflags '-s' \
-o ./.outputs/binaries/release/cdb-http-server \
-o ./.outputs/binaries/release/kawipiko-server \
-- ./sources/cmd/server.go \
#
exit -- 1
@ -42,12 +42,12 @@
<< go / build / server / release / analyze
test "${#}" -eq 0
mkdir -p -- ./.outputs/binaries/debug
rm -f -- ./.outputs/binaries/debug/cdb-http-server
rm -f -- ./.outputs/binaries/debug/kawipiko-server
exec -- "${X_RUN[@]}" ':: go / tool' build \
-v \
-ldflags '-s' \
-gcflags '-m' \
-o ./.outputs/binaries/debug/cdb-http-server \
-o ./.outputs/binaries/debug/kawipiko-server \
-- ./sources/cmd/server.go \
#
exit -- 1
@ -65,8 +65,8 @@
mkdir -- ./.outputs/publish/bin
fi
cp -T -- \
./.outputs/binaries/release/cdb-http-server \
./.outputs/publish/binaries/cdb-http-server \
./.outputs/binaries/release/kawipiko-server \
./.outputs/publish/binaries/kawipiko-server \
#
exit -- 0
!!
@ -76,13 +76,13 @@
<< go / execute / archiver / debug
"${X_RUN[@]}" ':: go / build / archiver / debug'
exec -- env -i ./.outputs/binaries/debug/cdb-http-archiver "${@}"
exec -- env -i ./.outputs/binaries/debug/kawipiko-archiver "${@}"
exit -- 1
!!
<< go / execute / archiver / release
"${X_RUN[@]}" ':: go / build / archiver / release'
exec -- env -i ./.outputs/binaries/release/cdb-http-archiver "${@}"
exec -- env -i ./.outputs/binaries/release/kawipiko-archiver "${@}"
exit -- 1
!!
@ -92,7 +92,7 @@
mkdir -p -- ./.outputs/binaries/debug
exec -- "${X_RUN[@]}" ':: go / tool' build \
-v \
-o ./.outputs/binaries/debug/cdb-http-archiver \
-o ./.outputs/binaries/debug/kawipiko-archiver \
-- ./sources/cmd/archiver.go \
#
exit -- 1
@ -104,7 +104,7 @@
exec -- "${X_RUN[@]}" ':: go / tool' build \
-v \
-ldflags '-s' \
-o ./.outputs/binaries/release/cdb-http-archiver \
-o ./.outputs/binaries/release/kawipiko-archiver \
-- ./sources/cmd/archiver.go \
#
exit -- 1
@ -122,8 +122,8 @@
mkdir -- ./.outputs/publish/bin
fi
cp -T -- \
./.outputs/binaries/release/cdb-http-archiver \
./.outputs/publish/binaries/cdb-http-archiver \
./.outputs/binaries/release/kawipiko-archiver \
./.outputs/publish/binaries/kawipiko-archiver \
#
exit -- 0
!!
@ -324,7 +324,7 @@
prlimit -n16384 -- \
sudo -u "${USER}" -n -E -P -- \
env -i \
./.outputs/binaries/release/cdb-http-server \
./.outputs/binaries/release/kawipiko-server \
--bind 127.9.185.194:8080 \
--archive "${_archive}" \
"${@}" \
@ -368,13 +368,13 @@
!!
<< benchmark / server / profile / cpu / analyze
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/cdb-http-server
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/kawipiko-server
exec -- go tool pprof "${@}" -- ./.outputs/server-cpu.txt
exit -- 1
!!
<< benchmark / server / profile / mem / analyze
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/cdb-http-server
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/kawipiko-server
exec -- go tool pprof "${@}" ./.outputs/server-mem.txt
exit -- 1
!!
@ -449,7 +449,7 @@
--timeout 6s \
--duration 6s \
--latency \
--script ../go-cdb-http-examples/sources/wrk-paths-from-file.lua \
--script ../kawipiko-examples/sources/wrk-paths-from-file.lua \
"${@}" \
-- "http://127.9.185.194:8080/" \
"${_paths}" \

View file

@ -1,7 +1,33 @@
###############
CDB HTTP server
###############
::
+---------------------------------------------------------------------------+
. .
. __ __ .
. /\ \ __ __ /\ \ .
. \ \ \/'\ __ __ __ __ /\_\ _____ /\_\\ \ \/'\ ___ .
. \ \ , < /'__`\ /\ \/\ \/\ \\/\ \ /\ '__`\\/\ \\ \ , < / __`\ .
. \ \ \\`\ /\ \L\.\_\ \ \_/ \_/ \\ \ \\ \ \L\ \\ \ \\ \ \\`\ /\ \L\ \ .
. \ \_\ \_\\ \__/.\_\\ \___x___/' \ \_\\ \ ,__/ \ \_\\ \_\ \_\\ \____/ .
. \/_/\/_/ \/__/\/_/ \/__//__/ \/_/ \ \ \/ \/_/ \/_/\/_/ \/___/ .
. \ \_\ .
. \/_/ .
. .
. _ _ ___ ___ ___ ____ ____ ____ _ _ ____ ____ .
. |__| | | |__] [__ |___ |__/ | | |___ |__/ .
. | | | | | ___] |___ | \ \/ |___ | \ .
. .
. .
+---------------------------------------------------------------------------+
#############################################
kawipiko -- blazingly fast static HTTP server
#############################################
.. contents::
@ -103,10 +129,10 @@ Notes
The following benchmarks were executed as follows:
* the machine was my personal laptop: 6 years old with an Intel Core i5 2520M (2 cores with 2 threads each), which during the benchmarks (due to a bad fan and dust) it kept entering into thermal throttling; (i.e. the worst case scenario;)
* the `cdb-http-server` was started with `GOMAXPROCS=4`; (i.e. 4 threads handling the requests;)
* the `cdb-http-server` was started with `--preload`; (i.e. the CDB database file was preloaded into memory, thus no disk I/O;)
* the `kawipiko-server` was started with `GOMAXPROCS=4`; (i.e. 4 threads handling the requests;)
* the `kawipiko-server` was started with `--preload`; (i.e. the CDB database file was preloaded into memory, thus no disk I/O;)
* the benchmarking tool was wrk_;
* both `cdb-http-server` and `wrk` tools were run on the same machine;
* both `kawipiko-server` and `wrk` tools were run on the same machine;
* the benchmark was run over loopback networking (i.e. `127.0.0.1`);
* the served file contains the content ``Hello, World!``;
* the protocol was HTTP (i.e. no TLS);
@ -119,22 +145,22 @@ Documentation
The project provides two binaries:
* ``cdb-http-server`` -- which serves the static content from the CDB database;
* ``cdb-http-archiver`` -- which creates the CDB database from a source folder holding the static content;
* ``kawipiko-server`` -- which serves the static content from the CDB database;
* ``kawipiko-archiver`` -- which creates the CDB database from a source folder holding the static content;
``cdb-http-archiver``
``kawipiko-archiver``
---------------------
::
>> cdb-http-archiver --help
>> kawipiko-archiver --help
::
Usage of cdb-http-archiver:
Usage of kawipiko-archiver:
--sources <path>
--archive <path>
--compress <gzip | brotli | identity>
@ -145,16 +171,16 @@ The project provides two binaries:
``cdb-http-server``
``kawipiko-server``
-------------------
::
>> cdb-http-server --help
>> kawipiko-server --help
::
Usage of cdb-http-server:
Usage of kawipiko-server:
--archive <path>
--archive-inmem (memory-loaded archive file)
--archive-mmap (memory-mapped archive file)
@ -180,14 +206,14 @@ Examples
* create the CDB archive (without any compression): ::
cdb-http-archiver \
kawipiko-archiver \
--archive ./python-3.7.1-docs.cdb \
--sources ./python-3.7.1-docs-html \
--debug
* create the CDB archive (with `gzip` compression): ::
cdb-http-archiver \
kawipiko-archiver \
--archive ./python-3.7.1-docs-gzip.cdb \
--sources ./python-3.7.1-docs-html \
--compress gzip \
@ -195,7 +221,7 @@ Examples
* serve the CDB archive (with `gzip` compression): ::
cdb-http-server \
kawipiko-server \
--bind 127.0.0.1:8080 \
--archive ./python-3.7.1-docs-gzip.cdb \
--preload \
@ -260,8 +286,8 @@ Fetch the sources
git clone \
--depth 1 \
--recurse-submodules --shallow-submodules \
https://github.com/cipriancraciun/go-cdb-http.git \
/tmp/go-cdb-http/src
https://github.com/volution/kawipiko.git \
/tmp/kawipiko/src
Compile the binaries
@ -269,24 +295,24 @@ Compile the binaries
Prepare the Go environment: ::
mkdir /tmp/go-cdb-http/go
ln -s -T ../src/vendor /tmp/go-cdb-http/go/src
mkdir /tmp/kawipiko/go
ln -s -T ../src/vendor /tmp/kawipiko/go/src
Compile the Go binnaries: ::
export GOPATH=/tmp/go-cdb-http/go
export GOPATH=/tmp/kawipiko/go
mkdir /tmp/go-cdb-http/bin
mkdir /tmp/kawipiko/bin
go build \
-ldflags '-s' \
-o /tmp/go-cdb-http/bin/cdb-http-archiver \
/tmp/go-cdb-http/src/sources/cmd/archiver.go
-o /tmp/kawipiko/bin/kawipiko-archiver \
/tmp/kawipiko/src/sources/cmd/archiver.go
go build \
-ldflags '-s' \
-o /tmp/go-cdb-http/bin/cdb-http-server \
/tmp/go-cdb-http/src/sources/cmd/server.go
-o /tmp/kawipiko/bin/kawipiko-server \
/tmp/kawipiko/src/sources/cmd/server.go
Deploy the binaries
@ -296,8 +322,8 @@ Deploy the binaries
::
cp /tmp/go-cdb-http/bin/cdb-http-archiver /usr/local/bin
cp /tmp/go-cdb-http/bin/cdb-http-server /usr/local/bin
cp /tmp/kawipiko/bin/kawipiko-archiver /usr/local/bin
cp /tmp/kawipiko/bin/kawipiko-server /usr/local/bin

View file

@ -21,8 +21,8 @@ import "syscall"
// import "github.com/colinmarc/cdb"
import cdb "github.com/cipriancraciun/go-cdb-lib"
import . "github.com/cipriancraciun/go-cdb-http/lib/common"
import . "github.com/cipriancraciun/go-cdb-http/lib/archiver"
import . "github.com/volution/kawipiko/lib/common"
import . "github.com/volution/kawipiko/lib/archiver"
@ -552,7 +552,7 @@ func main_0 () (error) {
var _debug bool
{
_flags := flag.NewFlagSet ("cdb-http-archiver", flag.ContinueOnError)
_flags := flag.NewFlagSet ("kawipiko-archiver", flag.ContinueOnError)
_flags.Usage = func () () {
fmt.Fprintf (os.Stderr, "%s",
@ -561,7 +561,7 @@ func main_0 () (error) {
| Documentation, issues and sources:
| * https://bit.ly/kawipiko
| * https://github.com/cipriancraciun/go-cdb-http
| * https://github.com/volution/kawipiko
| Authors:
| * Ciprian Dorin Craciun
@ -577,7 +577,7 @@ func main_0 () (error) {
-----------------------------------------------------------
cdb-http-archiver
kawipiko-archiver
--sources <path>

View file

@ -27,8 +27,8 @@ import cdb "github.com/cipriancraciun/go-cdb-lib"
import "github.com/valyala/fasthttp"
import "github.com/valyala/fasthttp/reuseport"
import . "github.com/cipriancraciun/go-cdb-http/lib/common"
import . "github.com/cipriancraciun/go-cdb-http/lib/server"
import . "github.com/volution/kawipiko/lib/common"
import . "github.com/volution/kawipiko/lib/server"
@ -363,7 +363,7 @@ func main_0 () (error) {
var _profileMem string
{
_flags := flag.NewFlagSet ("cdb-http-server", flag.ContinueOnError)
_flags := flag.NewFlagSet ("kawipiko-server", flag.ContinueOnError)
_flags.Usage = func () () {
fmt.Fprintf (os.Stderr, "%s",
@ -372,7 +372,7 @@ func main_0 () (error) {
| Documentation, issues and sources:
| * https://bit.ly/kawipiko
| * https://github.com/cipriancraciun/go-cdb-http
| * https://github.com/volution/kawipiko
| Authors:
| * Ciprian Dorin Craciun
@ -388,7 +388,7 @@ func main_0 () (error) {
-----------------------------------------------------------
cdb-http-server
kawipiko-server
--archive <path>
--archive-inmem (memory-loaded archive file)
@ -742,7 +742,7 @@ func main_0 () (error) {
_httpServer := & fasthttp.Server {
Name : "cdb-http",
Name : "kawipiko",
Handler : _server.Serve,
NoDefaultServerHeader : true,

View file

@ -2,7 +2,7 @@
package server
import . "github.com/cipriancraciun/go-cdb-http/lib/common"
import . "github.com/volution/kawipiko/lib/common"
@ -35,7 +35,7 @@ var AboutBannerData = (
"\n" +
" | Documentation, issues and sources:\n" +
" | * https://bit.ly/kawipiko\n" +
" | * https://github.com/cipriancraciun/go-cdb-http\n" +
" | * https://github.com/volution/kawipiko\n" +
"\n" +
" | Authors:\n" +
" | * Ciprian Dorin Craciun\n" +

View file

@ -5,7 +5,7 @@ package server
import "encoding/base64"
import . "github.com/cipriancraciun/go-cdb-http/lib/common"
import . "github.com/volution/kawipiko/lib/common"