Scalable asynchronous interaction based on selective recording and replaying of X-protocol streams