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.

  1. applications that make intensive use of data
  2. applications that need to communicate or share data between different running instances
    (eg, chat)
  3. 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:

  1. 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, …)
  2. 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.
    (the code (JavaScript) may still be obfuscated with Closure Compiler)
  3. 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


You may also like...

3 Responses

  1. noody says:

    What is the channel between the application server and the client? what about the protocol?

    • mirrorjs says:

      mirrorjs implements 3 communication channels: local (for fat clients) (local connection technically does not exist, the backend is directly connected with the frontend), SockJS and Socket.

      SockJS can be used for web and desktop applications while the Socket channel can only be used for desktop applications (with node-webkit) (browsers do not support Sockets).

      The protocol is based on JSON and tries to be as minimal (compressed) and optimized as possible. For example if you change 3 properties of a control (widget) in the same event, a single message is sent to the client containing all three properties (unlike other protocols that instead would send 3 distinct messages).

  1. September 7, 2014

    […] We talked about backend and frontend, server and client. In mirrorjs you can develop applications (fat client) where the backend and the frontend are deployed on the client without the need for a server (Fat client pattern). Read more about Local and remote applications […]

Leave a Reply

Your email address will not be published. Required fields are marked *