<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>润物无声 &#187; SAE</title>
	<atom:link href="http://blog.zhourunsheng.com/tag/sae/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zhourunsheng.com</link>
	<description>天空一朵雨做的云</description>
	<lastBuildDate>Sat, 08 May 2021 05:17:21 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>迁移博客图片资源从SAE到七牛</title>
		<link>http://blog.zhourunsheng.com/2014/05/%e8%bf%81%e7%a7%bb%e5%8d%9a%e5%ae%a2%e5%9b%be%e7%89%87%e8%b5%84%e6%ba%90%e4%bb%8esae%e5%88%b0%e4%b8%83%e7%89%9b/</link>
		<comments>http://blog.zhourunsheng.com/2014/05/%e8%bf%81%e7%a7%bb%e5%8d%9a%e5%ae%a2%e5%9b%be%e7%89%87%e8%b5%84%e6%ba%90%e4%bb%8esae%e5%88%b0%e4%b8%83%e7%89%9b/#comments</comments>
		<pubDate>Wed, 21 May 2014 01:57:02 +0000</pubDate>
		<dc:creator><![CDATA[润物无声]]></dc:creator>
				<category><![CDATA[Web设计]]></category>
		<category><![CDATA[SAE]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[七牛]]></category>

		<guid isPermaLink="false">http://blog.zhourunsheng.com/?p=1880</guid>
		<description><![CDATA[<p>博客的很多图片资料存放在 SAE 上面，鉴于七牛的静态资源存储不错，计划迁移到七牛云存储上面，进而方便统一管理 [&#8230;]</p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2014/05/%e8%bf%81%e7%a7%bb%e5%8d%9a%e5%ae%a2%e5%9b%be%e7%89%87%e8%b5%84%e6%ba%90%e4%bb%8esae%e5%88%b0%e4%b8%83%e7%89%9b/">迁移博客图片资源从SAE到七牛</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>博客的很多图片资料存放在 SAE 上面，鉴于七牛的静态资源存储不错，计划迁移到七牛云存储上面，进而方便统一管理。<br />
【下载 SAE Storage 中的资料】</p>
<ul>
<li>所需工具：Cyberduck</li>
<li>配置</li>
</ul>
<blockquote><p>服务器： auth.sinas3.com<br />
端口：443<br />
用户名：应用AccessKey<br />
密码：应用SecretKey</p></blockquote>
<blockquote><p><img src="http://blog.zhourunsheng.com/wp-content/uploads/2014/05/cyberduck.png" alt="" /></p></blockquote>
<p><span id="more-1880"></span><br />
【上传到七牛】</p>
<ul>
<li>所需工具：qiniu-devtools-windows_386 [qrsync.exe]</li>
<li>配置, 新建 conf.json 文件</li>
</ul>
<blockquote><p>access_key： 应用AccessKey<br />
secret_key：应用SecretKey<br />
bucket：bucket 名称<br />
sync_dir：本地同步文件夹</p></blockquote>
<blockquote><p><img src="http://blog.zhourunsheng.com/wp-content/uploads/2014/05/confjson.png" alt="" /></p></blockquote>
<ul>
<li>执行 qrsync.exe conf.json 即可</li>
</ul>
<p>【外链切换】</p>
<ul>
<li>原外链地址：</li>
</ul>
<blockquote><p><span style="color: #ff0000;">http://carey-wordpress.stor.sinaapp.com</span>/uploads/2011/06/The-Moon-150x150.jpg</p></blockquote>
<ul>
<li>新外链地址：</li>
</ul>
<blockquote><p><span style="color: #ff0000;">http://carey.u.qiniudn.com</span>/uploads/2011/06/The-Moon-150x150.jpg</p></blockquote>
<p>【数据库相关】<br />
1. 查询包含外链的相关文章<br />
SELECT * FROM  `wp_posts` WHERE post_content LIKE  '%http://carey-wordpress.stor.sinaapp.com/%'</p>
<p>2. 指定文章替换<br />
UPDATE wp_posts SET post_content = replace(post_content, 'http://carey-wordpress.stor.sinaapp.com/', 'http://carey.u.qiniudn.com/') WHERE ID=24</p>
<p>3. 全局替换<br />
UPDATE wp_posts SET post_content = replace(post_content, 'http://carey-wordpress.stor.sinaapp.com/', 'http://carey.u.qiniudn.com/')</p>
<p>【资料相关】</p>
<ul>
<li>SAE 地址：<a href="http://sae.sina.com.cn/">http://sae.sina.com.cn/</a></li>
<li>SAE SVN 地址：<a href="https://svn.sinaapp.com/carey">https://svn.sinaapp.com/carey</a></li>
<li>七牛官方：<a href="https://portal.qiniu.com/">https://portal.qiniu.com/</a></li>
</ul>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2014/05/%e8%bf%81%e7%a7%bb%e5%8d%9a%e5%ae%a2%e5%9b%be%e7%89%87%e8%b5%84%e6%ba%90%e4%bb%8esae%e5%88%b0%e4%b8%83%e7%89%9b/">迁移博客图片资源从SAE到七牛</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zhourunsheng.com/2014/05/%e8%bf%81%e7%a7%bb%e5%8d%9a%e5%ae%a2%e5%9b%be%e7%89%87%e8%b5%84%e6%ba%90%e4%bb%8esae%e5%88%b0%e4%b8%83%e7%89%9b/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google Plus API 之 程序设计</title>
		<link>http://blog.zhourunsheng.com/2011/09/google-plus-api-%e4%b9%8b-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1/</link>
		<comments>http://blog.zhourunsheng.com/2011/09/google-plus-api-%e4%b9%8b-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 05:25:22 +0000</pubDate>
		<dc:creator><![CDATA[润物无声]]></dc:creator>
				<category><![CDATA[Web设计]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SAE]]></category>

		<guid isPermaLink="false">http://blog.zhourunsheng.com/?p=888</guid>
		<description><![CDATA[<p>昨天Google官方发布新闻(Getting started on the Google+ API)，Goog [&#8230;]</p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2011/09/google-plus-api-%e4%b9%8b-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1/">Google Plus API 之 程序设计</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>昨天Google官方发布新闻(<a href="http://googlecode.blogspot.com/2011/09/getting-started-on-google-api.html">Getting started on the Google+ <em>API</em></a>)，Google Plus开放了一个只读的API，允许抓取用户的公开Profile和公开的Activity信息流，其中<a href="http://developers.google.com/+/">Google+ Platform</a>的具体开发API介绍详见官网。</p>
<p>今天我就带领大家熟悉一下基于Google+ 开放API的程序设计，本程序基于SAE平台，采用PHP语言开发，基于Java语言和Python语言也都比较好开发，google官方都有开放的lib可以直接使用，不用自己再做底层封装了。<span id="more-888"></span></p>
<h3>实现步骤</h3>
<ol>
<li>访问 <a href="https://code.google.com/apis/console/?api=plus" rel="nofollow">Google API Console</a> 开启Google+ API权限.<br />
<img class="alignnone size-full wp-image-891" title="active_google_plus" src="http://blog.zhourunsheng.com/wp-content/uploads/2011/09/active_google_plus.png" alt="" width="668" height="40" /></li>
<li>访问 <a href="https://code.google.com/apis/console/?api=plus" rel="nofollow">Google API Console</a> 生成  developer key, OAuth2 client id, OAuth2 client secret, 和 注册 OAuth2 redirect uri.<br />
<img class="alignnone size-full wp-image-890" title="google_plus_client_id" src="http://blog.zhourunsheng.com/wp-content/uploads/2011/09/google_plus_client_id.png" alt="" width="754" height="151" /><br />
<img class="alignnone size-full wp-image-892" title="google-plus-simple-api-access" src="http://blog.zhourunsheng.com/wp-content/uploads/2011/09/google-plus-simple-api-access.png" alt="" width="576" height="147" /></li>
<li>下载 google api的php开发库，<a href="http://google-api-php-client.googlecode.com/files/google-api-php-client-0.4.4.tar.gz">google-api-php-client</a>.</li>
<li>更新google api开发库，因为我的运行环境基于新浪云SAE平台，所以要做一些特别的改动：<br />
1. 实现SAE平台的MemCache，在google-api-php-clientsrccache中建立apiSAEMemcacheCache.php文件，具体内容如下</p>
<pre>&lt;?php
/**
 * SAE Memcache
 *
 * @author Carey Zhou &lt;zhourunsheng2008@google.com&gt;
 */
class apiSAEMemcacheCache extends apiCache {
  private $connection = false;

  public function __construct() {
	//do nothing
  }

  private function connect() {
    if (! $this-&gt;connection = @memcache_init()) {
      throw new apiCacheException("Memcache init failed");
    }
  }

  private function check() {
    if (! $this-&gt;connection) {
      $this-&gt;connect();
    }
  }

  /**
   * @inheritDoc
   */
  public function get($key, $expiration = false) {
    $this-&gt;check();
    if (($ret = @memcache_get($this-&gt;connection, $key)) === false) {
      return false;
    }
    if (! $expiration || (time() - $ret['time'] &gt; $expiration)) {
      $this-&gt;delete($key);
      return false;
    }
    return $ret['data'];
  }

  /**
   * @inheritDoc
   */
  public function set($key, $value) {
    $this-&gt;check();
    // we store it with the cache_time default expiration so objects will at least get cleaned eventually.
    if (@memcache_set($this-&gt;connection, $key, array('time' =&gt; time(),
        'data' =&gt; $value), false) == false) {
      throw new apiCacheException("Couldn't store data in cache");
    }
  }

  /**
   * @inheritDoc
   */
  public function delete($key) {
    $this-&gt;check();
    @memcache_delete($this-&gt;connection, $key);
  }
}</pre>
<p>2. 更新 google-api-php-clientsrccacheapiCache.php文件，将我们新添加的SAEMemcache加进去，代码如下：</p>
<pre>require_once "apiSAEMemcacheCache.php";</pre>
<p>3. 更新 google-api-php-clientsrcioapiCurlIO.php文件，修正一个bug【当Header中出现"HTTP/1.1 100 Continue"的时候，原程序会出现解析错误，导致程序崩溃，估计也是SAE环境的特殊性导致的】，具体改正如下：</p>
<p>原来的代码：</p>
<pre>// Parse out the raw response into usable bits
    list($rawResponseHeaders, $responseBody) = explode("rnrn", $data, 2);</pre>
<p>现在的代码：</p>
<pre>// Parse out the raw response into usable bits
    list($rawResponseHeaders, $responseBody) = explode("rnrn", $data, 2);
    if ($rawResponseHeaders == "HTTP/1.1 100 Continue") {
	list($rawResponseHeaders, $responseBody) = explode("rnrn", $responseBody, 2);
    }</pre>
<p>更改原因：如果出现了"HTTP/1.1 100 Continue"的时候，还要继续向下解析一次，即出现了特殊的“双Header现象”，否则的话就会导致Header解析出错，真正的Header没有被解析出来，也混到body里面去了。</li>
<li>google plus 代码编写，获取用户公开的Activity信息流，核心代码如下：
<pre>&lt;?php
/*
 * Google Plus
 *
 * @author Carey Zhou(zhourunsheng2008@gmail.com)
 */
require_once '../libs/google-api-php-client/src/apiClient.php';
require_once '../libs/google-api-php-client/src/contrib/apiPlusService.php';

//sae_set_display_errors(true);

session_start();

$client = new apiClient();
$client-&gt;setApplicationName("Google Plus Application");

$client-&gt;setClientId('800611776987-kp6h5nfv5l9gp5v2qipqhc5l8dkqe0lu.apps.googleusercontent.com');
$client-&gt;setClientSecret('5o-eK5M4iftPxB7_fhNqEAhm');
$client-&gt;setRedirectUri('https://carey.sinaapp.com/googleplus/index.php');
$client-&gt;setDeveloperKey('AIzaSyD6FERuKcWPn2xGUcgFmKW9Ush50nu6PYQ');

$client-&gt;setScopes(array('https://www.googleapis.com/auth/plus.me'));
$plus = new apiPlusService($client);

if (isset($_REQUEST['logout'])) {
  unset($_SESSION['access_token']);
}

if (isset($_GET['code'])) {
  $client-&gt;authenticate();
  $_SESSION['access_token'] = $client-&gt;getAccessToken();
  //header('Location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
  $url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
  echo "&lt;script language='javascript' type='text/javascript'&gt;";
  echo "window.location.href='$url'";
  echo "&lt;/script&gt;";
}

if (isset($_SESSION['access_token'])) {
  $client-&gt;setAccessToken($_SESSION['access_token']);
}

if ($client-&gt;getAccessToken()) {
  $me = $plus-&gt;people-&gt;get('me');

  $optParams = array('maxResults' =&gt; 100);
  $activities = $plus-&gt;activities-&gt;listActivities('me', 'public', $optParams);

  // The access token may have been updated lazily.
  $_SESSION['access_token'] = $client-&gt;getAccessToken();
} else {
  $authUrl = $client-&gt;createAuthUrl();
}
?&gt;</pre>
<p>可以注意到，在程序中我们配置了ClientID，ClientSecret，RedirectUri，DeveloperKey和Google+的scope，然后通过OAuth2机制获取用户的授权，进而来获得用户公开的Activity信息流。</li>
</ol>
<h3>程序部署和验证</h3>
<ol>
<li>把上面的代码部署到SAE平台，<a href="https://carey.sinaapp.com/googleplus/index.php">https://carey.sinaapp.com/googleplus/index.php</a><br />
<img class="alignnone size-medium wp-image-901" title="google-plus-carey-sinaapp" src="http://blog.zhourunsheng.com/wp-content/uploads/2011/09/google-plus-carey-sinaapp-300x161.png" alt="" width="300" height="161" /></li>
<li>点击Connet Me进行OAuth2用户授权<br />
<img class="alignnone size-medium wp-image-902" title="google-plus-user-oauth" src="http://blog.zhourunsheng.com/wp-content/uploads/2011/09/google-plus-user-oauth-300x161.png" alt="" width="300" height="161" /></li>
<li>点击Allow Access允许访问，则会回到刚才的页面，把用户的信息流抓取出来<br />
<img class="alignnone size-medium wp-image-904" title="google-plus-get-activity" src="http://blog.zhourunsheng.com/wp-content/uploads/2011/09/google-plus-get-activity-300x161.png" alt="" width="300" height="161" /></li>
</ol>
<h3>小结</h3>
<p>到此为止，google plus 基于PHP开发的基本流程就都OK了，希望google过几天能开放出更多的API来，毕竟google+是个圈，所以圈子的API才是最核心的，O(∩_∩)O哈哈~,期待中</p>
<p>源码下载<a href="http://blog.zhourunsheng.com/wp-content/uploads/2011/09/google_plus_sae_source.zip">google_plus_sae_source</a></p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2011/09/google-plus-api-%e4%b9%8b-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1/">Google Plus API 之 程序设计</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zhourunsheng.com/2011/09/google-plus-api-%e4%b9%8b-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sina App Engine 与 Google App Engine</title>
		<link>http://blog.zhourunsheng.com/2011/06/sina-app-engine-%e4%b8%8e-google-app-engine/</link>
		<comments>http://blog.zhourunsheng.com/2011/06/sina-app-engine-%e4%b8%8e-google-app-engine/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 00:44:00 +0000</pubDate>
		<dc:creator><![CDATA[润物无声]]></dc:creator>
				<category><![CDATA[云计算]]></category>
		<category><![CDATA[GAE]]></category>
		<category><![CDATA[SAE]]></category>

		<guid isPermaLink="false">http://blog.zhourunsheng.com/?p=4</guid>
		<description><![CDATA[<p>新浪推出了自己的云计算服务平台，和Google一样，都叫App Engine。 根据NIST的定义，Googl [&#8230;]</p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2011/06/sina-app-engine-%e4%b8%8e-google-app-engine/">Sina App Engine 与 Google App Engine</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>新浪推出了自己的云计算服务平台，和Google一样，都叫App Engine。</p>
<p>根据NIST的定义，Google App Engine属于PaaS平台型服务，那么它具体提供什么样的服务，新浪推出的Sina App Engine和Google的又有哪些区别呢？</p>
<h4>背景</h4>
<p>云计算服务在Google、Amazon等公司成功产品的引领下，正在商业化的道路上大步向前。在NIST的定义中，有三种云计算服务模型。</p>
<ul>
<li>Software as a Service (<strong>SaaS</strong>)：软件即服务模型，用户直接使用构建在云端的软件。例如，Google Docs, Salesforce.com</li>
<li>Platform as a Service (<strong>PaaS</strong>)：平台即服务模型，用户使用云平台所支持的语言和工具，开发应用并部署在云平台。例如，Google App Engine, Force.com</li>
<li>Infrastructure as a Service (<strong>IaaS</strong>)：基础架构即服务模型，提供处理器、存储、网络等（虚拟）硬件资源给用户，用户可任意安装软件和开发环境，包括安装操作系统。例如，Amazon EC2, Joyent</li>
</ul>
<p>可见，三种模型从应用到平台再到架构，越来越底层，用户得到的可操作性和灵活性也越来越大。<span id="more-4"></span></p>
<h4>Google App Engine是什么？</h4>
<p>Google App Engine（GAE） 提供一整套开发组件来让用户轻松地在本地构建和调试网络应用，之后能让用户在Google强大的基础设施上部署和运行网络应用程序。配置可随应用的访问量 和数据存储需要的增长轻松扩展，使用 GAE，将不再需要维护服务器：只需上传你的应用程序，它便可立即为你的客户提供服务。</p>
<p>简单来说，这和虚拟主机服务类似，只是运行环境不同。虚拟主机支持的是ASP, JSP, PHP等网页应用，而GAE现支持Java、Python和Google自家开发的Go这三种语言开发的应用程序，并为这三种语言提供基本相同的功能和API。</p>
<p>GAE提供大量的免费使用额度和灵活的资费标准。多达 500 MB 的存储空间，以及可支持每月约 500 万页面浏览量的足够的 CPU 和带宽，完全免费。选择付费服务则可按需提高相应配置。</p>
<p><strong>功能支持</strong></p>
<ul>
<li>网址抓取（<strong>URL Fetch</strong>）：访问互联网上的资源，抓取检索数据。</li>
<li>邮件（<strong>Mail</strong>）： GAE可以利用基于Gmail的基础设施来发送电子邮件。</li>
<li><strong>Memcache</strong>缓存：高性能的内存缓存保障，对于那些不需要持久性存储和事务功能的数据（例如临时数据或从数据存储区复制到缓存以进行高速访问的数据）很有用。</li>
<li>图像操作（<strong>Image Manipulation</strong>）：使用该 API，您可以对 JPEG 和 PNG 格式的图像进行缩放、裁剪、旋转和翻转，还能使用预先定义的算法提升图片的质量。</li>
<li>计划任务和任务队列（<strong>Scheduled Tasks &amp; Task Queues</strong>）：允许将任务计划为按指定间隔运行，这些任务通常称为Cron job。另外可以通过在一个队列插入任务（以Web Hook的形式）来实现后台处理，GAE会根据调度方面的设置来安排这个队列里面的任务执行。</li>
</ul>
<h4>Sina App Engine是什么？</h4>
<p>Sina App Engine（SAE），是由新浪公司开发和运营的开放云计算平台。SAE为App开发者提供稳定、快捷、透明、可控的服务化的平台，并且减少开发者的开发和维护成本。和GAE一样，他们都属于PaaS平台型云计算服务。</p>
<p>SAE通过Web Service Pool，提供以PHP+HTTP为基础的计算中心，这对于一个普通网站来说完全足够了。这样一来，大量草根站长就可以使用SAE来当做虚拟主机免费空间，希望开放注册后新浪能够有足够技术和经济实力支撑住整个平台。</p>
<p>与传统主机托管服务相比而言，传统托管面向的是硬件软件设备，使用者得到的也是设备的使用权；而SAE面向的服务，使用者得到的是服务的使用权。开发者可以在其上通过在线调试、日志分析、协作共享等功能进行web开发。</p>
<p>最重要的是SAE提供的完整的分布式web服务的解决方案，具有高可靠性，开发者只需专注于应用的功能开发，而不必担心故障宕机、服务扩容，甚至不 用关心主辅同步和读写分离，因为所有这些SAE都已经为用户完整提供。与虚拟主机采用固定计费的方式不同，SAE采用预充值方式，“所付即所用，所付仅所 用”，按需付费更加灵活和节省成本，web服务的一切损耗均提供报表查询和账单汇总，用户一目了然。SAE可以为运营节约成本，包括运维成本。</p>
<p>使用SAE云计算，省钱+高效+可靠。由此可以预见，国内的虚拟主机商可能将因此面临不小的冲击。</p>
<p><strong>功能支持</strong></p>
<ul>
<li>PHP运行环境</li>
<li>MySQL：分布式数据库服务，通过RDC提供</li>
<li>Memcache：分布式缓存服务</li>
<li>Storage：文件存储服务</li>
<li>Cron：定时服务</li>
<li>Image：图像处理服务</li>
<li>FetchURL：网页抓取服务</li>
<li>Mail：邮件服务</li>
<li>TaskQueue：异步轻量级任务队列</li>
<li>DeferredJob：异步大任务延迟队列</li>
<li>Counter：计数器服务</li>
</ul>
<p>从上面可以看到，Sina App Engine提供了大部分Google App Engine支持的功能，另外SAE选择PHP作为首选支持语言，并支持MySQL数据库。这主要是因为PHP语言在目前国内Web开发的比重最大。未来 SAE会考虑支持更多的Web开发语言，如Python、Java等。</p>
<p>在SAE上的所有服务都具有大型分布式系统的高可靠性、高扩展性、易维护性等优点。目前SAE的内核（即Runtime）和大部分服务之间的通讯是 采用HTTP REST方式，SAE平台理论上可以对接各种服务，对接的第三方服务和内部服务一样可以通过在线管理平台进行管理、查看统计配额、计费等。</p>
<p><strong>管理界面</strong></p>
<p>登录http://sae.sina.com.cn，可以通过Web在线管理平台对应用进行管理。目前可以使用新浪微博帐号登录，并支持OAuth。</p>
<p><img src="http://alibuybuy-img11.stor.sinaapp.com/2011/06/ec6c_Dashboard_SAE.png" alt="" /></p>
<p>GAE与Google帐户集成，进行登录管理和用户认证。登录控制台http://appengine.google.com/<img src="http://alibuybuy-img11.stor.sinaapp.com/2011/06/94df_Dashboard_GAppProxy.png" alt="" /></p>
<h4>SAE和GAE的比较</h4>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="126"></td>
<td valign="top" width="150">Sina App Engine</td>
<td valign="top" width="150">Google App Engine</td>
</tr>
<tr>
<td valign="top" width="126">云计算模型</td>
<td valign="top" width="150">PaaS</td>
<td valign="top" width="150">PaaS</td>
</tr>
<tr>
<td valign="top" width="126">支持语言</td>
<td valign="top" width="150">PHP</td>
<td valign="top" width="150">Java、Python、Go</td>
</tr>
<tr>
<td valign="top" width="126">数据库支持</td>
<td valign="top" width="150">MySQL 最大5GB</td>
<td valign="top" width="150">暂不支持</td>
</tr>
<tr>
<td valign="top" width="126">每个帐号可拥有app数量</td>
<td valign="top" width="150">10个</td>
<td valign="top" width="150">10个</td>
</tr>
<tr>
<td valign="top" width="126">单app存储限额</td>
<td valign="top" width="150">最多10GB，单文件不大于4M</td>
<td valign="top" width="150">1GB免费，无最大上限</td>
</tr>
<tr>
<td valign="top" width="126">代码大小</td>
<td valign="top" width="150">每帐户不超过100M，单app总代码不超过50M</td>
<td valign="top" width="150">单app不超过150MB</td>
</tr>
<tr>
<td valign="top" width="126">绑定域名</td>
<td valign="top" width="150">需另行申请，备案</td>
<td valign="top" width="150">支持</td>
</tr>
<tr>
<td valign="top" width="126">免费额度</td>
<td valign="top" width="150">各项服务通过扣除虚拟货币“云豆”实现<a title="云豆限额标准" href="http://sae.sina.com.cn/?m=faqs&amp;catId=7#show_38" target="_blank">限额</a>。<br />
每日免费发放200云豆（实名认证后1000云豆）</td>
<td valign="top" width="150">每日6.5 CPU-hours，流入流出带宽各1GB，存储1GB。<br />
<a title="GAE免费使用额度" href="http://code.google.com/appengine/docs/quotas.html" target="_blank">具体额度</a></td>
</tr>
<tr>
<td valign="top" width="126">超过免费限额的收费标准</td>
<td valign="top" width="150">1元=100云豆，暂未支持支付</td>
<td valign="top" width="150">流入带宽：0.1美元/GB<br />
流出带宽：0.12美元/GB<br />
CPU 时间：0.1美元/CPU小时<br />
存储：0.15美元/GB 每月</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>注册 Sina App Engine：          <a href="http://sae.sina.com.cn/">http://sae.sina.com.cn/<br />
</a>注册 Google App Engine：    <a href="https://appengine.google.com/">https://appengine.google.com/</a></p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2011/06/sina-app-engine-%e4%b8%8e-google-app-engine/">Sina App Engine 与 Google App Engine</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zhourunsheng.com/2011/06/sina-app-engine-%e4%b8%8e-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
