Cloud Computing: Windows Azure 2de Junio de 2011, 18:00-21:00 Dr. Diego Lz. de Ipiña Glz. de Artaza [email protected] http://paginaspersonales.deusto.es/dipina http://www.slideshare.net/dipina http://www.morelab.deusto.es
Agenda Windows Azure Introducción Windows Azure Computing Windows Azure Store SQL Azure Ejemplos
Microsoft Windows Azure Windows Azure y SQL Azure permiten construir, alojar y escalar aplicaciones en los centros de datos de Microsfot . Como toda solución para Cloud Computing sólo pagas por los recursos que usas Es un sistema operativo en la nube Centros de datos distribuidos por el planeta
Microsoft’s Windows Azure Platform Windows Azure es un servicio utilizado para ejecutar aplicaciones y guardar datos en máquinas de Microsoft accesibles vía Internet Proporciona tres componentes: El servicio Compute ejecuta aplicaciones con web role y worker role El servicio Storage permite guarda datos como blobs, tables y queues El Windows Azure Fabric proporciona una API para gestionar y monitorizar aplicaciones que usan la plataforma Azure Más información en: http://www.microsoft.com/windowsazure
Windows Azure por Dentro Storage Unstructured Data Blobs Message Queues Distributed Filesystem Content Distribution Data Transact-SQL Data Synchronization Relational Database ADO.NET, ODBC, PHP Connectivity Composite Applications On-Premise Bridging Service Bus Security Claims-Based Identity Federated Identities Secure Token Service Declarative Policies Application Services Application Marketplace Information Marketplace Personal Data Repository Frameworks Workflow Hosting Distributed Cache Services Hosting Compute C / C++ Win32 VHD
Windows Azure por Dentro Compute Storage Data SQL Azure Data Sync Connectivity Project “Sydney” Security “Geneva” Application Services Frameworks “Dublin” “Velocity” Service Bus Access Control Table Storage Blob Storage Queue D rive Content Delivery Network
Windows Azure Cloud Fabric Multiple virtual instances Easy provision of applications Detect failures Spin up new instances to replace the failed ones How many instances and what role they will play Load balances and DNS Elasticity of the service… scaling up/down number of instance
Windows Azure Compute Development, service hosting, & management environment .NET, Java PHP, Python, Ruby, native code (C/C++, Win32, etc.) ASP.NET providers, FastCGI , memcached , MySQL , Tomcat Full-trust – supports standard languages and APIs Secure certificate store Management API’s, and logging and diagnostics systems Multiple roles – Web, Worker, Virtual Machine (VHD) Multiple VM sizes 1.6 GHz CPU x64, 1.75GB RAM, 100Mbps network, 250GB volatile storage Small (1X), Medium (2X), Large (4X), X-Large (8X) In-place rolling upgrades, organized by upgrade domains Walk each upgrade domain one at a time
Windows Azure Roles
Windows Azure Storage Rich data abstractions – tables, blobs, queues, drives, CDN Capacity (100TB), throughput (100MB/sec), transactions (1K req /sec) High accessibility Supports geo-location Language & platform agnostic REST APIs URL: http://<account>.<store>.core.windows.net Client libraries for .NET, Java, PHP, etc. High durability – data is replicated 3 times within a cluster, and (Feb 2010) across datacenters High scalability – data is automatically partitioned and load balanced across servers
Almacenamiento Blobs – Large Data Store Queues – Background work processing Tables – Very Fast / Scalable Storage Drives – NTFS Formatted Page Blobs SQL Azure – Relational SQL in the Cloud
Windows Azure Roles Web Role for web application programming in ASP.NET or PHP single HTTP endpoint and a single HTTPS endpoint for external clients Worker Role for performing work on behalf of the web role may be written in .NET, Ruby, Java to improve scalability by increasing parallelism and asynchronicity used for background work internal endpoints for HTTP, TCP may receive work from Windows Azure Storage Queues
Interacción con el Resto de Azure Web and Worker Roles can make outbound HTTP/S or .NET Framework class library socket connections to Internet accessible resources can access Windows Azure Storage services via REST APIs or the Windows Azure Storage Client Library
Windows Azure Data Storage – Tables provides scalable, available, and durable structured (or semi-structured) storage in the form of tables. contain entities, and the entities contain properties. are scalable to billions of entities and terabytes of data, and may be partitioned across thousands of servers. support ACID transactions over single entities and rich queries over the entire table. Simple and familiar .NET and REST programming interfaces are provided via ADO.NET Data Services. http://go.microsoft.com/fwlink/?LinkId=153401
Windows Azure Data Storage – Tables : Conceptos Table – contains a set of entities. Entity (Row) – Entities are the basic data items stored in a table. Property (Column) – This represents a single value in an entity. PartitionKey – The first key property of every table. The system uses this key to automatically distribute the table’s entities over many storage nodes. RowKey – A second key property for the table. This is the unique ID of the entity within the partition it belongs to. Timestamp – Every entity has a version maintained by the system. Partition – A set of entities in a table with the same partition key value. Sort Order – There is a single index provided for the CTP, where all entities in a table are sorted by PartitionKey and then RowKey
Table Storage Concepts Entities Tables Accounts moviesonline Users Movies Email =… Name = … Email =… Name = … Genre =… Title = … Genre =… Title = …
Queue Storage Concepts Messages Queues Accounts sally thumbnailjobs traverselinks 128 x 128 http://... 256 x 256 http://... http://... http://...
Blob Storage Concepts Blocks or Pages Blob Container Account sally images PIC01. JPG PIC02. JPG movies MOV1.AVI Block or Page 1 Block or Page 2 Block or Page 3
SQL Azure Highly available, scalable, and consistent distributed relational database; geo-replication and geo-location of data Relational database, provided as a service Highly symmetrical development and tooling experience (use TDS protocol and T-SQL) Highly scaled out, on commodity hardware Built on the SQL Server technology foundation Editions: Web (1GB), Business (10GB)
SQL Azure vs. Windows Azure Tables SQL Azure Tables : Fully structured Strongly typed Relational (RDMS) Highly scalable Windows Azure Tables: Semi-structured Loosely typed Non-Relational (Not RDMS) Massively scalable
Probando Windows Azure Free trial en: http://www.microsoft.com/windowsazure/free-trial/ El proceso de logeo requiere introducir número de tarjeta de crédito Se requiere un login de Windows Live válido
Windows Azure Dev Fabric Local Developer Simulation of AppFabric Simulated “Cloud Experience” for Development Routes cloud requests to local machine Simulates data storage with local SQL server database Azure SQL simulated with local SQL Server database Compute Storage Management Management Relational data Connectivity Access control
Herramientas para Desarrollo Leverage Existing Skills in .NET, SQL Server, WCF Use Familiar tools – Visual Studio, SSMS RESTful HTTP cloud services, supports PHP, Python Cloud apps can be developed locally / offline SDK Cloud Simulator – Dev Fabric, Dev Storage Descargarse Windows Azure SDK http://www.microsoft.com/downloads/en/details.aspx?familyid=7a1089b6-4050-4307-86c4-9dadaa5ed018
Windows Azure SDK Se descarga de: http://www.microsoft.com/windowsazure/sdk/ Dos opciones: All -In- One installation Se integra con Visual Studio Standalone Windows Azure SDK Mejor porque no requiere Windows Visual Studio Existen SDKs para otros lenguajes como Java, PHP o Ruby
Características del SDK C# and VB Visual Studio project templates Windows Azure Cloud Service solution with multiple roles. Tools to manage and configure roles Local Development Fabric Local Development Storage services Local Cloud Service debugging support Cloud Service package and deployment builder
Tutorial de Cómo Usar Windows Azure Documentación en: http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_IntroToWindowsAzureLabVS2010 Explores the basic elements of a Windows Azure service by creating a simple GuestBook application that demonstrates many features of the Windows Azure platform, including web and worker roles, blob storage, table storage, and queues Windows Azure Management Portal https://windows.azure.com / Cloud Samples : http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2853c3dc-0586-49c7-9b7f-83d3083252c8&displaylang=en
Comparativa AWS, GAE y Azure AWS es IaaS pero cada vez con más características de PaaS GAE y Azure son PaaS que permiten la creación de aplicaciones (GAE sólo web) en la infraestructura Cloud de Google y Microsoft, respectivamente AWS te permite usar tus herramientas favoritas, aunque recomienda su uso de servicios escalables de almacenamiento, bases de datos o mensajes a través de interfaces REST GAE es muy sencillo pero exige el uso de las APIs exclusivas provistas por Google, aunque están basadas en estándares de facto de la industria Azure no limita el uso de .NET para las aplicaciones desplegadas aunque lo promociona Comparativa detallada en: http://blog.kitetail.com/wp-content/uploads/2010/03/Comparison-CloudOffering.pdf
Patrones de Diseño en Cloud Computing Fuente: http://architects.dzone.com/news/cloud-computing-patterns Usar la nube para el escalado Usar en cada momento sólo los recursos necesarios Dos mecanismos: Passive listener model Active worker model Compartir la nube entre varios usuarios
Patrones de Diseño en Cloud Computing Usar la nube para batch processing Usar la nube para almacenamiento Usar la nube para comunicación
Ventajas de Cloud Computing Ahorros de costes en IT empresariales Ordenadores de bajo coste para los usuarios Costes más bajos en infraestructura IT Costes de software más bajos Mejora del rendimiento global Elasticidad para conseguir una escalabilidad superior Menos problemas en mantenimiento Actualizaciones inmediatas de software Capacidad de almacenamiento ilimitada Incremento de la seguridad de los datos (safety)
Desventajas de Cloud Computing Requiere una conexión a Internet continua y rápida Puede ofrecer bastante latencia Características disponibles todavía limitadas Falta de confianza Los datos guardados pueden ser accedidos por otros Nuestros datos ya no están en la empresa Problemas legales (LODP): Safe Harbor Dependencia tecnológica en otras compañías ajenas Si la nube pierde los datos, ¡estás perdido!
Conclusiones Cloud Computing nos ofrece un nuevo paradigma para alojar nuestros sistemas de información, aplicaciones y datos en la nube de Internet Son muchas las ventajas potenciales de este enfoque Ahorro de costes, pago por uso Escalabilidad exponencial PERO también muchos los riesgos para su implantación global inmediata Falta de control sobre nuestros datos y sistemas Relativa baja madurez de los productos que hacen posible Cloud Computing Ahora están surgiendo las herramientas y plataformas, pero tenemos que trabajar en patrones de diseño para asegurarnos buenas prácticas en Cloud Computing El futuro inmediato de los sistemas de información empresarial combinará los enfoques tradicionales, donde los sistemas y datos se ejecutan en infraestructura propia, con un paulatino e incremental despliegue de datos y aplicaciones a la nube.
Referencias Windows Azure Platform http://www.microsoft.com/windowsazure/ Windows Azure SDK http://www.microsoft.com/windowsazure/getstarted/#wa Windows Azure Introduction http:// www.slideshare.net/lynnlangit/windows-azure-introduction-3337040 http:// www.slideshare.net/lynnlangit/windows-azure-platform-2626957 Introducing the Azure Platform http://davidchappellopinari.blogspot.com/2008/10/introducing-azure-services-platform.html
Cloud Computing: Microsoft Windows Azure 2de Junio de 2011, 18:00-21:00 Dr. Diego Lz. de Ipiña Glz. de Artaza [email protected] http://paginaspersonales.deusto.es/dipina http://www.slideshare.net/dipina http://www.morelab.deusto.es