展示物コーナー展示作品リストコミュニケーション・情報

ウェブサイトと連動するブースシステム(Hidenori Glushenko、Miya Watanabe)

■作品名:ウェブサイトと連動するブースシステム
■作者名:Hidenori Glushenko、Miya Watanabe
■カテゴリ:コミュニケーション


■作品の説明
インワールドで展示ブースをセットアップすると、ブースに同梱されたノートカードの内容が自動的にウェブサイトに反映されるシステムです。
ブース側ではllHTTPRequestとHTTP-Inの両方を利用しています。
ウェブサイトはMovableTypeベースのブログシステムになっており、XML-RPC APIを利用しています。
インワールドのブースオブジェクトと、ウェブサイト上のブログ記事との紐付けその他の管理を行うために、中間で処理するAPIをPHP/MySQLで構築しています。

LSLから外部ウェブサーバーと通信するllHTTPRequest関数では、リクエスト送信時の本文が2KB未満に制限されています。
http://wiki.secondlife.com/wiki/LlHTTPRequest/ja
したがって、ノートカードの内容がこの容量を超える場合、リクエストを複数回に分けるなどの処理が必要でした。
しかし、最近導入されたHTTP-INの機能では、LSL側から返す応答のサイズ制限はありません。
(スクリプトメモリの許す限り)
この機能を上手く使えば、ノートカードの内容を一度にすべてウェブサーバーに送信することができます。

具体的には、
1.LSL側で処理するためのURLを取得し、取得に成功したらURLをウェブサーバーに伝えます
2.ウェブサーバー側のプロセスで、要求のあったURLに対してリクエストを送信し、ノートカードの内容をそのまま取得します
3.ノートカードの内容を適宜解析し、XML-RPC APIを使用してブログ記事として投稿します
という処理になっています。


■工夫した点
ノートカードの内容をLSL側ではほとんど処理せず、ウェブサーバーのプログラムで処理することにより、より柔軟に
処理ができるようになっていると思います。


■主要な機能として使っているLSL関数など
llHTTPRequest、llRequestURL、llHTPResponse
http_requestイベント


■自己紹介など
スクリプト、プログラム:Hidenori Glushenko(GOTTi)
インワールドでスクリプター同士が集まって雑談などをする「スクリプターズカフェ」をやっています。
http://scripterscafe.slmame.com/
ブログ:http://blog.innx.co.jp/

MovableType設定:Miya Watanabe
ブログ:http://movings.slmame.com/


展示場所: HERE


*Product Name: Auto Web-Synchronizing Booth System
*Creator: Hidenori Glushenko, Mya Watanabe

*Description
This booth system automatically synchronize the content of the notecard (in the booth object) with the item catalogue on the web.

llHTTPRequest supports only less than 2KB, so we must handle multiple requests to upload long text.
But with new HTTP-IN feature, Linden Lab doesn't limit the length of the response,
so we can use it to send all of the contents in notecard at one time to the web server.
In fact, the LSL script sends a short 'request' message with a URL to the web server, and then
the process on the webserver requests the URL and get the notecard content.

We also uses XML-RPC API of the MovableType blog system.
But LSL is not enough to maintain/handle complex API requests and associations between the booth and the blog entry.
These features are implemented in PHP/MySQL system on our web server.



*LSL Functions used in this item
llHTTPRequest、llRequestURL、llHTPResponse
http_request event


*Creator Profile
Script,Programming: Hidenori Glushenko
http://scripterscafe.slmame.com/
Blog: http://blog.innx.co.jp/

MovableType: Config Miya Watanabe
Blog: http://movings.slmame.com/




exhibit location : HERE