APPs modernas e Back-End na Nuvem com Microsoft Azure
1. APPs modernas e Back-End na
Nuvem com Microsoft Azure
Vitor César [Meriat]
Cloud Specialist - Software Development Engineer
@vitormeriat
vitormeriat.com.br
2. 1. Conhecendo as necessidades atuais
2. Analisando um modelo tradicional
3. O que são aplicações modernas?
4. O que o Microsoft Azure pode fazer por
você?
6. Internet e a Internet das coisas
Internet
of
things Invisibledevices
Trillions of
networkednodes
Lowbandwidthlast-
mileconnection
100kBit/sec
Mostlyaddressed
bylocal schemes
Machine-centric Sensing-focus
Trillions of
computer-
enabled devices
which are part of
the IoT
Globaladdressing User-centric
Communication-
focus
Internet
Laptops /tablets /
smartphones
Billionsof
networkeddevices
High-bandwidth
access
Cable: 10Mbs+
Fiber: 50-100Mbs
6+billion people
1.5 billion use net
US: 4.3 devices
per adult
14. Padrões de Uso
Uso
Computação
Tempo
Uso
Inatividade
• Cargas On/Off (ex.:. Job batch)
• Desperdício da capacidade provisionada
• Time to market pode ser retardado
Computação
Tempo
Uso
• Pico de demanda inesperada
• Desempenho comprometido pelo pico
• Difícil provisionar nos casos extremos
Uso
Computação
Tempo
• Serviços que precisam crescer e escalar
• Crescer é um desafio grande na TI
• Deployment complexo
Computação
Tempo
Uso
• Serviços c/ micro sazonalidades
• Picos devido a demandas periódicas
• Complexidade da TI + desperdício
20. MOBILE
Connect from Anywhere
Rapidly Growing Market
Limited Storage
Limited Compute
Limitless Compute
Limitless Storage
Services via the internet (APIs)
Scale and Elasticity
CLOUD
23. Execution Models
One of the most basic things a cloud platform does is execute applications. Windows Azure
provides three options for doing this:
24. Affinity Groups
Closely locate your
compute, network and storage
resources in the same datacenter
Get better performance
Get lower latency
Reduce egress costs
28. Push Notifications
Insert, Update, Delete, Read on a Table
Automatic or Manual Server Script
An Event
Script Runs in the Azure Mobile Service
Windows
Phone 8
iOS AndroidWindows 8
29. Client SDK Simplifies This
Mobile Services Data WORKFLOW
Insert script
Update script
Delete script
Read script
Node.JS Scripts
Some JSON Object
{ FirstName=“…”, LastName=“…” }
RESToverHTTP
30. Virtual Network
• Logical isolation with control over the network
• Create subnets; use your private IP addresses
• Stable and persistent private IP addresses
• DNS options – BYO or Windows Azure-provided
• Extend your trust boundary – Virtual Machines and Cloud Services on the same
Network
Virtual Network
subnetX subnetY subnetZ DNS
Server
31. Virtual Network with Hybrid Connectivity
• Extend your infrastructure
• Networking on-ramp for migrating apps and
services
• Your “virtual” branch office / datacenter in
the cloud
• Run “hybrid” apps that span the cloud and
on-premises
• Secure private networks fully contained
• in Windows Azure
Virtual Network
WFE App SQL DC/DNS
// Overview for TDM (Briefly features introduction) PAAS/IAAS – Part 1Acreditoque a maioria de vocêsjáestejamfamiliarizados com essaterminologias, mas voureforçar, issovaiser fundamental para quevocÊstambémentendamqual é o diferencial Microsoft, Nossomos a unicaempresaqueentregaessestrêsmodelos. E lógica, pravcsentenderamquaistipos de ofertasvcspodemofereceraosseus clients.Esta é a taxonomia mais comumente utilizado para a diferenciação entre os tipos de serviços em nuvem.A Mercado definiu três categorias de serviços:IaaS - um conjunto de capacidades de nível de infra-estruturas tais como um sistema operacional, conectividade de rede, etc, que são entregues como pagamento para serviços de uso e pode ser usado para hospedar aplicações.PaaS - conjuntos de nível superior de funcionalidade que são entregues como serviços consumíveis para desenvolvedores que são aplicações de construção. PaaS é de cerca de abstrair os desenvolvedores da infra-estrutura básica para permitir que aplicativos rapidamente ser composto.SaaS - aplicativos que são entregues através de um modelo de prestação de serviços, onde as organizações podem simplesmente consumir e usar o aplicativo. Tipicamente, uma organização que pagar pelo uso do aplicativo ou o aplicativo pode ser rentabilizado através de receita publicitária.É importante notar que estes três tipos de serviços pode existir, independentemente um do outro, ou combinados um com o outro.-------------------------------There is a lot of confusion in the industry when it comes to the cloud. It’s important that you understand both what is happening in the industry and how we think about the cloud. This is the most commonly used taxonomy for differentiating between types of cloud services.The industry has defined three categories of services:IaaS – a set of infrastructure level capabilities such as an operating system, network connectivity, etc. that are delivered as pay for use services and can be used to host applications. PaaS – higher level sets of functionality that are delivered as consumable services for developers who are building applications. PaaS is about abstracting developers from the underlying infrastructure to enable applications to quickly be composed. SaaS – applications that are delivered using a service delivery model where organizations can simply consume and use the application. Typically an organization would pay for the use of the application or the application could be monetized through ad revenue. It is important to note that these 3 types of services may exist independently of one another or combined with one another. SaaS offerings needn’t be developed upon PaaS offerings although solutions built on PaaS offerings are often delivered as SaaS. PaaS offerings also needn’t expose IaaS and there’s more to PaaS than just running platforms on IaaS. Slide Objectives:Explain the three established terms in the industry for cloud servicesSpeaking Points:With this in mind, it’s important to understand how to talk about our Cloud Services offerings.There is a lot of confusion in the industry when it comes to the cloud. It’s important that you understand both what is happening in the industry and how we think about the cloud. This is the most commonly used taxonomy for differentiating between types of cloud services.The industry has defined three categories of services:IaaS – a set of infrastructure level capabilities such as an operating system, network connectivity, etc. that are delivered as pay for use services and can be used to host applications. PaaS – higher level sets of functionality that are delivered as consumable services for developers who are building applications. PaaS is about abstracting developers from the underlying infrastructure to enable applications to quickly be composed. SaaS – applications that are delivered using a service delivery model where organizations can simply consume and use the application. Typically an organization would pay for the use of the application or the application could be monetized through ad revenue. It is important to note that these 3 types of services may exist independently of one another or combined with one another. SaaS offerings needn’t be developed upon PaaS offerings although solutions built on PaaS offerings are often delivered as SaaS. PaaS offerings also needn’t expose IaaS and there’s more to PaaS than just running platforms on IaaS.
PTMáquinas VirtuaisPara criar uma máquina virtual que é especificado para uso e tamanho da máquina virtual VHD. Então você paga por cada hora que está executando a máquina virtual. O Windows Azure Virtual Machines oferece uma galeria de discos rígidos virtuais padrão. Estes incluem opções fornecidas pela Microsoft, como o Windows Server 2008 R2, Windows Server 2012 e Windows Server 2008 R2 com o SQL Server, juntamente com imagens de Linux parceiros Microsoft.websitesWebsites Windows Azure fornece o ambiente web gerenciados usando o Internet Information Services (IIS). Você pode mover um site IIS no Windows Azure, sem mudanças, ou criar um novo diretamente na nuvem. Uma vez em um site, você pode adicionar ou remover instâncias dinamicamente. Ele também oferece ambos compartilhavam uma opção onde o seu site está sendo executado em uma máquina virtual com outros sites e através de sua própria VM.Os sites do Windows Azure deve ser útil para os desenvolvedores e agências de web design. Para o desenvolvimento, apoia Node.js, junto com banco de dados SQL (de ClearDB, parceira Microsoft). NET e PHP MySQL armazenamento relacional. Ele também fornece suporte embutido para muitas aplicações populares, como WordPress, Joomla e Drupal. O objetivo é fornecer uma plataforma de baixo custo, escaláveis e amplamente útil para a criação de sites e aplicações web na nuvem pública.Cloud ServicesEsta tecnologia é projetada especificamente para suportar os custos administrativos escaláveis, confiáveis e de baixo e é um exemplo do que é comumente chamado de Platform as a Service (PaaS). Para usá-lo, você cria um aplicativo que usa a tecnologia que você escolher, como C #, Java, PHP, Python, Node.js ou outra língua. O código é então executado em máquinas virtuais (chamados de instâncias) rodando em uma versão do Windows Server.// Notas del orador //Máquinas virtualesPara crear una máquina virtual, se especifica que VHD para uso y tamaño de la máquina virtual. Entonces usted paga por cada hora que está ejecutando la máquina virtual. Las máquinas virtuales de Windows Azure ofrece una galería de discos duros virtuales estándar. Estos incluyen opciones proporcionados por Microsoft, como Windows Server 2008 R2, Windows Server 2012 y Windows Server 2008 R2 con SQL Server, junto con imágenes de Linux de socios de Microsoft. Sitios webLossitios web de Windows Azureofrece un entorno web administrado utilizando Internet Information Services (IIS). Puede mover un sitio web IIS en Windows Azure sin cambios, o puede crear uno nuevo directamente en la nube. Una vez en un sitio web, puede añadir o quitar instancias dinámicamente. También ofrece tanto una opción compartida, donde su sitio web se ejecuta en una máquina virtual con otros sitios y a través de su propia VM. Los sitios web de Windows Azure pretende ser útil para los desarrolladores y agencias de diseño web. Para el desarrollo, apoya Node.js, junto con la base de datos SQL y (de ClearDB, un socio de Microsoft), .NET y PHP MySQL para el almacenamiento relacional. También proporciona compatibilidad integrada para varias aplicaciones populares, como WordPress, Joomla y Drupal. El objetivo es proporcionar una plataforma de bajo costo, escalable y ampliamente útil para crear sitios web y aplicaciones web en la nube pública.Servicios en la nubeEsta tecnología está diseñada expresamente para soportar aplicaciones escalables, confiables, y de bajo costoadministrativo y es un ejemplo de lo que comúnmente se denomina como plataforma como servicio (PaaS). Para usarlo, se crea una aplicación que utiliza la tecnología que usted elija, como C#, Java, PHP, Python, Node.js u otro lenguaje. El código entonces se ejecuta en máquinas virtuales (denominadas instancias) ejecutándose en una versión de Windows Server.<NEXT>###########################################Virtual MachinesThe ability to create a virtual machine on demand, whether from a standard image or from one you supply, can be very useful. Add the ability to pay for this VM by the hour, and it's even more useful. This approach, commonly known as Infrastructure as a Service (IaaS), is what Windows Azure Virtual Machines provides. To create a VM, you specify which VHD to use and the VM's size. You then pay for each hour the VM is running. As Figure 2 shows, Windows Azure Virtual Machines offers a gallery of standard VHDs. These include Microsoft-provided options, such as Windows Server 2008 R2, Windows Server 2012, and Windows Server 2008 R2 with SQL Server, along with Linux images provided by Microsoft partners. You're free to upload and create VMs from your own VHDs as well.Wherever the image comes from, you can persistently store any changes made while a VM is running. The next time you create a VM from that VHD, things pick up where you left off. It's also possible to copy the changed VHD out of Windows Azure, then run it locally.Windows Azure VMs can be used in many different ways. You might use them to create an inexpensive development and test platform that you can shut down when you've finished using it. You might also create and run applications that use whatever languages and libraries you like. Those applications can use any of the data management options that Windows Azure provides, and you can also choose to use SQL Server or another DBMS running in one or more virtual machines. Another option is to use Windows Azure VMs as an extension of your on-premises datacenter, running SharePoint or other applications. To support this, it's possible to create Windows domains in the cloud by running Active Directory in Windows Azure VMs. This quite general approach to cloud computing can be used to address many different problems. What you do is up to you.Web SitesOne of the most common things that people do in the cloud is run web sites and web applications. Windows Azure Virtual Machines allows this, but it still leaves you with the responsibility of administering one or more VMs. What if you just want a web site where somebody else takes care of the administrative work for you?This is exactly what Windows Azure Web Sites provides. This execution model offers a managed web environment using Internet Information Services (IIS). You can move an existing IIS web site into Windows Azure Web Sites unchanged, or you can create a new one directly in the cloud. Once a web site is running, you can add or remove instances dynamically, relying on Web Sites to load balance requests across them. And as Figure 2 shows, Windows Azure Web Sites offers both a shared option, where your web site runs in a virtual machine with other sites, and a way for a site to run in its own VM. Windows Azure Web Sites is intended to be useful for both developers and web design agencies. For development, it supports .NET, PHP, and Node.js, along with SQL Database and (from ClearDB, a Microsoft partner) MySQL for relational storage. It also provides built-in support for several popular applications, including WordPress, Joomla, and Drupal. The goal is to provide a low-cost, scalable, and broadly useful platform for creating web sites and web applications in the public cloud.Cloud ServicesWindows Azure Web Sites allows creating this kind of web application, but there are some constraints. You don't have administrative access, for example, which means that you can't install arbitrary software. Windows Azure Virtual Machines gives you lots of flexibility, including administrative access, and you certainly can use it to build a very scalable application, but you'll have to handle many aspects of reliability and administration yourself. What you'd like is an option that gives you the control you need but also handles most of the work required for reliability and administration.This technology is designed expressly to support scalable, reliable, and low-admin applications, and it's an example of what's commonly called Platform as a Service (PaaS). To use it, you create an application using the technology you choose, such as C#, Java, PHP, Python, Node.js, or something else. Your code then executes in virtual machines (referred to as instances) running a version of Windows Server. But these VMs are distinct from the ones you create with Windows Azure Virtual Machines. For one thing, Windows Azure itself manages them, doing things like installing operating system patches and automatically rolling out new patched images. (This implies that your application shouldn't maintain state in web or worker role instances; it should instead be kept in one of the Windows Azure data management options described in the next section.) Windows Azure also monitors the VMs, restarting any that fail. As Figure 2 shows, you have two roles to choose from when you create an instance, both based on Windows Server. The main difference between the two is that an instance of a web role runs IIS, while an instance of a worker role does not. Both are managed in the same way, however, and it's common for an application to use both. For example, a web role instance might accept requests from users, then pass them to a worker role instance for processing. To scale your application up or down, you can request that Windows Azure create more instances of either role or shut down existing instances. And just like Windows Azure Virtual Machines, you're charged by the hour for each web or worker role instance. Each of the three Windows Azure execution models has its own role to play. Windows Azure Virtual Machines provides a general-purpose computing environment, Windows Azure Web Sites offers low-cost web hosting, and Windows Azure Cloud Services is the best choice for creating scalable, reliable applications with low administration costs. And as mentioned earlier, you can use these technologies separately or combine them as needed to create the right foundation for your application. The approach you choose depends on what problems you're trying to solve.
Affinity Groups is a key concept in building highly available and performant applications in Windows Azure.This is nothing more than a way to logically group compute (Virtual Machines), Virtual Network and Storage. Affinity Group: Select an affinity group instead of a region if you want your storage services to be in the same data center with other Windows Azure services that you are using.Basically Affinity Groups is a way to tell Windows Azure that those elements, compute, virtual network and Storage, should always be together and close to one another in the same datacenter, in the same rack, same container so on. Windows Azure will then place those as closely as possible, reducing the latency, and increasing performance. In summary, Affinity Groups provide you:Aggregation: Brings Virtual Machines, Virtual Networkand Storage services closely together. Reducing latency:For instance, you get better latency when accessing storage from the compute Nodes, which makes difference in a highly available environment. Lowering costs:Eliminates cost of traffic between different data centers when compute instances need to communicate with each other.