MIX09-Windows Azure (March 2009 CTP)里振奋人心的新特性一览

简介:

今年的MIX09大会真的一天比一天振奋人心,ASP.NET MVC 1.0,Silverlight 3.0, IE 8等核武器级的微软神物纷纷发布。当然,本博客的主要任务是介绍Azure,其他的东东就让别人介绍去吧!

Windows Azure在MIX09上迎来了它的第3个CTP版本——March 2009 CTP,这个版本的更新非常之重要!先列举流牛木马认为其最重要的更新:

  1. 支持部署Full Trust的应用程序!甚至你还可以类似"%RoleRoot%”的Native Code、你可以访问进程、访问注册表!
  2. 支持FastCGI应用程序。这对于Azure的竞争对手Google AppEngine来说绝对是大规模杀伤性武器级的消息。FastCGI为何物?(请自行参考http://www.fastcgi.com)支持FastCGI,意味着Windows Azure上支持PHP、Python、Ruby等各种流行的web开发语言!
  3. URL Rewrite。这个版本的Azure提供了非常方便的URL Rewrite模块,只需要在web.config里稍做配置就可以了。
  4. 支持本地代码调试。 以前的Windows Azure不支持本地代码调试,这算是一个缺陷吧,现在弥补了。

 

在Windows Azure上跑PHP的效果图:

image

 

一段PHP操作Windows Azure Table Storage的示例代码:

复制代码
function  fetch( $pkey ) {
    
$date   =   gmdate ( ' D, d M Y H:i:s \G\M\T ' );
    
$stringtosign   =   " GET\n\n\n $date \n/tweval/TagRatingTable() " ;
    
$signature   =   ' SharedKey tweval: ' . base64_encode (
        hash_hmac(
' sha256 ' ,   $stringtosign ,   base64_decode ( $key ) , true ));
    
$session   =  curl_init( ' http://tweval.table.core.windows.net/TagRatingTable() '
        
. ' ?$filter=PartitionKey%20eq%20\ ''  . urlencode($pkey) .  ' \ '' );
    curl_setopt(
$session ,  CURLOPT_HTTPHEADER ,   array ( " x-ms-date: $date " ,   " Authorization: $signature " ));
    curl_setopt(
$session ,  CURLOPT_RETURNTRANSFER ,   true );
    
$response   =  curl_exec( $session );
    curl_close(
$session );
    
$result   =   array ();
    
foreach ( simplexml_load_string ( $response ) -> entry  as   $entry ) {
        
$properties   =
            
$entry > content > children( ' http://schemas.microsoft.com/ado/2007/08/dataservices/metadata ' )
            
> properties > children( ' http://schemas.microsoft.com/ado/2007/08/dataservices ' );
        
$result []  =   new  Rating(( string )( $properties > Username) ,  (int)( $properties > StatusId) ,
            (
float )( $properties > Score) ,  ( string )( $properties > Tweet) ,   new  DateTime( $properties > CreatedAt));
    }
    
usort ( $result ,   ' cmp ' );
    
return   $result ;
}
复制代码

 

本文转自 流牛木马 博客园博客,原文链接:http://www.cnblogs.com/azure/archive/2009/03/20/1417560.html,如需转载请自行联系原作者

相关文章
|
SQL 存储 运维
Windows Azure云服务IaaS与PaaS层性能分析
近一直想总结Azure IaaS和PaaS的区别与比较,写个博文详细说明一下。建议读者在阅读之前,先熟悉微软PaaS和IaaS平台的基本概念,再参考本文。
385 0
Windows Azure云服务IaaS与PaaS层性能分析
|
数据安全/隐私保护 Windows SQL