Upload
sotaro-karasawa
View
3
Download
0
Embed Size (px)
DESCRIPTION
@第十回拡張機能勉強会
Citation preview
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
Mockingbird
サーバサイドの設計と実装
Mozilla Japan Internship
Mockingbird Project
naoki, kimura, murata, sotarok
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
AGENDA
• 構成
• 設計
• API
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
構成
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
構成
• Apache
• MySQL 5.0
• PHP 5.2.6
– CakePHP (1.2 RC2)
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
設計
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
スキーマ定義
users rooms tabs
actionlogs
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
actionlogs
• だれが
• どの部屋で
• どのタブで
• なんのイベントを
• 追加パラメータ
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
actionlogsの追加パラメータ
• ユーザ参加– ユーザ名・ID
• ユーザ退室– ユーザID
• タブ開く– URL
• タブ閉じる
• スクロール– x, y 位置(窓全体を100%としたときの割合)
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
API
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
アクション一覧を取得するAPI
• /actionlogs/list.xml
<response>
<status>ok</status>
<message>ok</message>
<actions l="47">
<action e="101" t="hoge22as2">
<param k="url" v="http://hogehoge2.com/" />
</action>
<action e="101" t="hoge22as">
<param k="url" v="http://google.com/" />
</action>
</actions>
</response>
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
その他
• 最後に受け取ったアクション以降のみしかユーザに返却しない
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
アクションの登録
• /actionlogs/post.xml
• パラメータ
– なんのイベント
– どのタブ
– どのルーム
– 追加のパラメータ
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
CakePHPでXML
• ComponentsのXML
– helperとか
• URLの末尾に .xml
– → Controller で $params[‘url’][‘ext’]
• POSTの返却にXMLを使いたい
– POSTもURLの末尾に .xml
– 大変キモチワルイ
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
http://getmockingbird.org/wiki/
未完成未完成未完成未完成なななな部分部分部分部分がががが多多多多いいいいdevwiki
ぼちぼちぼちぼちぼちぼちぼちぼち整備中整備中整備中整備中...
詳しくは...
Creative Commons Attribution-Noncommercial 3.0 Unported (c) 2008, Mockingbird Project.
PHPでの実装については
• PHP勉強会で
– やる保証はありません。。