Remoting Architecture

From FirebugWiki

(Difference between revisions)
Jump to: navigation, search
Line 35: Line 35:
== Connection ==
== Connection ==
 +
Connection object is responsible for sending properly setup packets to the server and handling all response packets. This object is also responsible for handling any errors (or error packets) that can occur during the communication.
-
TODO
+
[[Image:Proxy-connection.png‎]]
 +
 
 +
* Remote proxies should always use the connection object to send JSON packets
 +
* The connection is singleton it'll be probably attached to the global ''Firebug'' object

Revision as of 11:37, 15 August 2012

This page is intended to summarize basic architecture concepts for Firebug (and Firebug extensions) remote capabilities (such as remote debugging or remote HTTP monitoring).

Resources

Proxy

The proxy object represents a connection between a panel (front end) and a module (back end).

The proxy has essentially two implementations:

  • Local - direct API calls
  • Remote - communication over TCP/IP protocol

Panel-proxy-module.png

  • Panel (a view) should never use Module (a service) directly
  • The communication should always be done through the current proxy
  • Each Panel should have its own proxy that implements API of the remote module (service)
  • There can be also proxy objects used by non-panel objects, e.g. the Profiler

Here is a more detailed diagram with local and remote proxies.

Local-and-remote-proxies.png

  • Panel object at the top is referencing its proxy object
  • The proxy implementation can be local or remote
  • Local proxy uses direct API calls (in process) and asynchronous callbacks
  • Remote proxy uses TCP/IP connection to communicate with the back-end using JSON packets
  • The remote communication is based on RDP
  • The server side implements Actor, which is responsible for communication with specific proxy
  • The actor is finally consuming back-end Module (service) API


Connection

Connection object is responsible for sending properly setup packets to the server and handling all response packets. This object is also responsible for handling any errors (or error packets) that can occur during the communication.

Proxy-connection.png

  • Remote proxies should always use the connection object to send JSON packets
  • The connection is singleton it'll be probably attached to the global Firebug object
Personal tools