First page Back Continue Last page Graphics
The Dispatcher
- After the POST request is sent, SIMRacingApps.js establishes a connection.
- The "sessionid" is sent to the server to request any updates to the data subscribed to in the POST request.
- The dispatcher can be configured to poll for changes or to have changes pushed by the server to the browser automatically. The default is to poll for new data. The interval for either of these approaches can be defined by the user and defaults to 100 milliseconds. Values as low as 1ms is possible, but it really depends on the needs of the client and the ability of the SIM to produce data and the browser to render the data that fast.
- Once new data is received, it is parsed and assigned to the $scope.data object that is bound to the DOM element that originally subscribed to it. This triggers the Angular watches to take over and update the element based on how you bound to it.