Skip to content
Bahriddin Abdiev edited this page Nov 21, 2017 · 4 revisions

Welcome to the wedraw wiki!

Our implementation of the whiteboard is based on the server-client architecture. One server is responsible for getting all requests from clients and sending responses to them. For communication part, we use TCP Sockets to transmit binary code generated by Java’s built-in Serialization technique. For GUI, we utilised JavaFx and JavaFX GraphicsContext libraries for drawing objects on the canvas. The architecture of our implementation is shown in the figure.

Structure

Client’s Controller module is responsible for listening to the user’s operations and passes them to the Model module, such as moving the mouse, clicking a button, and so on. The Model calls methods in the View module to modify the canvases and passes the change of the local canvas to client’s Network module. Next, client’s Network module sends messages to the server, which will be received by server’s Network module and passes to the Model. The server’s Model module handles the incoming message and generates a list of messages as responses to be sent. And then the server’s Network module sends each message in the list to a corresponding client. At last, the client’s Network module receives the response from the server and calls methods in the Model module to handle it.

Clone this wiki locally