-
Notifications
You must be signed in to change notification settings - Fork 104
Networking
The networking system is designed to hide the network from both ends. On the client the network is hidden within the client's implementation of the view and controller interfaces. On the server, the network is hidden by the server front end.
To hide the networking from the client. The controller and view interfaces wrap all networking calls. All that is needed is a connection source when initializing a controller or view - this allows the connection to the server to be initialized whenever a method call is made on the controller of view.
When a method call is made, the controller/view takes the parameters, serializes them, sends them to the server, waits for a response, deserializes the response, and returns.
To hide the network from the client. The server sits behind what we call the server front end. The server front end waits for a client to connect to it. Once a connection is established, the server desearializes the arguments, calls the correct controller/view method, serializes the result, and sends it back to the client. This allows the implementation of the server to ignore the network and act as if it was being called locally. All networking code is isolated to the front end.