GithubHelp home page GithubHelp logo

treelab / dgraph-ws-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xanthous-tech/dgraph-ws-client

1.0 1.0 0.0 69 KB

dGraph gRPC client wrapped in WebSocket protocol implemented in Rust

License: MIT License

Rust 97.61% Dockerfile 2.39%

dgraph-ws-client's Introduction

dgraph-ws-client

This is a dGraph gRPC client wrapped with WebSocket protocol written in Rust.

Motivation

We have previously implemented dgraph-js-native but was not getting enough performance boost due to not being able to invoke JS method in Rust thread in Neon. The poll-based approach was good but was simply wasting cycles and hurt the performance. I think the only other way to get better performance is to use WebSocket to wrap the gRPC client, and have this live alongside of dGraph Alpha's so the JS side can just use WebSockets to communicate.

Start

edit docker-compose.yml

version: "3"

services:
  dgraph-ws-client:
    build: .
    ports:
      - "9000:9000"
    environment:
      DGRAPH_ALPHAS: http://localhost:9080 # replace localhost with your host IP
      RUST_LOG: info
      LISTEN_ADDRESS: 0.0.0.0:9000
      CONNECTION_CHECK_INTERVAL: 5000
      CONNECTION_CHECK_RETRY: 3

and run

$ docker-compose up -d

Sponsor

Treelab

License

MIT

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.