かなり前(SDK1.3.4-5)の頃の話題なのですが、Google App Engine でCometを実現するAPIが試験的に導入されました。デモとしてAndroidのロボットが動くやつを見た人も多いでしょう(http://dance-dance-robot.appspot.com/)。 現在、Channel APIは申請し承認されたサーバ(application-id)でのみ利用可能ですが、開発環境では実装して動かしてみることができます。appengine 周辺の人達は出た当初に色々と試しているわけですが、自分も試しにゲームが出来るレベルまで使ってみようと、実装してみました。 題材は囲碁ですが、9路盤という9×9の入門用の盤面としてみました。たまたま囲碁に興味を持ったのでやってみようという流れです。 尚、ソースコードはGoogle Codeで公開しています。 http://code.g
Google App Engine の webapp.RequestHandler には、ハンドラ内で例外が発生したときに呼び出される handle_exception メソッドがあります。このメソッド、デフォルトでは HTTP ステータスコードを 500 に設定するだけですが、これをオーバーライドして、動作をカスタマイズできます。 例外の情報をログに出力するベースハンドラクラスを作成し、リクエストハンドラはベースハンドラを継承すれば、集約例外ハンドラになりますね。 class BaseHandler(webapp.RequestHandler): def handle_exception(self, exception, debug_mode): # 例外情報をログに出力。 logging.exception(exception) # とりあえず親の実装を呼び出しておく。 # 独自のエラ
August 2011 (1) July 2011 (1) June 2011 (2) April 2011 (2) March 2011 (2) February 2011 (2) January 2011 (6) December 2010 (6) November 2010 (5) October 2010 (8) September 2010 (2) August 2010 (3) July 2010 (9) June 2010 (4) March 2010 (1) February 2010 (7) January 2010 (2) はじめに GAE/Python ではスレッドや子プロセス等による並列化が出来ないので、タスクキューを使うのが一般的です。 しかし、URLフェッチについては、非同期リクエストを利用することで、タスクキューを使わずに複数のHTTP通信を同時実行出来ます。
GAE アプリを開発しているけど、Python と GAE の両方とも初心者なので、どう実装したらいいのか迷う。そこで、「オープンソースのGAE向けアプリを参考にすればいいじゃないか」と考え、ネットで探してみた。 kay-framework - A web framework made specifically for Google App Engine - Google Project Hosting GAE に特化して開発された Python フレームワーク。 アプリの開発に使ってもいいし、オレオレフレームワーク開発の参考にするのもアリ。 google-app-engine-oil - Yet another web framework on App Engine - Google Project Hosting Ruby on Rails を意識して作られた GAE/Python 向
App Engine JavaScript SDKはGoogle App Engine用のオープンソース・ソフトウェア。サーバサイドで動作させるプログラミング言語は多数あるが、最近注目を集めているのがサーバサイドjavaScriptだ。クライアントとサーバの両方を同じ言語で作れるのが利点だ。 デモのブログアプリ だが注目は集めつつも、実際に利用しているケースはまだ多くない。サーバ側の設定も必要なので、手間に感じられてしまうのだろう。そこでサーバの用意がいらない、Google App Engine上で動作させるのがApp Engine JavaScript SDKだ。 App Engine JavaScript SDKはその名の通り、Google App Engine上でサーバサイドJavaScriptを実現するSDKだ。ブログシステムのサンプルもあるので、その面白さがうかがえるはずだ。Da
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
Google I/O 2010ではApp Engine関連の大きな新機能発表がいくつかありましたが、「Channel API」もそのひとつ。これは「Webブラウザとのpush通信(comet)のためのAPI」です。 ついにpushできるよ! これまでApp Engineにおいてクライアントへのpushを行うには、 XMPPプロトコルを通じてのXMPPクライアントへのメッセージ送信 URLFetchを用いて外部のpushサーバー(WebSocket対応サーバーとかTornadoとか)経由でへWebブラウザにpush(例:松尾さんのwebsocket連携) のいずれかしか手段がありませんでした。 しかしXMPPクライアントの実装は容易ではなく、とりわけApp Engine側のXMPPサーバーとしてGoogle Talkサーバーを用いる場合はTLS通信が必須となり、利用可能なクライアントが極端に
Welcome Welcome to the appengine-utilities project demo site. appengine-utilities is a collection of utilities designed to reduce the amount of time required to build applications on top of the Google AppEngine environment. It includes: sessions: A complete sessions management class that uses both the datastore and memcache to provide a high performance library while maintaining reliability. cache
Google App Engine SDKの開発サーバーのデータストアはtmpディレクトリにデータを保存するため、マシンを再起動するとデータの中身が全部消えてしまいます。毎回テストデータを用意するのが面倒なので、本番サーバーからデータを移してくるための方法を調べてみました。するとbulkloader.pyというユーティリティを使うと、簡単に本番サーバーのデータをダウンロードして保存し後からリストアすることができることがわかりました。ということで早速試してみます。 参考にしたのは以下のサイト。 http://code.google.com/intl/en/appengine/docs/python/tools/uploadingdata.html ※2010/01/31追記:--db_filenameオプションの使い方を掲載しました。 ■前準備 app.yamlに以下の設定を追加してから、a
(随時更新中です。間違いなどありましたらコメントをお願いします!) このページのtinyurl: http://tinyurl.com/gaetips Datastoreのtips Bigtableの内部構造 BigtableによるDatastoreの実装 Datastoreによるクエリの実装 トランザクションとエンティティグループ Datastoreのtips List Proprtyとmerge joinの使い方 GAE一般のtips GAEのサーバー構成とリクエストの流れ Task Queue APIの使い方 開発環境とプロダクション環境の違い Flex/AIR+GAEのtips GAE/JにBlazeDSを組み込む BlazeDSの本番環境へのデプロイでハマる Datastore APIの取り扱いでハマる App Engine開発の便利な参考ページ TOPGATEさんのGoogle
A while ago I was writing some sample applications (source) for Google App Engine. I noted the things that can be useful for other GAE programmers. I used Google's webapp framework, my code here is using it. Please take a look at the shell application, it can help you test simple code. How to dynamically get application name and version?This question was asked before. You can use os.getcwd() or os
で値が設定できるかというと、そう簡単な話ではないようで、 同じように苦労されている方の記事を参考にさせていただきました。 Google App EngineでCookieを発行する http://python.g.hatena.ne.jp/edvakf/20090213/1234479987 ・・・手間ですが、ほかに方法がないのならやるしかない。 この方法でCookieに値を保存することにします。 セッションキーの作成 あまり何も考えず、乱数で32桁の0-9,a-Zまでの値を生成し、 Cookieに設定することにします。 セッションの破棄 これはまだ試していないのですが、 Google App Engine Python 用の cron を使用したスケジュール タスク http://code.google.com/intl/ja/appengine/docs/python/config/c
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く