3 ms·
Congratulations! This looks super interesting! How are side effects (mutating HTTP calls, cookie creation, other I/O) handled?
by kodeninja 5y ago
Congratulations! This looks super interesting!
How are side effects (mutating HTTP calls, cookie creation, other I/O) handled?
- jazzdan 5y ago(Replay engineer): we basically record all the inputs and outputs to a program. In the example of an HTTP request: when recording we'd record that a request was made, and the response. When replaying, rather than make the HTTP request, we return the response that was recorded. If you're interested you can learn more about how Replay works here: https://medium.com/replay-io/how-replay-works-5c9c29580c58 https://medium.com/replay-io/how-replay-works-5c9c29580c58
- kodeninja 5y agoThanks!
- missblit 5y ago> Likewise, the raw pointer values don’t have an effect on the behavior of the JavaScript There are actually some cases where raw pointer values can effect user-visible browser behavior indirectly. Notably if the pointer values affect iteration order in an associative data structure which the browser uses in some way that tickles JS differently depending on the order. There are bunches of other bizarre edge cases you'd never think of as well that never come up (until inevitably one day they do). Another example: In old versions of Blink I've seen ligatures fail to form depending on what was in the font cache when the page was loaded.
- bhackett 5y ago(Replay employee) Yeah, later in the post (https://medium.com/replay-io/effective-determinism-54cc91f5693c https://medium.com/replay-io/effective-determinism-54cc91f56...) we mention needing mitigations to ensure that hashtable iteration is deterministic in cases where it affects how the browser interacts with the JS engine. There are others needed as well to ensure that the browser behaves the same across a large range of websites, my favorite is handling sites that sniff information about the system's math libraries by e.g. calling Math.sin() on specific values and testing the results --- the values when replaying need to be bitwise identical with what happened while recording.
- missblit 5y agoAh I shouldn't have stopped reading. Then as one of the rare browser replay experts (there's gotta be at least like... 7 of us right?) I can certify your project as the real deal.
- a_c 5y agoThanks for the pointer. Will take some time to digest the content. Have you considered in making a library, so whoever wants a session replay can manually initiate a recording? So you don't have to maintain a browser fork. I am asking without fully understanding the technical detail. Please forgive my ignorance
- weaksauce 5y agoFrom my reading of it it looks like it is language agnostic but only browsers right now. python and ruby support are in the works per their homepage