翻訳者レビュー ( 英語 → 日本語 )

評価: 52 / 0 Reviews / 2014/06/25 11:35:40

tearz
tearz 52 翻訳経験豊富です。 過去の実績や評価などご確認ください。 ご連絡お待ち...
英語

Right now the metadata for the currently streaming song/live dj on datafruits is updated via simple polling and ajax requests. The metadata is stored in a simple redis key, and a sinatra app with an endpoint /currentsong will return this key in JSON format. The ajax request simply polls this app every few seconds.
I'd like to use EventSource instead of polling via setInterval. I thought this would be a good opportunity to try out the new ActionController::Live feature in Rails. Luckily Aaron Patterson has a good write-up on his blog.

日本語

現状、曲・ライブDJをデータフルーツでストリーミングするメタデータは、単純にポーリングとajaxの要求によって更新されます。メタデータは単純なredis keyに保存されていて、終点・現在の曲のsinatraアプリはこのキーをJSONフォーマットに戻します。単純にajax requestはこのアプリを数秒ごとにポーリングします。
個人的にはsetIntervalのポーリングを経由する代わりにEventSourceを使用希望します。
Railsの中の新しいActionController::Live featureを試すいい機会だと思いました。幸運なことにAaron Pattersonがブログでいいことを書いてました。

レビュー ( 0 )

翻訳者レビューはまだありません