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.

Reply

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

Reply

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

Reply
Join the discussion
Create an account Log in

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

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

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