Daily updates from Odoo
Thursday, May 17, 2018
1 change · master
New functionality added to Odoo
This change explores replacing the current long-polling update mechanism with a continuous browser-supported event stream. It could make real-time updates in chat, calendar, live chat, and notifications more efficient and resilient by avoiding repeated reconnects.
Original PR description
POC to replace the bus's longpolling by an [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) (server-sent event) stream: all events can be…
POC to replace the bus's longpolling by an [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) (server-sent event) stream: all events can be sent on the same connection and instead of closing the connection periodically the server simply sends a keepalive comment. ## Advantages - regular plain HTTP (same as longpolling) - reconnect handled automatically by browser, including last-id support - native support for various event types (currently unused, but channel names could be provided as event names/types) - not necessary to reconnect after every event (more resistant to stampeding & al) - developer tools support [in Chrome](https://twitter.com/chromedevtools/status/562324683194785792) ## Missing from POC - presence support (left out because I don't know how that's supposed to work) - polyfill for MSIE - runbot/nginx/… rules? - chatmanager maybe? ## Comparison to WebSocket - regular HTTP connections (_should_ work with any proxy and the like) - counts towards HTTP connections count (in HTTP/1.1, can use HTTP/2 multiplexing)