엔터프라이즈통신인프라를위한 WCF 의기능들 유경상 수석컨설턴트 TheOne Technology
Agenda Introduction What is WCF? WCF Features Enterprise Communication Infra Requirements WCF in Enterprise Environment Reliability Transaction P2P Other Features.NET Framework 3.5 & VS 2008 What s new in WCF? Conclusion
ntroduction to
What is WCF? Windows Communication Foundation 차세대닷넷 Communication 인프라.NET Framework 3.0의기능 Service Oriented Architecture 기반 Web Service (XML + SOAP) 기반 다양한 Communication 프로토콜지원 HTTP, TCP, Named Pipe, MSMQ, P2P 다양한웹서비스표준지원 SOAP 1.2, WS-Addressing WSDL, WS-Policy WS-Security, WS-Trust, WS-SecureConversation WS-ReliableMessaging WS-AtomicTransaction, WS-Coordinate
Why WCF? Future Communication Infra 웹서비스기반 (XML + HTTP) 서비스지향아키텍처 (SOA) Interoperability 표준 WS-* 스펙구현 Microsoft 의차세대통신인프라 Common Programming Model Web Service,.NET Remoting, IPC, MSMQ 프로토콜에관계없이하나의프로그래밍모델사용가능 단일코드베이스사용가능 New feature 트랜잭션, 신뢰할수있는메시징, P2P, 다양한바인딩 ( 프로토콜지원 )
WCF Features (1) Web Service Based XML, HTTP, SOAP, WSDL 등웹서비스스펙준수 Security WS-Security, WS-Trust 등메시지기반보안제공 HTTPS, 인증기반의 TCP/IP 등트랜스포트수준의보안제공 Transaction 분산트랜잭션지원 TCP 바인딩사용시 OLE Transaction 직접사용 HTTP 바인딩사용시 WS-AT 를통해트랜잭션젂파 Reliability 신뢰도높은메시징을위해 WS-RM 프로토콜구현 세션기능제공 (ASP.NET 의세션과는다른개념 ) P2P Networking Rich Built-in Bindings BasicHttp, WSHttp, WSDualHttp, NetTcp, NetMsmq, NetNamedPipe 등
WCF Features (2)
as nterprise ommunication nfrastructure
Enterprise Communication Infra. Requirement 개발생산성 (Productivity) 성능 (Performance) 확장성 (Scalability) 기능성 (Function) 트랜잭션 (Transaction) 신뢰도 (Reliability) 보안 (Security) 단일프로그래밍모델 기존 ASMX, Remoting, DCOM(Enterprise Services), MSMQ 프로그래밍모델을통합하는프로그래밍모델 상호운영성 (Interoperability) 유연성 (Flexibility)
Legacy Communication Infra.NET Remoting 성능적으로우수함 (TCP Channel + Binary Formatter) 상호운영성이떨어짐 Proxy 객체작성이어려움 (Façade 어셈블리참조필요 ) IIS 호스팅에한계를가짐 (HTTP Channel 필수 ) ASP.NET Web Service 상호운영성이우수함 상대적으로성능이떨어짐 HTTP 만을사용할수있음 유연성이떨어짐 Enterprise Services(DCOM)/MSMQ 가장다양한기능보유 ( 트랜잭션, 보안, 객체풀링, 인스턴스모델 ) 방화벽통과가어려움 닷넷과함께사용시성능저하 상호운영성이크게떨어짐
Business Service with Legacy Communication Infra Java client Legacy application Interoperability XML Message HTTP Web Service Interface (ASMX + WSE) Service.NET Client Performance Binary Message TCP Channel.NET Remoting Interface Reliability Business Logic MSMQ Message MSMQ Client WAN Message Queue MSMQ Interface Distributed Transaction DCOM Other COM+ Component PDA/Mobile Client MSMQ Message Off-line Messaging Façade Layer
WCF as Enterprise Communication Infra Advantage 유연성 HTTP, TCP, Named Pipe, MSMQ, P2P 등다양한트랜스포트지원 단일프로그래밍모델 선언적서비스종점 (endpoint) 성능 TCP 트랜스포트 + 바이너리인코딩 TCP 를사용하면서도 IIS 7.0 에호스팅가능 (WAS) 상호운영성 SOAP 기반의메시지 WS-* 기반의인터넷표준사용 다양한기능 보안, 트랜잭션, 신뢰할수있는메시징등 Disadvantage 상대적으로새로운기술 마이그레이션필요
Business Service with WCF Interoperability Security Reliability Transaction Endpoint WCF Service Java client Legacy application WCF Message Address #1 Contract WSHttpBinding Endpoint Address #2 WCF Client WCF Message Contract NetTcpBinding Business Logic WCF Message WCF Client WAN Message Queue Endpoint Address #3 Contract NetMsmqBinding WCF Message Disconnected Client
Enterprise Communication Infra: Reliability Reliable Messaging in WCF 네트워크상의중갂매개체의메시지젂송문제해결 메시지젂달에대한보장 (End-to-End Reliability) 메시지에대한 ACK(acknowledge) 사용 메시지재젂송메커니즘 메시지의순차적인젂송 WS-ReliableMessaging 표준준수 Reliable Session 사용 WSHttpBinding, WSDualHttpBinding, NetTcpBinding 사용 Using MSMQ Transport 네트워크뿐만아니라서비스가다운된상황에서도메시지젂송 Off-line 시나리오 NetMsmqBinding 사용
Enterprise Communication Infra: Point-to-Point Reliability Proxy, Firewall, Router, Transport Channel Unknown Channel Intermediate Servers Transport level Reliability Transport Channel Client Unknown Channel Transport Channel Service Intermediate Servers Unknown Channel Point-to-Point Cache server, Firewall, Router,.. Point-to-Point Point-to-Point
Enterprise Communication Infra: End-to-End Reliability Proxy, Firewall, Router, Message with ID Retransmit!!! Down Intermediate Servers Message Received And Send ACK Client Service Message with ID Intermediate Servers Cache server, Firewall, Router,.. End-to-End
Enterprise Communication Infra: Reliability with MSMQ Proxy, Firewall, Router, Offline MSMQ Send Queue Intermediate Servers MSMQ Receive Queue Down Client Message Queued Service Intermediate Servers Cache server, Firewall, Router,..
WCF Reliability Demo
Enterprise Communication Infra: Distributed Transaction 서비스 / 클라이언트의분산트랜잭션 Enterprise Services 에의해서만지원되던기능 COM+ 서버어플리케이션타입만이지원 MSDTC 와 OLE Transaction 프로토콜, DCOM 에의해제공 다양한제약사항존재 방화벽통과가어려움 닷넷홖경에서성능이떨어짐 Transaction in WCF HTTP, TCP, Named Pipe 트랜스포트지원 HTTP 사용시방화벽통과가상대적으로용이함 OLE Transaction 및 WS-AtomicTransaction 프로토콜사용 상호운영성이향상됨 System.Transactions 네임스페이스기반 TransactionScope 객체를통한트랜잭션지원
Enterprise Communication Infra: Transaction Scenario Distributed/Atomic Transaction 클라이언트 주문처리서비스 재고데이터베이스 주문처리컴포넌트 재고관리컴포넌트 카드승인웹서비스 배송요청웹서비스
Enterprise Communication Infra: Transaction and MSDTC Distributed/Atomic Transaction 클라이언트 주문처리서비스 재고데이터베이스 주문처리컴포넌트 MSDTC 재고관리컴포넌트 MSDTC Other MSDTC TM WS-AT and other standards 카드승인웹서비스 배송요청웹서비스
WCF Transaction Demo
Enterprise Communication Infra: Peer-to-Peer P2P in Enterprise Environment 사내메신저 서버콘텐트동기화 P2P in WCF 메쉬 (mesh) 기반의 P2P 지원 부분연결된메쉬 TCP 트랜스포트기반 NetPeerTcpBinding 지원 단일프로그래밍모델 지원하는 P2P 인프라 PNRP (Peer Name Resolution Protocol) Custom Resolver Partially Connected Mesh Server Server Server Server Server Server
Enterprise Communication Infra: P2P Scenario (1) Centralized Content Server Congestion!!! Region A Clients Region B Clients Region C Clients
Enterprise Communication Infra: P2P Scenario (2) Centralized Content Server Local Content Server Local Content Server Local Content Server Region A Clients Region B Clients Region C Clients
WCF P2P Demo
Enterprise Communication Infra: Other Features Callback 클라이언트에대한통지 (notification) 배치작업종료 공지사항 Performance + Reliability + Management WAS(Windows Activation Service) with IIS 7.0 TCP 트랜스포트 + 바이너리인코딩 IIS 의강력한안정성 Recycling, Web Garden, Health Monitoring,... Efficient Messaging 대용량메시지젂송 MTOM, Binary 메시지인코딩 Message Streaming Message Compression Channel SOAP 메시지압축 Windows SDK Sample 참조
.NET Framework 3.5 & VS 2008: What s new in WCF? WCF Web Programming Model REST(Representational State Transfer) 지원 Non-SOAP 메시지송수신 (JSON, XML, Other Binary Stream) HTTP GET/POST/PUT/... 지원 ASP.NET AJAX 에서 WCF 서비스호출가능 WCF Syndication WCF 서비스를통해 RSS 2.0 및 ATOM 1.0 기능제공 Syndication 을위한객체모델제공 SyndicationFeed, SyndicationItem, SyndicationLink, SyndicationPerson, SyndicationCategory, SyndicationContent 등 WCF Support in VS 2008 프로젝트템플릿통합 새로운 UI 의 서비스참조 다양한프록시생성옵션제공
Conclusion Enterprise Communication Infra 기업홖경을위해성능, 안정성, 기능성등다양한요구사항존재 기존통신인프라는각기장단점을가짐 통합된프로그래밍모델과다양한기능을가짂통신인프라필요 Windows Communication Foundation 다양한기업홖경에대처할수있는유연성 단일프로그래밍모델 다양한트랜스포트지원 기능적인풍부함 신뢰할수있는메시징, 트랜잭션, P2P, 보안, 콜백등 성능적인우수함 TCP + 바이너리인코딩 + 압축 + Streaming WCF is... Next Generation Communication Infra in Enterprise Environment
Reference 참고자료 MSDN MSDN Magazine Windows Vista Developer Story 월갂마이크로소프트웨어 2006년 10월호 Inside Developer 칼럼 월갂마이크로소프트웨어 2006년 11월호 Inside Developer 칼럼 월갂마이크로소프트웨어 2006년 12월호 Inside Developer 칼럼 월갂마이크로소프트웨어 2007년 2월호 Inside Developer 칼럼 Windows SDK v6.0 Samples Contact information http://www.simpleisbest.net ksyu33 at theonetech.co.kr ksyu33 at korea.com
http://www.simpleisbest.net