Network interface
=================

The network communication in the Modelverse builds on top of the raw socket implementation of Python.
Whereas we use normal HTTP requests, we explicitly opted not to use these libraries.
Many of these libraries hide important implementation details, such as how successive requests are handled (sequential, threaded, ...), whether or not to keep connections open and reuse them, which HTTP version to implement, and so on.
As the HTTP protocol is a simple protocol, we reimplemented it completely in SCCD (StateCharts and Class Diagrams).

There are two network components: a server in the MvS, and a server and client in the MvK.
These are discussed next.

MvS server
----------

.. image:: img/mvs_server.svg

MvK server
----------

.. image:: img/mvk_server.svg
