memgraph/experimental/distributed
Teon Banek 06b0111ddc Remove unused stuff from CMakeLists
Summary: In the process, make experimental/distributed compilable.

Reviewers: mislav.bradac, buda, mferencevic

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D906
2017-10-16 13:45:18 +02:00
..
src Remove unused stuff from CMakeLists 2017-10-16 13:45:18 +02:00
tests Remove unused stuff from CMakeLists 2017-10-16 13:45:18 +02:00
.clang-format Merged experimental repo. 2017-08-03 12:48:19 +02:00
.gitignore Merged experimental repo. 2017-08-03 12:48:19 +02:00
CMakeLists.txt Remove unused stuff from CMakeLists 2017-10-16 13:45:18 +02:00
config Make Distributed Memgraph Stub 2017-08-24 16:58:35 +02:00
init Merged experimental repo. 2017-08-03 12:48:19 +02:00
main-client.cpp Implement create vertex and count vertices query 2017-09-18 07:26:03 +02:00
main.cpp Remove unused stuff from CMakeLists 2017-10-16 13:45:18 +02:00
README.md Distributed Memgraph with Reactors (first queries) 2017-08-25 15:26:10 +02:00
start_main.py Implement create vertex and count vertices query 2017-09-18 07:26:03 +02:00

distributed memgraph

This subdirectory structure implements distributed infrastructure of Memgraph.

Terminology

  • Memgraph Node Id (mnid): a machine (processs) that runs a (distributed) Memgraph program.
  • Node: a computer that performs (distributed) work.
  • Vertex: an abstract graph concept.
  • Reactor: a unit of concurrent execution, lives on its own thread.
  • Channel: a (one-way) communication abstraction between Reactors. The reactors can be on the same machine or on different processes.
  • Message: gets sent through channels. Must be serializable if sent via network layer (library: cereal).
  • Event: arrival of a (subclass of) Message. You can register callbacks. Register exact callbacks (not for derivated/subclasses).
  • EventStream: read-end of a channel, is owned by exactly one Reactor/thread.
  • ChannelWriter: write-end of a channel, can be owned (wrote into) by multiple threads.

Ownership:

  • System, Distributed are singletons. They should be always alive.
  • ChannelWriter (write-end) should be lightweight and can be copied arbitrarily.
  • EventStream (read-end) should never be written by anyone except the owner (the reactor that created it).
  • In general: always think about who owns an object. Preferably write it in its comment block.

Code Conventions

  • Locked: A method having a "Locked..." prefix indicates that you have to lock the appropriate mutex before calling this function.
  • ALWAYS close channels. You will memory leak if you don't. Reactor::CloseChannel or Subscription::Close will do the trick.

Dependencies

  • cereal