Giter VIP home page Giter VIP logo

collab-grapheditor's Introduction

CollabServer - GraphEditor

license Build Status

master dev
Build Status Build Status

Overview

GraphEditor is a command line tool for graph that supports realtime collaboration with several users. Contributors may edit a graph at the same time, even with totally concurrent operations. Concurrency is resolved without any locking or synchronization.

The goal of this project is to show an example of end-user client using the CollabServer Framework. It is built using the collab-data-crdts (SimpleGraph data structure) and, collab-client-interface (Client interface to work with a collab-server). All the "black magic" is done behind the scene and this project may be done by an application / UI developer (Without any knowledge about collaboration and, concurrency).

Quick Start

  1. Goal
    • A running local CollabServer
    • A running grapheditor connected with CollabServer
    • Working on a graph in collaboration
  2. Setup CollabServer
  3. Setup GraphEditor
    • Be sure you have all the system-wide dependencies and requirements.
    • Clone this project
    • Build this project (Follow the build instructions)
  4. Start GraphEditor (First client)
    • Open a console (Must be started from a console)
    • Run the grapheditor executable (You enter editor)
    • Use help or h to show all commands
    • Each command has a full name (ex: vertexAdd) and a short version (ex: vadd)
  5. Create a Graph
    • co localhost 4242 (Connect your local CollabServer)
    • crea (Start a collaboration)
    • info (Display current status. You should be connected and data loaded)
    • vadd v1 (Add a vertex v1)
    • vadd v2 (Add a vertex v2)
    • eadd v1 v2 (Add edge)
    • aadd v1 name Panda
    • aadd v2 name Gnu
    • gshow (Display the whole graph)
  6. Start a second client
    • co localhost 4242 (Connect the same CollabServer)
    • join 1 (Join the previously created data. ID 1 is from info on first client)
    • gshow (You should see the exact same graph)
  7. Collaborate
    • Apply any operation on any user and see the changes on others.
    • arem v1 name to remove attribute name from v1
    • aset v2 name Raccoon to change attribute value in v2

Features

  • Graph Data
    • vertex
      • ID name (String)
      • Edges (Set)
      • Attributes (Map)
    • Edge
      • ID source (String)
      • ID destination (String)
    • Attribute
      • Name (String)
      • Value (String)
  • Graph Editing
    • Add vertex
    • Remove vertex
    • Add edge between two vertices
    • Remove edge
    • Add vertex attribute
    • Remove vertex attribute
    • Change vertex attribute value
  • Graph Info
    • List all vertices
    • Show vertex info
    • Show all graph
  • CollabServer
    • Connect
    • Disconnect
    • Create new collaborative data
    • Join existing collaborative data
    • Leave collaborative data
  • Mvk Database (Optional)
    • Connect to MVK
    • Load data from MVK

Build on Linux (CMake)

# Warning: Install system-wide dependencies
# Be sure you have all requirements

mkdir build
cd build
cmake -DCOLLAB_DEPENDENCIES_DOWNLOAD=ON ..
make
make run # This start the grapheditor

# Or use build script
./build.sh
cd build
make run
CMake option Name Description
COLLAB_DEPENDENCIES_DIR (STRING) Path to a directory where to find all dependencies (By default, uses current cmake build)
COLLAB_DEPENDENCIES_DOWNLOAD (ON/OFF) Set ON to also download dependencies at cmake time. This is useful the first time you setup the project. Dependencies are placed in COLLAB_DEPENDENCIES_DIR. (By default: OFF).
CMAKE_BUILD_TYPE Debug, Release, RelWithDebInfo, MinSizeRel

Requirements

  • C++11
  • pragma once support
  • Tested with gcc 4.8.4
  • Tested with clang 5.0.0
  • Tested only on Linux. No support certified for Mac and Windows
  • CMake (2.8.2 or higher)

Dependencies

Option: save dependencies for offline use

Dependencies downloaded by CMake are placed in the current CMake build folder (in dependencies folder). This is useful the firs time. To speedup the cmake process, you may keep these downloaded and built dependencies in a safe place and change the CMake dependencies path (See CMake options).

Option: use environment variable for dependencies path

If COLLAB_DEPENDENCIES_DIR environment variable is set, CMake will use it as the current dependencies path.

Modelverse Database (Optional)

Warning: Not fully functional yet. Don't use it in release.

Mvk is a database for Model-Driven Engineering and stores everything as an MDE model.

If an Mvk database is running, you may automatically save any changes done on a graph during the collaboration. CollabServer deals with users concurrency.

Generate Documentation

  1. Install Doxygen
  2. doxygen Doxyfile
  3. Files are placed in doc folder

Contribution

Feel free to ask me any question, share your ideas or open an issue. I created this project during my master thesis at University of Montreal. I generally try to follow the Google C++ Coding Style with some exceptions (For instance, I use 4 space indentation).

Uses C++11

Authors

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.