1
GitHub - ekotlikoff/gochess
source link: https://github.com/ekotlikoff/gochess
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
A chess server where players can match and play with others on their web browser
Build
Observability
- Run jaeger all-in-one to collect traces
- Run prometheus and scrape /chess/metrics to collect metrics
Components
- Web client compiled from Golang with WebAssembly
- Frontend gateway which serves static files and proxies calls to a backend server
- Interchangeable HTTP and WebSocket backend servers communicate with the web client and relay requests/responses to/from the match server via player channels
- Client agnostic match server orchestrates a match
- Matching server with the ability to match a player with a remote chess engine via an engine client
- Chess model for pieces, moves, the board, and a game
Usage as a package
go get github.com/ekotlikoff/gochess/pkg/chessserver
GOARCH=wasm GOOS=js go build -o ~/bin/gochessclient.wasm -tags webclient github.com/ekotlikoff/gochess/internal/client/web
go chessserver.RunServer()
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK