1 / 23

基於 X 視窗系統之遠端應用程式畫面呈現 機制

基於 X 視窗系統之遠端應用程式畫面呈現 機制. Advisor : Jing Chen Reporter : 林建宏 Date : 2011/12/15. Outline. 簡介 動機與目標 相關研究 系統 架構 結論. 簡介. WebOS 使用瀏覽器操作遠端應用程式 不 需 plug-in Thin client 伺服器只分享單一應用程式 多客戶端 V.S. 單一伺服器. 簡介. 之前 實 作 方法 擷取應用程式 畫面,儲存為圖片 瀏覽器發出請求,請求圖片檔名 瀏覽器下載圖片,顯示於網頁上 缺點 以圖片方式傳送畫面,流量大

Download Presentation

基於 X 視窗系統之遠端應用程式畫面呈現 機制

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 基於X視窗系統之遠端應用程式畫面呈現機制 Advisor : Jing Chen Reporter : 林建宏 Date : 2011/12/15

  2. Outline • 簡介 • 動機與目標 • 相關研究 • 系統架構 • 結論

  3. 簡介 • WebOS • 使用瀏覽器操作遠端應用程式 • 不需 plug-in • Thin client • 伺服器只分享單一應用程式 • 多客戶端 V.S. 單一伺服器

  4. 簡介 • 之前實作方法 • 擷取應用程式畫面,儲存為圖片 • 瀏覽器發出請求,請求圖片檔名 • 瀏覽器下載圖片,顯示於網頁上 • 缺點 • 以圖片方式傳送畫面,流量大 • 以client pull方式更新畫面,延遲性高,互動性差

  5. 動機與目標 • 現有的遠端畫面呈現系統在行動裝置上效率不佳 • 互動性差 • 目標 • 改變畫面呈現方式,減少網路傳輸資料量 • 改變伺服器客戶端溝通機制,減少系統延遲性

  6. 相關研究 • XWindow System • Canvas • WebSocket

  7. XWindow System • 一種以點陣圖方式顯示軟體的顯示系統 • 標準化軟體工具套件及顯示架構的運作協定 • 主從式架構 • XServer • X Client • X Protocol • 以網路為溝通的管道

  8. XWindow System

  9. X Window System

  10. X Protocol • X視窗系統的基礎協議 • 透過網路傳送四種類型的封包 • Request:original127個,extension27個 • Reply • Event • Error

  11. Canvas • HTML5 定義之新元素 • 可視為一塊畫布 • 透過JavaScript實現網頁繪圖功能 • CanvasRenderingContext2D提供繪圖API • toDataURL() • 傳回以data:為首碼的base 64編碼表示的圖像資料

  12. WebSocket • 一種 browser 與 server 之間的通訊協定 • 透過 handshaking,雙方建立一個快速通道,實現雙方通訊 • 傳統方式 :Client Pull • 傳統實現 client server 同步方法 • Polling • Comet • 改良式 Comet - Long Polling

  13. 傳統方式比較 • Client Pull • 由瀏覽器發出HTTPRequest,伺服器返回最新資料 • 伺服器不主動傳送資料至瀏覽器 • Scenario : 網頁即時通訊 Message Message

  14. Polling • Polling • Client 固定時間發出 Request 向 Server要求更新資料 Message Message Message Request

  15. Comet • Comet • Server 端的 Polling • 永不中止的連線 Message Message Polling 前次Request

  16. Long Polling • Long Polling • 改良comet • Client 發出一個較長時間等待之 Request,當 Server 有資料回應,中斷連線並重新發送 Request Message Message Polling Polling 前次Request 下次Request

  17. WebSocket • WebSocket • 以新的通訊協議,讓 client 與 Server 建立雙向通道 • 省去 ClientRequest ,Server Reply 造成的 overhead • 可隨時互相傳遞訊息 Message Message

  18. 系統架構 • 原有系統架構 需要修改

  19. 系統架構

  20. 系統架構

  21. 系統架構 • Virtual X Server • 修改 X server 使其能將繪圖 Command 送出至WebSocket Server • 畫面呈現頁面 • 具有解析繪圖 Command 能力 • 實作一 library 對應每個繪圖 Command • 以 WebSocket 與 Server 溝通

  22. 結論 • 藉由分析 XProtocol 了解應用程式畫面的組成,將畫面組成元件傳送至瀏覽器,重現應用程式畫面 • 降低網路傳輸流量並減少延遲性 • 未來可以針對應用程式特性,發展出不同呈現機制

  23. 參考資料 • X視窗系統 • http://zh.wikipedia.org/wiki/X_Window%E7%B3%BB%E7%B5%B1 • X Window核心協議 • http://zh.wikipedia.org/wiki/X_Window%E6%A0%B8%E5%BF%83%E5%8D%94%E8%AD%B0 • Browser 與 Server 持續同步的作法介紹 • http://www.josephj.com/entry.php?id=358 • Canvas • http://zh.wikipedia.org/wiki/Canvas_%28HTML%E5%85%83%E7%B4%A0%29 • WebSocket • http://zh.wikipedia.org/wiki/WebSocket • X視窗應用程式分享系統之設計與實作

More Related