什么是云计算云计算概念
2007年3月Google提出
传统计算机技术和网络技术融合的产物
Forester Research观点
一种标准化的IT能力,资源易扩展且虚拟化
通过Internet技术以按需和自助的方式提供服务
云计算的分类按部署方式分:
公有云
私有云
混合云
按服务模式分:
IaaS(Infrastructure as a Service)基础设施作为服务
PaaS(Platform as a Service)平台作为服务
SaaS(Software as a Service)软件作为服务
云计算的特点及优点
云计算的特点:超大规模使用虚拟化技术高可靠性可扩展性通用性按需、自助服务高性价比
云计算的优点集中计算资源,实现自动管理,有利于降低成本提供了可靠、安全的数据中心来存储数据对用户端设备要求低,PC、手机、电视均可接入不同设备间的数据与应用共享无限可能的网络应用
SQL Azure
基础设施层:存储OS
服务管理
平台层:SQL Server实例SQL Server Fabric
管理服务
服务层:数据提供(Provisioning)
账单和计量(Billing and 、Metering)连接路由(Connection Routing)
客户端层:使用了当前客户端上安装的SQL Server的功能
Windows Azure AppFabric
是一个基础架构服务
能被自有软件和云服务使用
AppFabric最常用的一个场景是:Web Role和Worker Role之间的通信
AppFabric最强大的地方在于能够跨平台
Service Bus 和Access Control
开发环境与开发过程
• 按开发类型分
• 按微软云计算平台分开发场景
• Visual Studio
• SQL Express
• Windows Azure Tool
• SDK
开发环境介绍
• 开发
• 配置
• 测试
• 部署
开发、测试和部署过程
开发场景
按开发类型分:
Web 应用程序:传统的 Web 应用程序或交互式应用程序和服务
并行计算:并行大规模计算任务
分析应用程序:数据挖掘、报表、商务智能
按 Windows Azure platform组成分:
Windows Azure Storage:Blob、Queue、Table
Web Role 和Worker Role开发
SQL Azure开发
AppFabric开发
开发环境
VS 2008 SP1以上\VS 2010(推荐)SQL Express 2005以上Windows Azure Tools for Microsoft Visual Studio 1.1
Windows Azure SDK
Windows Azure AppFabric SDK V1.0
Windows Azure Platform Training Kit - June Update
其它(开发人员中心):Java SDK、PHP SDK、Ruby SDK
云应用开发实战
云中的hello world
Web Role与Worker Role的开发
Windows Azure Storage开发
连接SQL Azure
迁移现有SQL Server数据库至SQL Azure
云中的hello world
1. 创建云计算项目
2. 浏览工程
3. 编写WebRoleHelloWorld代码
4. 设置启动项目、起始页
5. 设置服务定义和服务配置文件
6. 编译
7. 设置断点调试
8. 测试通过后部署
Web Role Worker Role开发
1. 创建云计算服务项目
2. 编写Web Role功能
3. 编写Worker Role功能
4. 编译项目,使用Development Fabric模拟真实环境进行调试和运行
Windows Azure Storage-blob1. 创建DemoStoragBlob、BlobWebRole
2. 添加WebRole程序代码
1. 实体
2. ASPX
3. 后台代码
3. 配置应用程序:两种方法
4. 设置调试环境
5. 调试运行
SQL CMD连接SQL Azure
Sqlcmd –U <userlogin@servername> -P <passwords> -S <Fully Qualified
ServerName> -D <database name>
执行示例命令行:sqlcmd -U sqladmin@ unjikh4kim -P pass@word -S
unjikh4kim.database.windows.net -d TestDB
ADO.Net连接SQL Azure
private string GetDbConnection()
{
SqlConnectionStringBuilder connBuilder =
new SqlConnectionStringBuilder();
string server = "unjikh4kim.database.windows.net";
connBuilder.DataSource = server;
connBuilder.InitialCatalog = "TestDB";
connBuilder.Encrypt = true;
connBuilder.TrustServerCertificate = true;
connBuilder.UserID = "sqladmin";
connBuilder.Password = "pass@word";
return connBuilder.ToString();
}
using (SqlConnection conn = new SqlConnection(GetDbConnection()))
迁移SQL Server至 Azure
SQLAzureMW
1. 下载安装
2. 运行SQLAzureMW
3. 连接数据库
4. 选择数据库
5. 选择生成的脚步对象
6. 保存脚本文件
Windows Azure Platform学习资源
官方资源Windows Azure
http://msdn.microsoft.com/en-us/windowsazure/default.aspx微软云计算中文博客
http://blogs.msdn.com/b/azchina/
微软云计算解决方案白皮书Windows Azure Platform
http://msdn.microsoft.com/en-us/library/dd163896.aspx
开发人员中心(英)http://msdn.microsoft.com/en-us/azure/cc994380.aspx
开发人员中心(中)http://msdn.microsoft.com/zh-cn/azure/default.aspx
Windows Azure SDK
http://msdn.microsoft.com/en-us/library/dd179367.aspx
Channel 9上的视频Channel 9: Introducing Windows Azure - Manuvir Das
http://channel9.msdn.com/posts/Charles/Manuvir-Das-Introducing-Windows-Azure/
Channel 9: Windows Azure for Developers - Steve Marx
http://channel9.msdn.com/posts/Charles/Steve-Marx-Windows-Azure-for-Developers/
PDC: Developing and Deploying Your First Windows Azure Service
http://channel9.msdn.com/pdc2008/ES01/
PDC: Windows Azure: Cloud Service Development Best Practices
http://channel9.msdn.com/pdc2008/ES03/
Windows Azure Platform学习资源
WebcastWebcast-云起龙骧系列云时代的Windows Mobile开发系列课程微软技术创新日系列--云中开发,成就未来
书籍Windows Azure Architecture Guide - Part 1 (Microsoft Patterns & Practices)
Windows Azure Platform (Tejaswi Redkar)
Programming Windows Azure (Sriram Krishnan)
Cloud Computing with the Windows Azure Platform (Roger Jennings)
Azure in Action (Chris Hay & Brian Prince)
其它代码库
http://code.msdn.microsoft.com/Project/ProjectDirectory.aspx?TagName=azure
codeplex上的Azure资源http://www.codeplex.com/site/search?TagName=azure