master | dev |
---|---|
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).
- Goal
- A running local CollabServer
- A running grapheditor connected with CollabServer
- Working on a graph in collaboration
- Setup CollabServer
- Be sure you have all the system-wide dependencies and requirements.
- Clone collab-server project
- Build collab-server (See Build server instructions)
- Setup GraphEditor
- Be sure you have all the system-wide dependencies and requirements.
- Clone this project
- Build this project (Follow the build instructions)
- Start GraphEditor (First client)
- Open a console (Must be started from a console)
- Run the grapheditor executable (You enter editor)
- Use
help
orh
to show all commands - Each command has a full name (ex:
vertexAdd
) and a short version (ex:vadd
)
- 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)
- Start a second client
co localhost 4242
(Connect the same CollabServer)join 1
(Join the previously created data. ID 1 is frominfo
on first client)gshow
(You should see the exact same graph)
- Collaborate
- Apply any operation on any user and see the changes on others.
arem v1 name
to remove attribute name from v1aset v2 name Raccoon
to change attribute value in v2
- Graph Data
- vertex
- ID name (String)
- Edges (Set)
- Attributes (Map)
- Edge
- ID source (String)
- ID destination (String)
- Attribute
- Name (String)
- Value (String)
- vertex
- 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
# 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 |
- 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)
- System-Wide (Must be installed manually)
- ZeroMQ (Release 3.1.1)
- ArchLinux:
pacman -S zeromq
- Ubuntu:
apt-get install libzmq3 libzmq3-dev
- There is also a Windows binary here (Not tested yet)
- ArchLinux:
- Curl
- ZeroMQ (Release 3.1.1)
- Automatically downloaded and built by CMake
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.
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.
- Download Mvk (See official install documentation)
- Run local Mvk database
python mvk_location/scripts/run_local_modelverse.py
- Install Doxygen
doxygen Doxyfile
- Files are placed in
doc
folder
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
- Constantin Masson (constantinmasson.com)
- Robin
- Thierry