All threads / How to do a Realtime Basketball Boxscore Widge Properly?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to do a Realtime Basketball Boxscore Widge Properly?

Paulo Avelino asked in General

I have created a basketball stats tracker . Now I wanted to create a widget so that sports site can embed my boxscore widget to their site. My plan is add a job in my app that push the game boxscore json to a cloud server every 1 minute or while game tracking is on progress. I am thinking of using rethinkdb as my boxscores database. One of my requirements is to be able to update widget data without refreshing browser. Thats why I thought of using rethinkdb with rails server sent event. Am I on right path? Is there a tutorial or sample app using rethinkdb and SSE? Any suggestions would be helpful.
Thanks.

Consider using websockets, it would allow you to feed the refreshed data immediately, not wait for a minute potentially, which is kinda long when you're talking about real-time.

Read more here if your app is Rails: https://guides.rubyonrails.org/action_cable_overview.html

Hi thanks for the response. I dont need bidirectional communication thats why I thought of SSE

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 35,699+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.