Skip to content

hellodudu/Ultimate

Repository files navigation

Build Status GoDoc LICENSE Go Report Card

Ultimate

ultimate is a game server with horizontally-scalable and high-available. It was powered by go-micro and running in docker container.

  • using mysql as data persist.
  • using consul as server discovery and registry.
  • using grpc as rpc call from each servers.
  • using nsq as message transporter.
  • using loki/grafana as log storage and processing queries.

Getting Started

Install

clone this repo

git clone https://github.com/hellodudu/Ultimate.git

Run With Cmd

  • nsq:

      nsqlookupd
      nsqd --lookupd-tcp-address=127.0.0.1:4160
    
  • consul:

      consul agent -dev
    
  • game-service:

      cd game-service
      go run main.go plugin.go --registry=consul --broker=nsq
    
  • arena-service:

      cd arena-service
      go run main.go plugin.go --registry=consul --broker=nsq
    

Run With Container

  • plugin

    first please install docker log driver plugin for loki.

      docker plugin install  grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
    
  • build

      make docker
    
  • run

      docker-compose up
    

Monitor