1
我試着來顯示這些鳴叫從流來與軌道如何應對(從Twitter)
我會在哪裏處理控制器絡繹不絕瀏覽器的恆定的數據流?
TweetStream.track('happy') do |status|
temp = status.text
if(temp.include? "http")
puts "#{status.text}"
end
end
我試着來顯示這些鳴叫從流來與軌道如何應對(從Twitter)
我會在哪裏處理控制器絡繹不絕瀏覽器的恆定的數據流?
TweetStream.track('happy') do |status|
temp = status.text
if(temp.include? "http")
puts "#{status.text}"
end
end
看看pusherapp(https://github.com/pusher/pusher-gem)。
這使您可以打開WebSocket並將數據從您的Rails應用程序中的後臺任務傳輸到您的JavaScript客戶端應用程序。