zoukankan      html  css  js  c++  java
  • MIX09Windows 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;
    }

    如果你是Python爱好者,你会惊喜地发现使用Python来操作Windows Azure的服务也是那么容易:

    http://github.com/sriramk/winazurestorage/tree/master

    下载Windows Azure Tools for Visual Studio and SDK(合二为一的安装文件): http://go.microsoft.com/fwlink/?LinkId=128752

  • 相关阅读:
    关于Windows 2000,IIS 5/4下面,Form内容超过200K解决办法!
    获取客户端网卡MAC地址和IP地址的几种方法
    关于Java的异常捕获
    redis的swap
    Linux下C++程序获取运行时间的一种方式
    CentOS 修改IP地址, DNS, 网关[内容来源网络]
    [转]ubuntu12.04搭建ruby on rails 环境
    rails环境 bundle 时无法安装nokogiri 完美解决
    SQL Server – 冷知识 (新手)
    Typescript – 学习笔记 tsconfig.json
  • 原文地址:https://www.cnblogs.com/azure/p/1417560.html
Copyright © 2011-2022 走看看