Giter Site home page Giter Site logo

ics-message-server's Introduction

ics-message-server

This repository refers to one of the modules of a chat system: the message server. This service will provide an HTTP and WebSockets API to be used by a browser client and a gRPC for andministration. It also communicates with another service, the name server, that will hold information about the message server nodes state.

Usage

Build

git clone https://github.com/renantarouco/ics-message-server.git
cd ics-message-server
go test -v ./...
go build

Run

After building you can run the executable.

./ics-message-server

If you chose to run go install command than you can head directly to your GOPATH directory and run the executable, or if you have it in your system's PATH then you just have to run ics-message-server.

API

  • HTTP
Routes Methods Response Description
/auth?nickname=string POST 201 (Created) - {"token": "string"} Authenticates a new user in the message server.
/ws GET Opens a websocket connection to send commands and receive messages.

Once the websocket connection is opened commands must be sent in order to perform actions within the server. The commands are JSON encoded and must follow the form:

  • Commands

    • SendMessage

      { "type": "message", "args": { "from": "string", "body": "message body" } }
    • SetNickname

      { "type": "setnick", "args": { "nickname": "string" } }
    • SwitchRoom

      { "type": "switchroom", "args": { "room": "string" } }
    • CreateRoom

      { "type": "createroom", "args": { "name": "string" } }
    • ListUsers

      { "type": "listusers" }
    • ListRooms

      { "type": "listrooms" }
    • Exit

      { "type": "exit" }
  • gRPC

    TODO

Intergalactic Chat System

This the implementation for a Distributed System class project. The goal is to implement a basic distributed chat system to explore recent technologies in the field.

The whole project aims to use containerization with Docker, orchestration with Kubernetes and service mesh with Istio.

ics-message-server's People

Contributors

renantarouco avatar

Watchers

James Cloos avatar  avatar

Forkers

igormaurell

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.