[VS2010] Visual Studio 2010 and Windows Azure: to prepare papers (3) - Recognition Development Fabric and Development Storage

[VS2010] Visual Studio 2010 and Windows Azure to prepare papers (3): Recognizing Development Fabric and Development Storage


Whether using Visual Studio Tools for Windows Azure, or directly install Windows Azure SDK, you can find two strange things in the computer, one is the Development Fabric, is a Development Storage, which is used as a simulation of two Windows Azure actual operating environment of the service program, the development of Windows Azure applications on the machine, to debug can not do without it, or have to run Windows Azure website and then upload test, which was very tiring, and the debugger if poor performance across the network will be large, there is a local end simulation tools for developers a lot easier, save at least at the time the test is no more than too much.

Development Fabric function is to simulate the deployment, execution, and practice in the program recording and diagnosis (Logging and Diagnostics) function, Development Fabric itself is a Windows Azure native version of Fabric (Windows Azure execution agent cloud in), the above equipped with the Windows Azure Guest OS, an operating system environment that is the actual implementation of the program, in Windows Azure SDK 1.1 (the version in February), the settings can be set by means of the service configuration file (service configuration File) application the new version of the program which you want to use a Windows Guest OS version, of course, the default is to use the latest version, development Fabric allows developers to use a different set of Windows Guest OS, but this feature only applies to legacy application development SDK, or appropriate to the latest Windows Guest OS.

Development Fabric in Visual Studio launch cloud applications, it is a service running in the background, it will only display an icon on the task bar:

image

If the special display its user interface, will have to be selected by the pop-up menu shown in the [Show Development Fabric UI]:

image

After selecting, Development Fabric of the user interface will appear:

image

The user interface can do are:

1. Monitoring the status of implementation of the application.

2. If the application output Log records, you can see here, it would be helpful to the application or WCF Service Worker Role type.

3. Testing Service to stop the reaction when starting with (OnStart () and OnEnd () event handler handling response).

前面也已经说到,Development Fabric 是一个模拟的环境,就像是 ASP.NET Development Server 之于 IIS 一样,它和正式的 Windows Azure 环境会有部分差异,有些差异则是开发人员必须要注意的:

1. 调试器不能挂到正式的 Windows Azure 环境,任何调试用的消息都要用 log 来输出。
2. Development Fabric 中运行的 Windows Azure 应用程序可以存取本机的系统资讯,如 GAC/Registry/Machine Configuration 与本机系统资源等等,但这些东西在正式的 Windows Azure 环境中没有。
3. Development Fabric 可以直接将记录资讯输出到 UI 中,如同使用 Windows Azure Diagnostics 抓取的一样,但在正式的 Windows Azure 环境中,只能用 Windows Azure Diagnostics API 将消息存到 Table Storage。
4. 在正式的 Windows Azure 环境中,开发人员可以利用服务组态档在不重新部署应用程序的情况下设定执行的 role instance 数量,但在 Development Fabric 中这个功能不支持,只能重新部署。
5. Development Fabric 无法完全模拟 Windows Azure Load Balancer (负载平衡器) 的所有行为。

另外一个模拟环境是 Development Storage,它则是模拟在云端中的 Windows Azure Storage Services,包括 BLOB, Table 以及 Queue Service 都由它来模拟,因此它会需要一个保存的地方。依照默认,Development Storage 会存取本机的 SQL Server Express  (./SQLEXPRESS) 以建立一个它专属的数据库,因此若电脑中没有安装 SQL Server Express,在启动 Development Storage Service 时会出现下列的消息:

image

那么如果本机上有 SQL Server 但不是 SQL Server Express 怎么办?不用担心,Windows Azure SDK 有提供一个工具:DSInit.exe (Development Storage Initialization Tool,这个工具存放在 %PROGRAM_FILES%Windows Azure SDKv1.1bindevstore 目录中,你也可以由 Windows Azure SDK 所建立的 “Windows Azure SDK Command Prompt” 来执行它),它可以允许开发人员自行设定 Development Storage 要使用的 SQL Server 执行个体,因此如果要设定 SQL Server 的默认执行个体,可以下这样的命令:

dsinit /sqlinstance:.

这样 DSInit 就会连结到 SQL Server 默认的执行个体,而看到的消息就是这样:

image

此时就可以由 SQL Server Management Studio 来看由 Development Storage 所建立的数据库,名称是固定的 DevelopmentStorage20090919,表格配置则是:

image

它也安装了一些辅助的预存进程以及函数:

image

有了 Development Storage 服务,开发人员也才能在本机使用 Microsoft.WindowsAzure.StorageClient 来开发应用 Windows Azure Storage 的应用程序。而 Development Storage 本身也有一个使用者界面,用来设定要执行哪些 Storage Service:

image

Development Storage 所开放的 Storage Service 终端点,都是以本机 URL 用不同的 Port 所切分,和 Windows Azure Storage 实际开放的 URL 是不一样的,开发人员在利用本机发展完应用程序后要记得做转换 URL 的动作,否则在云端上会失效。另外,Development Storage 本身有提供一个存取的 Key:

Account name: devstoreaccount1
Account key: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==

以模拟实际在 Windows Azure Storage 存取服务时要提供 Account name 以及 Account key 一样,这也是开发人员需要在部署到云端前要做的更换工作。

Development Storage 与 Windows Azure Storage 的差异有:

1. Development Storage 和正式的 Windows Azure Storage 的服务 URL 不相同,正式的 Windows Azure Storage 的 URL 是:

 
 
  
  ://
  
  
   
   .
   
   
    
    .core.windows.net/
    
    
     
     
(service-name 是下列三种值之一:blob, table 与 queue)
    
    
   
   
  
  
 
 

2. Development Storage 没有 Scale 能力,也无法支持大量的同时使用者。
3. Development Storage 使用固定的 Account name 与 Account key,如上所述。
4. 本机的 BLOB Service 大小最高 2GB。
5. 在 Development Storage 的 Table Service 中的日期范围,与 SQL Server 2005 所支持的日期范围相同。
6. 在 Development Storage 的 Table Service 可以支持 partition key 与 row key 的属性值要小于 900 bytes,而 account name, table name 与 key property name 三者加总的长度也不能超过 900 bytes。
7. 在 Development Storage 的 Table Service,每一列的长度不可以超过 1MB。
8. 在 Windows Azure Storage 中,每个 entity transaction group 的批次大小最大是 4MB,但在 Development Storage 中不会检查这件事。
9. 在 Development Storage 的 Table Service 若查询表格中不存在的字段,会回传错误,但在正式的 Windows Azure Storage 不会回传错误。
10. 在 Development Storage 的 Table Service 中,以 Edm.Guid 与 Edm.Binary 为类型的属性,只支持 eq (=) 和 ne (!=) 运算。

To learn more about the differences between the Development Fabric and Development Storage themselves and their environment and formal, can effectively eliminate some design-defect or problem caused due to the difference.

Reference data:

About Development Fabric: http://msdn.microsoft.com/en-us/library/dd179455.aspx
About Development Storage: http://msdn.microsoft.com/en-us/library/dd179339.aspx

Original: Large column  [VS2010] Visual Studio 2010 and Windows Azure: to prepare papers (3) - Recognition Development Fabric and Development Storage


Guess you like

Origin www.cnblogs.com/petewell/p/11516330.html