willnotwish / at-the-races

Investigate database race conditions
1 stars 0 forks source link

Create race record in webapp and run the race in the background #16

Open willnotwish opened 1 day ago

willnotwish commented 1 day ago

Use an event broker (eg, pubnub, pusher, ably or a custom solution) to update a js component showing a visualisation.

willnotwish commented 1 day ago

Before I think about adding (for example), a Vue app, I need to ensure that the visualisation view is ready. It is very confusing and difficult to make sense of the data if the race has already started before the visualisation is ready to display progress.

willnotwish commented 1 day ago

The web app should be responsible for persisting the Race record to the database. The background (sidekiq) process should only be scheduled when the visualisation has loaded.

willnotwish commented 1 day ago

The visualisation (actually races#show) is responsible for starting the race. There should be a button for this purpose. It makes a XHR request to the server.

willnotwish commented 1 day ago

We need a new business transaction to start the race.