Giter Site home page Giter Site logo

collaboration-server's Introduction

Universal Data Tool Collaboration Server

npm version

Note: This is just for people that want to run their own collaboration server. You don't need to use this to collaborate with the Universal Data Tool, because there's a builtin public server.

This project runs a collaboration server that can be used with the Universal Data Tool. To use a custom collaboration server, go into the UDT and open a project. Under Setup > Advanced, you'll see a button for "Custom Collaboration Server". Put in the address to the server this project runs and you should be able to collaborate with anyone else on that server.

Usage

npm install -g udt-collaboration-server

udt-collaboration-server --port 80

Support & Docs

Join the Universal Data Tool Slack if you run into any issues!

You may find the UDT docs helpful as well!

Technical Details

Technologies Used

API

Check out the API Sequence Diagram here.

This server exposes the following endpoints:

  • POST /api/session: Creates a link to a UDT session. Whoever initiates collaboration mode calls this. It is called exactly once to start a session. A session lasts indefinitely. Returns the url to the session.
  • GET /api/session/<session_id>: Gets the latest version of the UDT JSON file by getting the latest session_state (see DB Architecture)
  • GET /api/session/<session_id>/diffs: Gets recent diffs for the JSON file
    • The requestor must provide the querystring parameter since=<ISODATE> indicating that they would like the diffs since the last time they polled.
    • The UDT will poll this every 250-500ms. Most of the time it'll return an empty array of patches.
    • Responds with { patches: Array<JSONDiffPatch>, hashOfLatestState, latestVersion }
  • PATCH /api/session/<session_id>: Sends a JSONDiffPatch object with changes
    • Request contains { patch, mySessionStateId }
      • patch is applied against the latest session state to generate a new session state.
      • mySessionStateId isn't used (for now)
    • Should return { hashOfLatestState, latestVersion }

Database Architecture

Check the schema.js

collaboration-server's People

Contributors

mrdadah avatar seveibar avatar

Stargazers

 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.