Skip to content

Instantly share code, notes, and snippets.

@changtimwu
Created September 20, 2014 14:49
Show Gist options
  • Save changtimwu/1a7f0b1c615dd8ed251d to your computer and use it in GitHub Desktop.
Save changtimwu/1a7f0b1c615dd8ed251d to your computer and use it in GitHub Desktop.
study on svg and reacts
@changtimwu
Copy link
Author

Server side state

細心的讀者也許會發現,這兩個問題的癥結,都是因為伺服器缺乏執行試算表指令的能力。如果伺服器在接收到每個指令時,可以自行更新內部的試算表狀態,它其實根本不需要維護指令的積存紀錄。

transfer server side state to a new client and no history(undo data for it.
每個協作時段都對應到一個沙盒內的 SocialCalc 控制器,即時執行客戶端傳來的指令。當新客戶端加入時,伺服器僅需傳送試算表控制器內的最新狀態,從而徹底解決積存紀錄帶來的效能問題。

server side rendering isn't hard.
所以,我們移除了 RenderSheet 函式,用 20 行 LiveScript 代碼 重新實作了匯出 HTML 所需的極少數 DOM 介面,然後再運行了一次效能分析器:

@changtimwu
Copy link
Author

@changtimwu
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment