Install
go get github.com/GiDiS/jb-chat

Documentation

Readme

jb-chat - test chat with react+mobx at frontend and golang and backend and WebSocket for communications between

Install

go get -u github.com/GiDiS/jb-chat

Run at host

Staging: Seeded with GoT data set

cd "${GOPATH}/src/github.com/GiDiS/jb-chat" && make run-host-staging

Production: Run with empty database

cd "${GOPATH}/src/github.com/GiDiS/jb-chat" && make run-host-prod

Listen at http://localhost:8888 for ui Listen at http://localhost:8889 for diagnostic

Run in minikube with kubectl (minikube required)

Staging: Seeded with GoT data set

cd "${GOPATH}/src/github.com/GiDiS/jb-chat" && make run-kctl-staging

Production: Run with empty database

cd "${GOPATH}/src/github.com/GiDiS/jb-chat" && make run-kctl-production

Service and ingress urls printed after deploy

Run in minikube with k8s-handle (k8s-handle required)

k8s-handle config locates in deploy/k8s-handle/config.yaml

Staging: Seeded with GoT data set

cd "${GOPATH}/src/github.com/GiDiS/jb-chat" && make run-k8sh-staging

Production: Run with empty database

cd "${GOPATH}/src/github.com/GiDiS/jb-chat" && make run-k8sh-production

Service and ingress urls printed after deploy

Stop in minikube (minikube required)

Stop completely remove deploy namespace

Staging:

cd "${GOPATH}/src/github.com/GiDiS/jb-chat" && make stop-staging

Production:

cd "${GOPATH}/src/github.com/GiDiS/jb-chat" && make stop-production

Health checks:

host:DIAG_PORT/readyz

host:DIAG_PORT/healthz

Metrics:

host:DIAG_PORT/metrics

Go app standard metrics

WebSocket:

  • Count income and outcome events by type
  • Length and capacity recv/send queues, connections count

Dispatcher:

  • Count income and outcome events by type
  • Event process times
  • Number errors

Issues (todo):

  • UI: reconnect to ws after backend restart
  • UI: refresh after channel create, join, leave
  • UI: load channel messages on page initial open by direct url
  • Back: Persistent storage
  • Back: Tests
  • Back: Metrics
  • Deploy: helm chart Used k8s-handle
  • Deploy: minikube deploy with ingress for stable google sign-in

App arch

App arch diagram