Virtual Channel的定制開發(fā)_第1頁(yè)
Virtual Channel的定制開發(fā)_第2頁(yè)
Virtual Channel的定制開發(fā)_第3頁(yè)
Virtual Channel的定制開發(fā)_第4頁(yè)
Virtual Channel的定制開發(fā)_第5頁(yè)
已閱讀5頁(yè),還剩15頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、Virtual Channel的定制與開發(fā),Michael Zhang, Citrix Solution Architect Greater China,運(yùn)營(yíng)商營(yíng)業(yè)廳遇到的問題,網(wǎng)絡(luò)問題: 虛擬桌面非常依賴網(wǎng)絡(luò) 運(yùn)營(yíng)商已有網(wǎng)絡(luò)復(fù)雜 很多營(yíng)業(yè)廳分散在各地,遠(yuǎn)程訪問,更容易因網(wǎng)絡(luò)問題影響體驗(yàn) 外設(shè): 營(yíng)業(yè)廳外設(shè)復(fù)雜 (Ex. 各種卡,各種非標(biāo)準(zhǔn)設(shè)備) 有些外設(shè)沒考慮過(guò)虛擬桌面場(chǎng)景,網(wǎng)絡(luò)成為瓶頸 (帶寬,延遲,丟包),Virtual Channel Overview,An ICA virtual channel is a bidirectional error-free c

2、onnection for the exchange of generalized packet data between a client and a server running Citrix XenApp or XenDesktop. Each implementation of an ICA virtual channel consists of two components: Server-side: NT service or normal process Client-side: A dynamically loadable module (.DLL) load by recei

3、ver Socket?,Architecture,WinStation: Demultiplexing the virtual channel data Gathering and sending virtual channel data,process occurs when a user starts the client,Client reads the Configuration Storage in registry. Client engine loads the virtual channel driver DLLs. For each virtual channel, the

4、WinStation driver calls the DriverOpen function, pass callback function ICADataArrival to WinStation driver, WinStation driver give a function pointer of QueueVirtualWrite When virtual channel data arrives from the server, the WinStation driver calls the ICADataArrival function for that virtual driv

5、er. WinStation driver calls DriverPoll, use QueueVirtualWrite to poll for data to send to the server,Client-Side Functions Overview,DriverOpen: Performs all initialization for the virtual driver. Called once when the client loads the virtual driver (at startup). DriverClose: Called before unloading

6、a virtual driver DriverPoll: Called periodically to see if the virtual driver has any data to write DriverInfo: Retrieves information about the virtual driver ICADataArrival: Indicates that data was delivered. Called when data arrives on the virtual channel. QueueVirtualWrite: To send a packet of ch

7、annel protocol to the server VdCallWd: Used to query and set information from the WinStation driver,Server-Side Functions Overview,WFVirtualChannelOpen: Opens a handle to a specific virtual channel. WFVirtualChannelClose: Closes an open virtual channel handle WFVirtualChannelQuery: Returns data rela

8、ted to a virtual channel, set in DriverInfo function WFVirtualChannelWrite: Writes data to a virtual channel WFVirtualChannelRead: Reads data from a virtual channel,Function Relationship between Client & Server,client-server data exchange overview,The client connects to the server running XenApp or

9、XenDesktop. The client passes information about the virtual channels it supports to the server. The server-side application starts, obtains a handle to the virtual channel, and optionally queries for additional information about the channel. The client-side virtual driver and server-side application

10、 pass data using the following two methods: If the server application has data to send to the client, the data is sent to the client immediately. When the client receives the data, the WinStation driver demultiplexes the virtual channel data from the ICA stream and passes it immediately to the clien

11、t virtual driver. If the client virtual driver has data to send to the server, the data may be sent immediately, or it may be sent the next time the WinStation driver polls the virtual driver. When the data is received by the server, it is queued until the virtual channel application reads it. There

12、 is no way to alert the server virtual channel application that data was received. When the server virtual channel application is finished, it closes the virtual channel and frees any allocated resources.,Some limitations,Virtual Channel Name: not exceeds 7 bytes Packet length: not exceeds 4996 byte

13、s,How to deploy Virtual Channel Driver,Copy xxx.dll to C:Program Files (x86)CitrixICA Client Registry settings: HKEY_LOCAL_MACHINESOFTWAREWow6432NodeCitrixICA ClientEngineConfigurationAdvancedModulesICA 3.0 VirtualDriverEx = HomaUSB HKEY_LOCAL_MACHINESOFTWAREWow6432NodeCitrixICA ClientEngineConfigur

14、ationAdvancedModulesHomaUSB Copy xxx.exe to any location of the server.,How to debug Virtual Channel,Client: Use procexp.exe to find the process ID of wfcrun32.exe, VS2010 attach to wfcrun32.exe process Server: WinDBG,Example 1: HomaUSB,Example 2: Another way to authenticate,Clients certificate pass

15、 the authentication of AGEE/WI WI list the VM User click one VM. Launch receiver, load virtual channel driver. Virtual channel driver load clients certificate in in DriverInfo A NT service in VM wait on session create event (WFWaitSystemEvent) Get logon name and certificate, check if equal If not eq

16、ual, close session (WFDisconnectSession),Architect of Customized Virtual Channel,開發(fā)實(shí)例 之一:高拍儀,特點(diǎn): 預(yù)覽時(shí)圖像分辨率高,1-2M 幀數(shù)高,每秒20幀以上 預(yù)覽時(shí)圖像不會(huì)被壓縮 拍照后的圖像會(huì)被壓縮,只有100K不到 實(shí)際有用的數(shù)據(jù)就是拍照后的那個(gè)照片 帶來(lái)后果: 帶寬無(wú)法滿足需求,預(yù)覽圖像幾乎黑屏 解決方案: 預(yù)覽圖像在本地物理機(jī)進(jìn)行,拍攝圖像后才使用虛擬通道傳輸?shù)椒?wù)端,開發(fā)實(shí)例 之二:指紋儀,特點(diǎn): 數(shù)據(jù)量很小,一個(gè)指紋總共幾K數(shù)據(jù) 采集一次指紋,會(huì)有幾十次的USB Command的交互 現(xiàn)場(chǎng)環(huán)境網(wǎng)絡(luò)延遲較大 (平均8ms) 帶來(lái)后果: 原設(shè)備的驅(qū)動(dòng)程序圖像拼接算法無(wú)法適應(yīng)這種高延遲的環(huán)境,導(dǎo)致指紋圖像采集失敗或嚴(yán)重變形 解決方案: 修改指紋采集程序的流程,采集完指紋后,通過(guò)虛擬通道發(fā)送完整指紋數(shù)據(jù)到服務(wù)端,服務(wù)端應(yīng)用程序接收到完整指紋才進(jìn)行驗(yàn)證,Best Practice in Customized Virtual Channel Dev.,Dont block in any u

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論