Local and remote applications, thin and fat clients
Remote applications (Thin clients):
An application server (listening on a TCP port) receives a request to run an application and sends to the client the messages needed to render the UI (Protocol).
This way, all application code, business logics, the connections to data sources, etc reside on the server.
This assumes that the server(s) must be prepared to withstand the load required by all running applications.
- applications that make intensive use of data
- applications that need to communicate or share data between different running instances
- applications that do not want to share the source code
In fact, remote applications run on the application server and send to the frontend (client) only messages (Protocol) required for the rendering of the UI; nothing more!
Local applications (Fat clients):
mirrorjs uses and extends the pattern of thin clients. With mirrorjs, in fact, it is possible to create applications where the backend and the frontend are merged into a single module deployed directly on the client.
This approach is to be preferred in the following cases:
- applications that do not require intensive communication with a central server
(for example, a calculator, a music or video player)
(this does not exclude the possibility to request data to a server via Socket, WebSocket, AJAX requests, …)
- applications for which it is not a problem the distribution of the source code.
In fact, as mentioned just above: local applications are deployed and executed directly on the client without the need for an application server.
- load-sharing: remote applications require an application server that will handle the load of all running instances.
Local applications, contrariwise, shifts the load directly on the client.
As mentioned at point 1: it will always be possible to communicate with a central server