components.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. Modelverse components
  2. =====================
  3. The Modelverse consists of three individual projects, which are linked together to construct the Modelverse.
  4. Each of these projects stands alone and has its own concerns.
  5. A socket interface to communicate with the other components is provided.
  6. By using sockets, it becomes possible to switch everything about the implementation, even the implementation language, without endangering interoperability.
  7. The three projects are:
  8. 1. Modelverse State
  9. 2. Modelverse Kernel
  10. 3. Modelverse Interface
  11. .. image:: img/overview.svg
  12. Modelverse State (MvS)
  13. ----------------------
  14. The Modelverse State implements the data storage features of the Modelverse.
  15. To the Modelverse State, all data needs to be representable as a graph, which it will manipulate.
  16. All basic, and some composite, operations are implemented on this graph, such as creating nodes and edges, reading them, and deleting them.
  17. Modelverse Kernel (MvK)
  18. -----------------------
  19. The Modelverse Kernel communicates with the MvS and interprets its data.
  20. The Modelverse Kernel has no way of storing data, except by sending it to the MvS for storage.
  21. Through this architecture, the MvK becomes completely stateless and easily replacable.
  22. For the MvK, a set of rules is defined which tell it how to interpret the graph in the MvS.
  23. Complex programs can be written by encoding the program as a graph, and letting the MvK interpret it.
  24. To allow for maximal flexibility, the MvK can never expose the users to the internal identifier of the MvS, which the MvK uses.
  25. This allows the MvS to internally restructure itself without having to worry about stale references elsewhere.
  26. Modelverse Interface (MvI)
  27. --------------------------
  28. The Modelverse Interface is the part that most users will be using.
  29. It presents a textual or graphical interface to the Modelverse itself.
  30. Depending on the interface, the MvK and MvS will serve only as a repository (heavy client), or they serve as the tool itself (thin client).
  31. Either way, the communication is identical, just the granularity differs, and the place where the algorithms are implemented.
  32. Traditionally, the MvI is a compiler that compiles some code to either a graph, or operations for the MvK.
  33. This can, however, be any possible kind of tool, or even combination of multiple tools.
  34. For example, a graphical tool could serve as an interface to the Modelverse, where it just processes the graphical events and sends the desired operations (such as creating an element) to the Modelverse.