Giter Club home page Giter Club logo

simplegrpc's Introduction

simple go grpc pubsub server

Description

イベントをpushすると購読しているクライアントにイベントが通知されるだけのシンプルなサーバーです。
gRPCを使用しているのでクライアント側は任意の言語で実装することができます。

イベント名は任意のstring、push時にイベント名とmessageを指定。そのイベント名を購読している
クライアントのみにmessageが通知される(詳細はprotocol buffersを参照)

Requirement

  • go version >=v1.11 (use modules)

Installation

  1. git clone ${GOPATH}/github.com/sakokazuki/simplegrpc or any directory git clone ${remoteurl} ${GOPATH}/github.com/sakokazuki/simplegrpc or
    git clone ${remoteurl} simplegrpc
  2. cd cd simplegrpc
  3. build and automatically update go.mod and download dependencies if needed. make build or go build -tags=release

Development

make dev or go run main.go

Useage

./simplegrpc and server start at localhost:10151

Test Client

go

サーバーに接続して定期的にイベントを発行するだけのシンプルなクライアントを一応用意しました。

  1. make client or
  2. cd client
  3. go run main.go  

unity

https://github.com/sakokazuki/SimplegrpcClientForUnity

TODO

  • サーバーのポートを起動時に設定できるように
  • デバッグ用webサーバー用意
  • テスト書いてみる?

reference

コードの殆どはこれを参考にした
plasma (https://github.com/openfresh/plasma)

simplegrpc's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.