Building Connected Systems: Today and Tomorrow Giuseppe Guerrasio Senior .NET Developer Developer & Platform Division Microsoft 1 Agenda • Service Orientation e Microsoft .NET – Connected System – Smart Client • Web Services Architecture e Technology Roadmap – – – – Fundamental Web Service Enhancements .NET 2.0 Indigo 2 .NET : Connected System .NET è una tecnologia software che consente l’interconnessione di un mondo di informazioni, persone, sistemi e device Windows Server System Pocket PC Visual Studio My Office Services System Partner Products 3 Web Service e Connected System: Da Hardware Connesso a Applicazioni Connesse PC Applications PC Sistemi Operativi astraggono l’ hardware Applications OperatIng System Operating System Hardware Smart Devices Hardware XML Web Services Web Service Astraggono Internet/Intranet Servers 4 SOA dalla prospettiva Microsoft .NET: Connected System • Approccio non limitato ai servizi in quanto tali ma omnicomprensivo – Smart process : orchestratori di processi • Servizi che invocano,aggregano e coordinano altri servizi in modo sincrono od asincrono – Smart Client Application • Rich User Experience, interazione con più servizi, caching intelligente, supporto offline, etc – Smart Device • Smart Phone, chioschi , teller,Portable Media center, etc – Web User Interface • Enterprise Portal, Internet Portal, etc – Sistemi Automatici • Applicazioni senza interfaccia, sistemi di monotoraggio, etc 5 Microsoft .NET Connected System with XML Web service Windows Server System 6 WS-Security WS-Trust WS-Federation Reliability WS-Reliable Messaging Advanced Messaging WS-Transactions WS-Coordination WS-AtomicTransaction WS-Addressing, WS-Eventing Basic Messaging XML Transactions , WS-Policy, WS-Discovery, WS-Metadataexchane Security Advanced Metadata Web Services Architecture SOAP XML, XSD, XPath Transports HTTP 7 Web Services Technology Roadmap • Visual Studio 2005 WS-I Complian ce SDM 8 .NET Connected System Messaging Fundamental • Supporto nell’intera piattaforma – Windows Server System – Office System • Visual Studio e .NET Framework 1.1 – Supporto per SOAP 1.1, XML Schema, XML 1.0, WSDL, UDDI – Service Development • • • • • • • XSD Authoring Mappatura automatica Tipi Generazione Automatica WSDL Ambiente per il Web Hosting Registrazione UDDI Client Side UDDI Discovery e Binding Client Side Proxy Generation – Servizi Aggiuntivi • Server Side: Transazioni,Caching, Handler Asincroni • Client Side: Gestione Asincrona Automatica 9 Web Services Enhancements 2.0 (WSE) • Supportato come add-on per Visual Studio e per il .NET Framework con gli ultimi avanzamenti nelle capacità dei Web service • SOAP Messaging (WS-Addressing) • Web Services Security – Firma digitale e cifratura del messaggio – Supporto per differenti tipi di Token di autenticazione • X509, Custom Binary, Username/Password, Kerberos, and XML Security Token Support – Supporto per WS-Trust e WS-SecureConversation – Roles based authorization con integrazione nativa con la Windows security – Supporto per WS-SecurityPolicy • Message-based programming model – indipendenza dall’ Hosting environment – Supporto per altri meccanismi di trasporto (HTTP, TCP) 10 Quale Tipologia di Client ? Rich User Experience Developer Productivity Responsive Small Footprint Easy Change Management Ease of Deployment 11 Smart Client Architecture Main Form Web Service Service Agent Client Web Service Proxy Web Server 12 Smart Client Technology • .NET Framework (Full & Compact) • Windows Application – Windows Forms • Office Smart Client – Office XML - InfoPath, WordML, ExcelML – SmartTags & SmartDocuments – Visual Studio Tools For Office - Word ed Excel – Information Bridge Framework - Meta-Data Driven Solution • Hybrid – Embedded Browser, Browser Host 13 Elementi Chiave nello Smart client • Gestione della Sicurezza – Caricamento ed Isolamento del codice • Application Domain – Impatto della Code Access Security - Evidence, Permission, Policy • Gestione del deployment – “Push” Technology • AD • SMS – Pull Technology • No-Touch deployment • Application Updater Block • Custom – Sviluppi Futuri : ClickOnce 14 metabase .Net App .Net App .NET application Domain Domain domain ftp, smtp, nntp DLLhost.exe DLLhost.exe Isolated In-proc OOP App Isolated OOP App apps ISAPI filters User mode Kernel mode 15 Administration W3WP.exe Inetinfo.exe WAS metabase ftp, smtp, nntp Configuration manager Isolated W3WP.exe W3WP.exe W3WP.exe Single app Multiple apps Application pool manager Web server ISAPI ext ISAPI ext ISAPI filters ISAPI filters OOP App Isolated W3WP.exe OOP App SingleISAPI Ext app ISAPIISAPI Ext ISAPI extFilters ISAPI Filters ISAPI filters User mode Kernel mode Listener Response cache Sender 16 Connected System e .NET 2.0 • Supporto senza precendenti per lo Smart Client – Tool RAD per lo sviluppo del client pensati per ambienti debolmente connessi – Nuovo modello per la gestione dei dati con ADO.NET 2.0 – Semplificazione del deployment :ClickOnce Deployment – Nuovo modello per lo sviluppo di Smart Client integrati con Office • Nuovo meccanismo per la gestione delle transazioni: System.Transaction • Supporto completo per le nuove funzionalità di SQL Server 2005 – – – – Supporto XML nativo Integrazione con il CLR Supporto per i Web Service Nativo SQL Server Broker Service 17 Connected System e .NET 2.0 • Miglioramenti ed Aggiunte al supporto per i Web Service – Supporto per SOAP 1.2 • Server side controllato via .config • Client side Wsdl.exe supporta entrambi , SoapProtocolVersion come proprietà nel proxy – Supporto automatico per il Basic Profile WS-I – Event-based async programming model • Utilizza XxxAsync per la chiamata e XxxCompleted event • Evento richiamato sul thread chiamante • Sotituisce BeginXxx, EndXxx mantenuti per compatibilità – Nel Proxy generate proprietà invece di fields • Possibile il data binding! 18 Connected System e .NET 2.0 • Miglioramenti ed Aggiunte al supporto per i Web Service – Type sharing tra i proxies • Individua gli schemi equivalenti e genera un unico CLR type – IXMLSerializer esposto nativamente • Possibilità di customizzare con proprio codice la serializzazione • SchemaImporterExtension – Classe astratta che abilita la generazione di custom code quando si importano schemi nel proxy • Supporto automatico della compressione nel Proxy – Disponibile anche client side la compressione oltre che nativamente in II6 19 Enterprise Design Tool • Tool a supporto della Service Oriented Architecture – Rende semplice impostare il progetto, la security, la transazionalità i WS-Standard , etc • Tool a supporto per l’Operation – Disegno è specifiche della logical infrastructure – Verifica dei settings delle applicazioni rispetto alla logica dell’infrastruttura • Inseriti nella Dynamic System Initiative 20 Dynamic System Initiative (DSI) System Definition Model Creare un blueprint live del system Definire un sistema esistente o nuovo Gestire il sistema in base al SDM Job Merc. Stage SQL Operations Capabilities Resources Required Design per le Operational Operation Policies Shuttle Feed Store DSS Cache HTTP FTP Alloca e configura automaticamente risorse e configurazioni SDM Document SERVERS STORAGE NETWORKING 21 Cos’è Indigo Explicit Contracts Ubiquity COM Declarative Behavior Rich Context COM+ Durable Messaging Transactional Messaging MSMQ Deep CLR Integration Architettura Estendibile .NET Remoting Contratti Espliciti XML/Data Orientation ASMX Indigo 22 Indigo Architecture Application Messaging Services Service Model Messaging Hosting Environments 23 Indigo Architecture Dettaglio Application Messaging Services Queuing Routing Eventing Discovery Service Model Instance Manager Context Manager Data Contract Type Integration Declarative Behaviors Transacted Methods Messaging Channels (Datagram, Reliable, Peer, …) Policy Engine Transport Channels (IPC, HTTP, TCP…) Channel Security Message Encoder Hosting Environments ASP.NET Avalon .exe NT Service COM+ 24 Channel Model • Il Canale è il nuovo Socket – Astrae il core I/O in Indigo – SOAP Message-Oriented – Supporta Datagram e Session – Fortemente Estendibile • Svolge, solo una parte della storia – Contratti / Ad alto livello Metadati – Servizi utilizzano l’infrastruttura di messaging 25 La Base per i Canali • IChannel • IOutputChannel – void Send(Message message); • IInputChannel – Message Receive(); • IDuplexChannel : IInputChannel, IOutputChannel • IRequestChannel – Message Request(Message message); • IReplyChannel – IRequestContext ReceiveRequest(); • I*SessionChannel 26 Listener e Factory • IChannelFactory – Creazione Attiva di canali per un Servizio • IChannel CreateChannel<T>(Uri to); – Stackable • IListenerFactory – Legata ad un indirizzo di rete – Converte Network Stream in Messaggi – Content-Based Message Demux per il Listeners • IListener – Creazione di un canale dal Client • IChannel AcceptChannel(); – ~ Ricorda qualcosa ? 27 Connecting e Accepting 1. 2. 3. 4. 5. Service: CreateListener<IInputChannel>(filter, …) Client: CreateChannel<IOutputChannel> Client: IOutputChannel.Send(message) Service: IListener<…>.AcceptChannel() Service: IInputChannel.Receive() IInputChannel IListener … … … IChannelFactory IOutputChannel IListenerFactory IChannelFactory IOutputChannel IListenerFactory 28 Service Runtime Service Dispatcher A CLR type che implementa uno o più ServiceContracts Un meccanismo per effettuare il dispatch del messaggio al metodo Contract Un meccanismo per “marcare” i type per permettere i comportamenti in base ai contratti Binding Un meccanismo per esporre servizi con contratto (via an IListenerFactory) Listener Factory Un I/O device per il listening dei messaggi 29 Hello, World! Service [ServiceBinding(Binding = “Http”, Transport = Transport.Http)] [ServiceBinding(Binding = “Tcp”, Transport = Transport.Tcp)] [ServiceContract] public interface IConsole { [ServiceOperation] void WriteLine(string text); [ServiceOperation] void Write(string text); } public class MyConsole : IConsole { public void WriteLine(string text) { Console.WriteLine(text); } public void Write(string text) { Console.Write(text); } } 30 Hello, World! Client [ServiceContract] public interface IConsole { [ServiceOperation] void WriteLine(string text); [ServiceOperation] void Write(string text); } public static void Main(string args[]) { IConsole console = ProxyFactory.CreateProxy<IConsole> (“http://www.microsoft.com/console”); console.WriteLine(“Hello, World!”); } 31 Indigo Channel Stack IChannelFactory IListenerFactory Notifications Notifications Queues Queues Reliable Messaging Reliable Messaging Security Security Transports Transports Encoder Encoder 32 Riepilogo • La Service Orientation è la base per lo sviluppo di Connected System • La tecnologia .NET permette di utilizzare Connected System basati sugli standard dei Web Services • Approccio completo dal client ai server • NET mette a disposizione da oggi una piattaforma completa per lo sviluppo di sistemi Service Oriented • Roadmap futura compatibile con l’esistente ed in linea con l’evoluzione degli standard collegati ai Web Service 33 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 34 Crescita .NET • Running in più del 60% delle Fortune 100 • Più di 70M di sistemi con .NET Framework • Strong developer ecosystem • ISO standardization • Forrest researh – 56 % dei nuovi progetti in Nord America con .NET • Gartner – Microsoft nel quadrante dei Leader per Applicazioni Enterprise – Microsoft Leader per i Web Service Growth of ASP.NET (Netcraft) 350% 300% 250% 200% 150% 100% 50% 0% Q202 to Q302 Q302 to Q402 Q402 to Q103 Q103 to Q203 35 Web-Services-Enabled Software The Magic Quadrant is copyrighted 2004 by Gartner, Inc. and is reused with permission. Gartner’s permission to print or reference its Magic Quadrant should not be deemed to be an endorsement of any company or product depicted in the quadrant. The Magic Quadrant is Gartner’s opinion and is an analytical representation of a marketplace at and for a specific time period. It measures vendors against Gartner-defined criteria for a marketplace. The positioning of vendors within a Magic Quadrant is based on the complex interplay of many factors. Gartner does not advise enterprises to select only those firms in the Leaders segment. In some situations, firms in the Visionary, Challenger, or Niche Player segments may be the right match for an enterprise's requirements. Well-informed vendor selection decisions should rely on more than a Magic Quadrant. Gartner research is intended to be one of many information sources including other published information and direct analyst interaction. Gartner expressly disclaims all warranties, express or implied of fitness of this research for a particular purpose. 36 Service Oriented Architecture Software vendor for mission-critical applications 40 39 34 35 30 25 19 20 15 12 10 8 7 6 5 5 0 Microsoft IBM Custom Oracle BEA Open Source Sun Altri Mission-Critical Application Survey (Engagement: 220622840 — August 2004) © 2004 Gartner, Inc. and/or its affiliates. 37 Web Service Performance 8 CPU Web Service Host 1486.53 1600.00 1400.00 8 CPU - J2EE 8 CPU 1.1 “It -is.Net believed that the high performance results for .NET are due to the fact1076.95 that Web Services were part of the core .NET framework from the start and not added features on top of an existing framework, as is the case with J2EE. “ 1200.00 1000.00 800.00 513.33 411.87 -Doculabs, April 2003 600.00 400.00 296.25 200.00 0.00 J2EE App Server X Windows 2000 Oracle 9i DB J2EE App Server Y Win 2000 Oracle 9i DB JBOSS RH Linux 8.0 Oracle 9i DB Source: Doculabs Web Service Benchmark, March 2003 .NET 1.1 .NET 1.1 Win 2003 Win 2003 Oracle 9i DB SQL Server 2000 38 Gli Analisti • Giga – Return of the Rich Clients Organizations taking a service-oriented architectural (SOA) approach to application development should standardize on a stand-alone rich client technology since it is best suited to the dynamic consumption of Web Services. 39 Gli Analisti • Giga – How to Decide Between a Browser-Based or Rich Client Recommendations If applications demand any of the following, then choose a rich-client for the user interface: •Intensive data input with immediate validation •Latency sensitive applications •Direct data manipulation (sorting, filtering, etc.) •Real-time animation/visualization •Disconnected operations •Consumption of Web Services 40