SharedCanvasPlugin Developer Guide

Infrastructure, Model, Approach

The Shared Canvas PlugIn is implemented based in layered architecture, allowing separate business logic from the logic of design. Specifically, it has 2 layers: Browser representing the presentation layer and jWebSocket Server representing Business Layer. Figure 1.


The Shared Canvas Demo run in a browser and consumes functionality of the JavaScript library jQuery. Also, Shared Canvas Demo sends and receives data through jWebSocket Client. It communicates with the server via WebSocket protocol. The jWebSocket server contains the Shared Canvas PlugIn who is responsible for distributing the actions made in the Shared Canvas Demo to all users connected to the application through the Web.

The Shared Canvas PlugIn used the design pattern Observer, which allows you to send a token to all users connected to the application when a user performs a new action, then the Shared Canvas Demo is updating and all users connected can see the changes.

Shared Canvas PlugIn was developed using TokenPlugin. This is a lower-level structure where if you do not have many features and is easy to process messages, it is best to use since the application will benefit from increased performance.


Learn more about WebSockets in general, get background information and gain deeper insight!

Join jWebSocket

Wether developer, designer or translator – join the jWebSocket team and grow together with our success!

Copyright © 2013 Innotrade GmbH. All rights reserved.