Leveraging Azure with Non-Microsoft Technologies
[PT]
Josh Holmes, UX Architect Evangelist da Microsoft esteve ontem no Campus FCT-UNL (Caparica) a dar uma palestra sobre Windows Azure com PHP, Ruby, Python e MySQL.
Josh Holmes começou com uma introdução ao Cloud Computing e um pequeno comparativo com os tipos de “hosting” mais comuns:
- Servidores “In House” ou “Hosted”
- Todo o IT tem de ser comprado => muito dinheiro => muito tempo
- Necessário projectar a capacidade dos servidores para os momentos de maior “pico”, mesmo quando esses são casos pontuais => má amortização do equipamento
- Cloud Computing
- Não tem custos iniciais e não necessita de tempo de configuração
- (Aqui o Josh deixou uma nota interessante) Cloud Computing não é para substituir os alojamentos “normais”, é só para aplicações empresariais.
A sessão prosseguiu com os tipos de Cloud Computing que existem:
- Private Cloud (On-Premise)
Toda a gestão da Cloud fica a cargo do “nós”
- Infrastructure (IaaS)
Utilização da infraestrutura como um serviço, ou seja, não somos responsáveis por toda a rede mas sim só pelo “nosso pedaço”
- Platform as a Service (PaaS)
Não queremos saber da Infraestrutura, só estamos interessados em tirar partido das potencialidades da plataforma de serviços. (Windows Azure está nesta tipologia)
“Agora que já sei onde se “encontra” o Windows Azure, quero saber onde estão realmente os DataCenters”
- USA
- Quincy, WA
- Chicago, IL
- San Antonio, TX
- Cambridge, MA
- Europa
- Dublin, Irlanda
- Amesterdão, Holanda
- Ásia
A “Nuvem” da Microsoft é o passo seguinte da apresentação:
- Application Services
- Bing
- Windows Live
- Office Live
- Health Vault
- Microsoft Advertising
- Software Services
- Office Online
- Dynamics CRM Online
- Exchange Online
- …
- Platform Services
- Windows Azure
- SQL Azure
- AppFabric
- Live Mesh
- …
E salta um slide com uma mensagem importantissima para quem está a considerar o Cloud Computing:
“Not everything has to or can live in the cloud. Only need the things that benefits on being in the cloud. The core strategy is ‘Hybrid‘, we call that Software+Services“
A virtualização do Windows Azure é apresentada em 4 tipos:
- Small: (1×1.8GHz – 1.76GB memory)
- Medium (2×1.8GHz – 3.5GB memory)
- Large (4×1.8GHz – 8GB memory)
- XLarge (8×1.8GHz – 16GB memory)
Claro que cada um terá o seu valor específico e todas as “taxas” – pedidos, trafego, etc… Assim é aconselhável se fazerem simulações de ROI aqui: http://AzureROI.CloudApp.net – reparem que já está na Cloud
O Windows Azure divide-se em dois “Roles”:
- Web Role
- External Facing
- HTTP/HTTPS endpoints
- Short lived calls
- “Think Web Server”
- Worker Role
- Internal Facing
- TCP/HTTP endpoint
- Long running processes
- “Think Service or Daemon”
Ok, já sabemos o que é o Cloud Computing, como é que a Microsoft se posiciona nesta tecnologia, como se processam as coisas dentro do Azure … é chegada a vez das tecnologias “Non-Microsoft”:
- Running PHP and Ruby on Azure
É possível se ter várias versões de PHP a correr lado a lado, pois basta colocar todos os ficheiros dentro de um package e colocar vários Web Roles (seria um por versão do PHP). Para isto funcionar teremos de colocar o PHP dentro de um WebRole, colocar o Package do PHP Runtime e apontar para o FastCGI.
Em termos de “tools”, temos o “Windows Azure for Eclipse” que irá fazer muito do trabalho pesado por nós; irá criar o Web.config e Web.roleConfig; e as implementações e debug será no Dev Fabric. (tools: http://windowsazure4e.org)
No WorkerRole podemos executar EXEs, logo é possível ter JAVA Tomcat no Windows Azure, MySQL, etc … Para tal bastará arrancar o processo WorkerRole, copiar os EXEs para a pasta e executar o processo. Não se esqueçam de ir monitorizando a saúde do processo…
E se eu quiser utilizar o Cloud Computing como “Storage” ?
O Windows Azure tem vários tipos de “Storage”:
- Blobs -> “storage” de informação não estruturada. Será particionada por vários contentores
- Queues -> “Buffered delivery data storage”
- Tables -> informação tabular ou semi-estruturada. As tabelas conterão entidades e as entidades conterão propriedades (linhas x colunas). As tabelas serão armazenadas em partições, e serão replicadas. A utilizar quando não há necessidade de uma BD relacional, pois é altamente escalável.
- Drives -> vai funcionar como um disco rigido em formato NTFS. Os mapeamentos serão para Blobs (ver acima)
As ferramentas para utilizar “Windows Azure Storage” com PHP poderão ser descarregadas do Codeplex (http://phpazure.codeplex.com)
“Mas eu necessito de uma BaseDados Relacional !! E agora ?”
Para dados relacionais temos o “Windows SQL Azure”, que irá permitir dados relacionais “a la SQL Server”, RDMS, altamente escalável, “strongly typed”, replicado 3x para garantir fiabilidade de dados e com uptime de 99.999%.
Atenção que “SQL Azure” não é uma versão do “SQL Server” na Cloud, há uma série de funcionalidades que não são compatíveis. Para o efeito fica uma lista do que é possível:
- Tables, Indexes e Views
- Stored Procedures
- Triggers
- Constraints
- Temp Tables
Para migrar uma BD, aqui está a ferramenta: http://sqlazuremw.codeplex.com
Para o caso de se querer utilizar MySQL, colocar a correr dentro de um WorkerRole. (ver acima, similar ao PHP).
A ZendFramework já tem suporte para Windows Azure e Azure Storage, e brevemente incluirá também AppFabric (Service Bus e Access Control).
Foi uma boa palestra, com informação muitissimo interessante!!!
Obrigado Josh.
[EN]
Josh Holmes, UX Architect Evangelist for Microsoft was yesterday at the FCT-UNL Campus (Caparica) to present us with a talk about Windows Azure with PHP, Ruby, Python and MySQL.
Josh Holmes started with a brief introdution to Cloud Computing and a small ”face to face” with other usual “hosting“:
- “In House” or “Hosted” Servers
- Must purchase the entire IT => costs money => costs time
- Have to figure out all the IT to face major “spikes”, even when those are from time to time => wast of capacity
- Cloud Computing
- No initial costs e no config time
- (Josh said a nice statement here) Cloud Computing isn’t to compete with Shared Hostings, its only for real enterprise applications.
The talk continued with the different Cloud Computing types:
- Private Cloud (On-Premise)
“We” manage everything
- Infrastructure (IaaS)
Usage of the infrastructure as a Servico, that is, we are not responsible for the entire network but only for our “piece”.
- Platform as a Service (PaaS)
Infrastructure? What infrastructure? We only are responsible to take advantage of the platform as a service. (Windows Azure seats here)
“Now I know where Windows Azure seats, I want to know where are the DataCenters”
- USA
- Quincy, WA
- Chicago, IL
- San Antonio, TX
- Cambridge, MA
- Europe
- Dublin, Ireland
- Amesterdam, Netherland
- Asia
Microsoft “Cloud” is the next step on the talk:
- Application Services
- Bing
- Windows Live
- Office Live
- Health Vault
- Microsoft Advertising
- Software Services
- Office Online
- Dynamics CRM Online
- Exchange Online
- …
- Platform Services
- Windows Azure
- SQL Azure
- AppFabric
- Live Mesh
- …
A slide with an importante statement jumps in:
“Not everything has to or can live in the cloud. Only need the things that benefits on being in the cloud. The core strategy is ‘Hybrid‘, we call that Software+Services“
Windows Azure virtualization is presented in 4 different “tastes”:
- Small: (1×1.8GHz – 1.76GB memory)
- Medium (2×1.8GHz – 3.5GB memory)
- Large (4×1.8GHz – 8GB memory)
- XLarge (8×1.8GHz – 16GB memory)
Of course that every single one has is price, therefore is mandatory to do some ROI simulations: http://AzureROI.CloudApp.net – behold, its a Cloud Appl ;)
Windows Azure has two “Roles”:
- Web Role
- External Facing
- HTTP/HTTPS endpoints
- Short lived calls
- “Think Web Server”
- Worker Role
- Internal Facing
- TCP/HTTP endpoint
- Long running processes
- “Think Service or Daemon”
Ok, Cloud Computing – check; whats Microsoft vision – check; who things work inside Azure – check … its time for some “Non-Microsoft” Technologias:
- Running PHP and Ruby on Azure
Its possible to have different PHP versions running side-by-side, just needs to have the right packages inside different WebRoles. So, WebRole running, PHP Runtime Package inside of it and pointing to FastCGI.
We have “Windows Azure for Eclipse” that will do all the major heavy leafting; generate Web.config and Web.roleConfig; and all implementations and debugging will be at Dev Fabric. (tools: http://windowsazure4e.org)
Inside WorkerRole we may run EXEs file, therefore its possible to have JAVA Tomcat or MySQL on Windows Azure … Don’t forget to monitorize your process health…
And if I want to use Cloud Computing as “Storage” ?
Windows Azure has different kinds of ”Storage”:
- Blobs -> “storage” for non-structured data. Will be partitionated by Containers
- Queues -> “Buffered delivery data storage”
- Tables -> Tabular or semi-structured data. Tables contains Entities and Entities contains Properties (rows x columns). Tables will be stored in partitions e will be replicated.It’s massively scalable. Use it when there’s no need for a Relational DB.
- Drives -> will work as a NTFS hard-drive. It will map back to Blobs (see above)
The necessary tools for ”Windows Azure Storage” with PHP may be download at Codeplex (http://phpazure.codeplex.com)
“But I need a Relational BD !! Now what ?”
For relational data we have ”Windows SQL Azure”, that will work similarly to a ”a la SQL Server” DB; RDMS, massively scalable, “strongly typed”, replicated 3x for high reliability and with an uptime of 99.999%.
Note that ”SQL Azure” isn’t an ”SQL Server” version for Cloud; there are a bunch of features that will not work. Here it goes a shortlist of the possible features:
- Tables, Indexes and Views
- Stored Procedures
- Triggers
- Constraints
- Temp Tables
DB migration, use this tool: http://sqlazuremw.codeplex.com
For MySQL, will work inside a WorkerRole. (see above, similar to PHP).
ZendFramework has now support for Windows Azure and Azure Storage, and soon also have AppFabric (Service Bus and Access Control).
It was a nice talk, with a lot of valuable information!!!
Thanks Josh.
