Workshop · 122 min · Available now · Production & Deployment
Keep a shared Shiny app responsive for everyone while one user's long query runs.
An agent can write the workflow. This workshop is about what happens at three in the morning when it fails.
A working app where a nine-second query no longer freezes the staff, with the pattern isolated so you can apply it to your own.
Both demos replay timings measured by running the workshop's code. Nothing is sent anywhere and nothing loads from another site.
Press Load race weekend for any of the three users and watch the clocks. Then switch to six workers and do it again.
Interactive timeline not loading? One load of the hub takes 21.2 s. With one R process, three users who click 3 s apart get their data 21.2 s, 39.5 s and 57.7 s after they click, and every clock freezes for 63.7 s. With ExtendedTask and six workers, each gets their data 21.2 s after their own click, and no clock freezes.
Move the worker slider from 1 to 8 and compare the two versions of the workshop's code.
Interactive chart not loading? Measured with six workers: 7.1 s with lapply on one worker (03_parallel.R), 5.0 s with mirai_map() (04_mirai_map.R), 2.1 s saved. With one worker they take 21.2 s and 21.3 s: mirai_map() needs free workers.
# Start background R processes. A worker is a fresh R session, so load the
# fetch functions on each one.
# Each running app keeps 6 extra R processes: stop it before starting the next.
daemons(6)
everywhere(source(here::here("data", "pitwall", "fetch.R")))
onStop(function() daemons(0)) # fetch_hub() is defined in this script, not in fetch.R, so the worker
# doesn't have it. Send it along with the call in .args.
hub_task <- ExtendedTask$new(function() {
mirai(fetch_hub(), .args = list(fetch_hub = fetch_hub))
}) |>
bind_task_button("go")
observe({
hub_task$invoke()
}) |>
bindEvent(input$go) # One fetch_laps() call per driver, spread over the workers. .args are
# passed to every call.
laps_task <- ExtendedTask$new(function(key, drivers) {
mirai_map(drivers, fetch_laps, .args = list(session_key = key))
}) # .timeout is in milliseconds. When it runs out, the task fails.
standings_task <- ExtendedTask$new(function(timeout) {
mirai(fetch_standings(), .timeout = timeout)
})
Lesson 1: The Plan and the F1 Hub App 7:09

Async Is Not Parallel 1:13

The Number One Async Mistake 0:33

Total Time Is the Slowest Task 0:33
The artifact. A working app where a nine-second query no longer freezes the staff, with the pattern isolated so you can apply it to your own.

The chart on this page, drawn by code you can edit. R runs on webR and Python on Pyodide; nothing loads until you press Run, and nothing you type leaves the page.
Edit me: Move the window, or change the metric to runs_scored and run again.
Data: Season game log (game_log.csv). Simulated for practice by AthlyticZ (agents/sim_data.py, seed 20261109). License CC BY 4.0.
The code runs in your browser on webR or Pyodide; nothing you type leaves the page.
Director @ Hypebright B.V.
Teaches the method the way it is used in the role above. The team page lists everything they teach here.
Also teaches ProductioniZing Shiny Applications, Mobile StructureZ, CustomiZing WidgetZ, The No-Look Pass.
Veerle Eeftink-van Leemput is Director at Hypebright B.V. Veerle's work here sits in Production & Deployment and Apps & Dashboards. On AthlyticZ, Veerle teaches The Pit Stop, ProductioniZing Shiny Applications, Mobile StructureZ, CustomiZing WidgetZ, The No-Look Pass and The Farm System.
Refunds. If you bought it and it is the wrong one for you, write to michael@athlyticz.com and a person will answer.
Built for someone who already writes code in the session's language and wants the method, not the syntax. If the outcome line at the top reads like something you could use next week, it is pitched right. If it reads like a different job, start with the courses on /browse.
The full recording, yours to keep: buy once, watch any time. Masterclass subscribers get every live session for a year and can watch every recorded session for as long as they are a member. Everyone else can buy a recording on its own.
No. The recording plays in the browser.
Twenty minutes on a call before you buy costs nothing, and the call is the fastest way to tell. If you bought it and it is the wrong one for you, email michael@athlyticz.com and a person will answer.
The Masterclass is all of it, live and recorded, for $1,899 a year, or $199 a month. Paid by the month, it renews monthly at $199, cancel any time by replying to your receipt.
Every live session this year, and every recording.
Join the MasterclassLoading the calendar.
The calendar did not load here. Open it on Calendly.
Confirmed
Calendly has sent the invitation to your inbox, with the link for the call. Michael will see you then.
We've teamed up with AthlyticZ to supercharge how we use data science and statistics to impact our sports. More clarity in the numbers means bigger results for our athletes.
AthlyticZ has completely transformed the learning approach to data science through the use of sports-based problems. The instructors are the best of the best, and the practical projects have immediate impact to students.
The sports industry moves fast. Managing the pace of evolving technology, data, and AI isn't optional - it's imperative. Our Analytics team was looking for a partner to meet us where we are, to help us in the continued investment of our people and capabilities without pulling us away from the work that matters. AthlyticZ delivers exactly that: a structured, practitioner-led platform that fits how modern sports analytics groups actually operate.

