wcf 4.0-企業級雲端服務應用實務
TRANSCRIPT
WCF 4.0 企業級雲端服務應用實務
張書源
趨勢科技 / 技術經理集英信誠 / 網酷科技 / 資深顧問DEV 304
大綱WCF 技術發展目標WCF 4.0 簡化的工作
組態設定Routing 服務WCF 服務探索
WCF 4.0 與雲端應用程式WCF 4.0 與 Http/RESTWCF 4.0 與用戶端程式
WCF 技術發展目標
簡單
雲端
Http/REST
用戶端
WCF 技術發展目標
簡單
雲端
Http/REST
用戶端
WCF 4.0 組態設定的簡化預設服務行為
WCF 4.0 提供預設的服務行為,簡化組態設定標準端點
具備基本預設的組態設定,例如:<endpoint address = "mex" kind = "mexEndpoint" />
預設繫結根據通信協定自動選取繫結方式
預設服務端點IIS 7 + WAS 自動建立
使用 WCF 4.0 中的預設組態Demo
WCF 4.0 路由 (Routing) 服務現有的挑戰
產生新版本服務時,用戶端程式必須要隨之調整不同版本的服務,可能會需要同時並行
解決方案透過 WCF 路由服務,根據資料內容自動將用戶端要求繞送到正確的服務版本
Service v1
Routing ServiceClientService v2
使用 WCF 4.0 的路由服務Demo
Demo 情境
Client Appt
路由服務
MyService1
MyService2
Demo 情境
Client Appt
Client App v.2t
Employee
EmployeeV2
路由服務
Employee
EmployeeV2
MyService1
MyService2
如何透過路由服務設定通信協定繫結
Demo
Demo 情境
Client Appt
Client App v.2t
路由服務
MyService1
MyService2
Http
Http
Tcp
Tcp
Demo 情境
Client Appt
路由服務
MyService1
Backup
X
WCF 服務探索
現有的挑戰WCF 用戶端依賴 WCF 服務端點設定必須依賴昂貴的硬體才可以具有高可用性
解決方案
Service
ServiceClient
WS-Discovery Probe, Match
WS-Discovery Probe, Match
X
WCF 4.0 對於 WS-Discovery的支援
Ad Hoc 模式利用 UDP 廣播自己的位置,或接聽搜尋訊息容易增加網路流量不適合在網際網路中使用
Managed 模式透過探索 Proxy 的集中式伺服器,維護可用服務的相關資訊用戶端使用探索 Proxy 擷取可用服務的相關資訊
使用 WCF Ad-Hoc 服務探索Demo
WCF 技術發展目標
簡單
雲端
Http/REST
用戶端
AppFabric: 新一代的中間層平台
雲端與企業級應用程式的中間層服務平台
AppFabric Container
AppFabric
AppManager
Access Control
Caching
Service Bus
Integration
Workflows
WCF Services
Custom Code
Server Cloud
AppFabric 服務
9/15 16:50 ~ 18:00
MID 302 深入研究雲端
應用程式平台 -
AppFabric
WCF 技術發展目標
簡單
雲端
Http/REST
用戶端
業界趨勢WebSites WebAPIs
在裝置上提供更豐富的使用者操作經驗維持一致的 Infrastructure 與商業邏輯
On Prem Cloud移植成 Web API 時需要額外的工作同時必須支援 on-prem 與 cloud 的 API
必須要能支援更廣泛的用戶端Http 目前被所有的用戶端支援
WebSockets使用 HTTP 協定建立 URI 要求、重導、驗證… 等動作使用 WebSockets 建立雙向溝通
任何訊息交換模式,無論是 streamed 或是 buffered
HTTP Client
HTTPServer
HTTP Upgrade Request
HTTP Client
HTTPServer
HTTP “Switch Protocols” Response
1
2
Existing HTTP/1.1
WebSocket
WebSocket3
TCP Newprotocol
使用 WebSocketsDemo
http://tinyurl.com/wcfwebsocketshttp://html5labs.interoperabilitybridges.com/
使用 WebSocketsDemo
http://tinyurl.com/wcfwebsocketshttp://html5labs.interoperabilitybridges.com/
WCF 技術發展目標
簡單
雲端
Http/REST
用戶端
WCF RIA Services
針對 LOB 應用程式提供了良好的開發經驗短時間就可以建立支援新增、修改、刪除、查詢的服務內建應用程式服務 : 驗證 / 授權 /profiles
Service
在 jQuery 中使用 WCF 服務Demo
你需要什麼?Visual Studio 2010
Premium 或 Ultimate
稍熟 C# 或 VB
相關課程與內容深入研究雲端應用程式平台 - AppFabric( MID302 )9/15/2010 16:50 – 18:00 Room 101CD
http://msdn.microsoft.com/zh-tw/library/ms733103.aspx (WCF 功能詳細資料 )
http://wcf.codeplex.com/ (WCF Codeplex 網站 )
http://www.silverlight.net/learn/advanced-techniques/wcf-ria-services/get-started-with-wcf-ria-services/ (WCF RIA 服務 )
http://technet.microsoft.com/zh-tw/default.aspx
Resources for IT Professionals
http://msdn.microsoft.com/zh-tw/default.aspx
Resources for Developers
www.microsoft.com/learning Microsoft Certification and Training Resources
其他資源
Required Slide給講師的備忘錄: 在 TechNet 與 msdn 的區塊下方,您可自行放入相關的其他連結及連結名稱。
http://support.microsoft.com/default.aspx?ln=ZH-TW Microsoft 技術支援與服務
http://www.microsoft.com/taiwan/security/default.mspx Microsoft 資訊安全首頁
請協助完成「本課程問卷」,並在離開教室時交給工作人員!
填妥大會背包中的大會問卷,可於活動第三天兌換問卷禮哦!
感謝您的合作。
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.