RemoteSkin for the web
RemoteSkin for the web consists of several parts:
- A browser (of course)
- An HTML frame web page
- A small web server (we only need an 8 KBytes small native Java web server as a plugin on any node)
- A small Javascript which establishes a websocket connection to the web server
- A second plugin on the node of the web server with a websocket server
When the website is started, the Javascript establishes a websocket connection to the node. This creates a web socket connection on the node side, which is a target with a target address. An object that has this address can send messages to the connection that change the DOM in the browser. Parts of the application can therefore be executed on any nodes in the network and still display their UI in the browser.
If a dialog is now initiated via message, it receives the following arguments:
- a session token
- the connection address (often called the RemoteSkin client address)
- the address of the owner
- the ID of a parent element in the DOM tree, which is to be filled with the new content
- and any application-specific parameters
The dialog will then independently obtain data and display it.
We use generic messages to start a dialog so that no specific API is required. To make it even easier, we use a utility class with a few methods that send the required messages.