Confirmed users
51
edits
m (→Bridge) |
|||
| Line 251: | Line 251: | ||
The bridge is designed around a Client/Server architecture, where one server can have multiple clients. | The bridge is designed around a Client/Server architecture, where one server can have multiple clients. | ||
The clients can call remote methods | The clients can call remote methods on the server, and can subscribe to events. The server API is defined in a separated strict contract file.<br /> | ||
The client does not need to know who is going to resolve the contract. As a result servers can either be Windows, Workers, SharedWorkers or even a ServiceWorker. | The client does not need to know who is going to resolve the contract. As a result servers can either be Windows, Workers, SharedWorkers or even a ServiceWorker. | ||
It | It can also be used by a Worker (as a Client) to access Main-thread only WebAPIs via the bridge channel.<br /> | ||
The contract defined between a client and a server define the methods and events available, has strong types, offer a place to record the communication for debugging purpose, can measure the latency of responses and fire a telemetry report, ... | The contract defined between a client and a server define the methods and events available, has strong types, offer a place to record the communication for debugging purpose, can measure the latency of responses and fire a telemetry report, ... | ||