GithubHelp home page GithubHelp logo

grpc-p2p-chat's Introduction

gRPC Chat

Description

Implementation of a peer-to-peer chat with gRPC in Kotlin. User could act as a client or server. If the application runs as a server, the user must provide his own IP address and port. Otherwise, the IP and port of a host should be specified and server should be already running. If some error occurs (i.e. server IP is invalid), the application will handle it, show an alert and open the initialization window.

Application uses MVC-like architecture - but since there is no actual "data", there aren't any models, only grpc-chat-service which transfers the messages. Controller handles server / client instances creation, it also manages channels with received and sent messages. Views provide with basic UI, and also are able to trigger actions in controller originating from pressed buttons, for example. Controller's instances are injected to the views using TornadoFX dependency injection framework.

Chat service has one bidirectional streaming RPC chat with both request and response stream of ChatMessage messages. Application uses Kotlin Flow objects to represent asynchronous streams.

Build & Run

To generate java classes, services and client stubs:

./gradlew generateProto

To build whole project:

./gradlew build

To run:

./gradlew run

Authors

Oleg Smirnov, Alexey Shaposhnikov, Egor Gordienko

grpc-p2p-chat's People

Contributors

e90r avatar shaposhnikov-alexey avatar smirnovoleg avatar

Stargazers

 avatar

Watchers

 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.