專給 Amazon 用的 Cloud Cache

Cloud cache 第一次看到, 就想到一個大問題, 網路速度問題要如何搞定?

CloudCache™

  • 官方網站: CloudCache™
  • 說明: CloudCache™ offers simple and affordable on-demand caching. Store data in an in-memory cache for super fast access while decreasing database hits and increasing performance.

看起來很方便好用, 於是直接照 Getting Started 的範例馬上做一個, 結果完全不會跑~

開始回官方網站再看詳細, 在公司網站(Quetzall.com)看到下述訊息:

Elastic cache now available for Amazon Web Services (AWS) customers - support for other clouds on the way!

於 公司網站(Quetzall.com) 的 Consulting 看到下述訊息.

CloudCache instance nearest to your machines in terms of Amazon's network topology, for ultimate performance.

一看就明白了.... 這個服務專門給 AWS 用, 所以, 不用擔心網路問題, 因為 Amazon 就是一個大型區域網路....

所以在此留下安裝、程式大概寫法, 其它就不多深入研究了.

CloudCache 所需系統程式安裝、範例

$ apt-get install php-http-request php5-curl


<?php                                                                                                                                                 
require_once('CloudCacheNormal.php');
require_once('CloudCacheRestImplement.php');

$normalCall = new CloudCacheNormal();

$normalCall->setKeys("akey", "skey");
$output = $normalCall->set('def', 'aaa', 300);
$output = $normalCall->get('aaa');
print_r($output);
$output = $normalCall->get('def');
print_r($output);

$output = $normalCall->listkeys();

$keys = array_keys($output);
foreach ($keys as &$keey) {
    echo '::key::' . $keey . "\n";
}

// $output = $normalCall->incr(key);
// $output = $normalCall->decr(key);

$output = $normalCall->myusage();
print_r($output);
?>

註: 這讓我想到之前 c9s 在 Plurk 的話: 中國重新創造區域網路.... 或許這套可以考慮前進中國? XD

作者: Tsung

對新奇的事物都很有興趣, 喜歡簡單的東西, 過簡單的生活.

發表迴響

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料