diff --git a/.nojekyll b/.nojekyll index 2be9a2f..c439b29 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -667c3a7a \ No newline at end of file +cd21a8f1 \ No newline at end of file diff --git a/materials/d1-03-performance/codealong-2.html b/materials/d1-03-performance/codealong-2.html index 3c24d14..5360f85 100644 --- a/materials/d1-03-performance/codealong-2.html +++ b/materials/d1-03-performance/codealong-2.html @@ -154,7 +154,8 @@

On this page

@@ -181,6 +182,10 @@

Asynchronous Processing of LEGO Model Prediction

+
+

Access Instructions

+

The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called Performance Code-along 2.

+

Requirements

The current version of our Shiny application contains a module for generating predictions of the number of LEGO parts in a set using the number of unique colors and number of unique part categories. The API is executed and processed using the {httr2} package. Here is the function wrapping the API execution:

diff --git a/materials/d1-03-performance/ex-1.html b/materials/d1-03-performance/ex-1.html index b290bff..40139a1 100644 --- a/materials/d1-03-performance/ex-1.html +++ b/materials/d1-03-performance/ex-1.html @@ -183,7 +183,7 @@

Profile the LEGO Bricks App

Access Instructions

-

The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called performance-exercise1.

+

The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called Performance Exercise 1.

Setup

diff --git a/materials/d1-04-loadtesting/index.html b/materials/d1-04-loadtesting/index.html index fb2dd8c..6acb50c 100644 --- a/materials/d1-04-loadtesting/index.html +++ b/materials/d1-04-loadtesting/index.html @@ -483,7 +483,7 @@

The log

{"type":"WS_CLOSE","begin":"2023-09-07T13:04:35.561Z"}
-
+
diff --git a/schedule.html b/schedule.html index 3125537..caa5254 100644 --- a/schedule.html +++ b/schedule.html @@ -190,7 +190,7 @@

Workshop Schedule

- + 9:00 - 9:30 @@ -198,7 +198,7 @@

Workshop Schedule

Welcome & Setup - + 9:30 - 10:30 @@ -206,7 +206,7 @@

Workshop Schedule

Application Structure - + 10:30 - 11:00 @@ -214,7 +214,7 @@

Workshop Schedule

Coffee & refreshments break - + 11:00 - 12:30 @@ -222,7 +222,7 @@

Workshop Schedule

Performance - + 12:30 - 13:30 @@ -230,7 +230,7 @@

Workshop Schedule

Lunch break - + 13:30 - 15:00 @@ -238,7 +238,7 @@

Workshop Schedule

Load Testing - + 15:00 - 15:30 @@ -246,7 +246,7 @@

Workshop Schedule

Coffee & refreshments break - + 15:30 - 17:00 diff --git a/search.json b/search.json index bd93c1d..d3939f3 100644 --- a/search.json +++ b/search.json @@ -25,14 +25,14 @@ "href": "materials/d1-03-performance/ex-1.html", "title": "Profile the LEGO Bricks App", "section": "", - "text": "The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called performance-exercise1." + "text": "The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called Performance Exercise 1." }, { "objectID": "materials/d1-03-performance/ex-1.html#access-instructions", "href": "materials/d1-03-performance/ex-1.html#access-instructions", "title": "Profile the LEGO Bricks App", "section": "", - "text": "The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called performance-exercise1." + "text": "The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called Performance Exercise 1." }, { "objectID": "materials/d1-03-performance/ex-1.html#setup", @@ -858,14 +858,21 @@ "href": "materials/d1-03-performance/codealong-2.html", "title": "Asynchronous Processing of LEGO Model Prediction", "section": "", - "text": "The current version of our Shiny application contains a module for generating predictions of the number of LEGO parts in a set using the number of unique colors and number of unique part categories. The API is executed and processed using the {httr2} package. Here is the function wrapping the API execution:\n\n#' @importFrom httr2 request req_body_json req_perform resp_body_json\nrun_prediction <- function(df, endpoint_url, back_transform = TRUE, round_result = TRUE) {\n # create request object\n req <- request(endpoint_url)\n\n # perform request\n resp <- req |>\n req_body_json(df) |>\n req_perform()\n\n # extract predictions from response\n pred_values <- resp_body_json(resp)$.pred |> unlist()\n\n # back-transform log10 value of predicted number of parts if requested\n if (back_transform) {\n pred_values <- 10 ^ pred_values\n }\n\n # round result up to nearest integer if requested\n if (round_result) pred_values <- ceiling(pred_values)\n\n # append predictions to supplied data frame\n dplyr::mutate(df, predicted_num_parts = pred_values)\n}\n\nUnfortunately, the prediction API call takes a bit of time to execute due to some extremely sophisticated processing 😅. As a result, any interactions within the application will not be processed until the prediction call completes. Our goal is to convert the prediction processing from synchronous to asynchronous using {crew}" + "text": "The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called Performance Code-along 2." + }, + { + "objectID": "materials/d1-03-performance/codealong-2.html#access-instructions", + "href": "materials/d1-03-performance/codealong-2.html#access-instructions", + "title": "Asynchronous Processing of LEGO Model Prediction", + "section": "", + "text": "The project used for this particular exercise is hosted on Posit Cloud in this space. The project for this exercise is called Performance Code-along 2." }, { "objectID": "materials/d1-03-performance/codealong-2.html#requirements", "href": "materials/d1-03-performance/codealong-2.html#requirements", "title": "Asynchronous Processing of LEGO Model Prediction", - "section": "", - "text": "The current version of our Shiny application contains a module for generating predictions of the number of LEGO parts in a set using the number of unique colors and number of unique part categories. The API is executed and processed using the {httr2} package. Here is the function wrapping the API execution:\n\n#' @importFrom httr2 request req_body_json req_perform resp_body_json\nrun_prediction <- function(df, endpoint_url, back_transform = TRUE, round_result = TRUE) {\n # create request object\n req <- request(endpoint_url)\n\n # perform request\n resp <- req |>\n req_body_json(df) |>\n req_perform()\n\n # extract predictions from response\n pred_values <- resp_body_json(resp)$.pred |> unlist()\n\n # back-transform log10 value of predicted number of parts if requested\n if (back_transform) {\n pred_values <- 10 ^ pred_values\n }\n\n # round result up to nearest integer if requested\n if (round_result) pred_values <- ceiling(pred_values)\n\n # append predictions to supplied data frame\n dplyr::mutate(df, predicted_num_parts = pred_values)\n}\n\nUnfortunately, the prediction API call takes a bit of time to execute due to some extremely sophisticated processing 😅. As a result, any interactions within the application will not be processed until the prediction call completes. Our goal is to convert the prediction processing from synchronous to asynchronous using {crew}" + "section": "Requirements", + "text": "Requirements\nThe current version of our Shiny application contains a module for generating predictions of the number of LEGO parts in a set using the number of unique colors and number of unique part categories. The API is executed and processed using the {httr2} package. Here is the function wrapping the API execution:\n\n#' @importFrom httr2 request req_body_json req_perform resp_body_json\nrun_prediction <- function(df, endpoint_url, back_transform = TRUE, round_result = TRUE) {\n # create request object\n req <- request(endpoint_url)\n\n # perform request\n resp <- req |>\n req_body_json(df) |>\n req_perform()\n\n # extract predictions from response\n pred_values <- resp_body_json(resp)$.pred |> unlist()\n\n # back-transform log10 value of predicted number of parts if requested\n if (back_transform) {\n pred_values <- 10 ^ pred_values\n }\n\n # round result up to nearest integer if requested\n if (round_result) pred_values <- ceiling(pred_values)\n\n # append predictions to supplied data frame\n dplyr::mutate(df, predicted_num_parts = pred_values)\n}\n\nUnfortunately, the prediction API call takes a bit of time to execute due to some extremely sophisticated processing 😅. As a result, any interactions within the application will not be processed until the prediction call completes. Our goal is to convert the prediction processing from synchronous to asynchronous using {crew}" }, { "objectID": "materials/d1-03-performance/codealong-2.html#plan", diff --git a/sitemap.xml b/sitemap.xml index 4e463c9..c928535 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,94 +2,94 @@ https://posit-conf-2023.github.io/shiny-r-prod/materials/d1-03-performance/codealong-1.html - 2023-09-18T13:29:40.624Z + 2023-09-18T13:42:41.012Z https://posit-conf-2023.github.io/shiny-r-prod/materials/d1-03-performance/ex-1.html - 2023-09-18T13:29:40.624Z + 2023-09-18T13:42:41.012Z https://posit-conf-2023.github.io/shiny-r-prod/materials/d1-02-structure/codealong-1.html - 2023-09-18T13:29:40.616Z + 2023-09-18T13:42:41.004Z https://posit-conf-2023.github.io/shiny-r-prod/materials/d1-02-structure/index.html - 2023-09-18T13:29:40.616Z + 2023-09-18T13:42:41.004Z https://posit-conf-2023.github.io/shiny-r-prod/materials/d1-05-deploy-admin/index.html - 2023-09-18T13:29:40.656Z + 2023-09-18T13:42:41.040Z https://posit-conf-2023.github.io/shiny-r-prod/materials/d1-01-welcome/index.html - 2023-09-18T13:29:40.596Z + 2023-09-18T13:42:40.988Z https://posit-conf-2023.github.io/shiny-r-prod/units/d1-04-loadtesting.html - 2023-09-18T13:29:40.696Z + 2023-09-18T13:42:41.076Z https://posit-conf-2023.github.io/shiny-r-prod/units/d1-03-performance.html - 2023-09-18T13:29:40.696Z + 2023-09-18T13:42:41.076Z https://posit-conf-2023.github.io/shiny-r-prod/units/d1-04b-break.html - 2023-09-18T13:29:40.696Z + 2023-09-18T13:42:41.076Z https://posit-conf-2023.github.io/shiny-r-prod/units/d1-02b-break.html - 2023-09-18T13:29:40.696Z + 2023-09-18T13:42:41.076Z https://posit-conf-2023.github.io/shiny-r-prod/schedule.html - 2023-09-18T13:29:40.692Z + 2023-09-18T13:42:41.072Z https://posit-conf-2023.github.io/shiny-r-prod/index.html - 2023-09-18T13:29:40.576Z + 2023-09-18T13:42:40.968Z https://posit-conf-2023.github.io/shiny-r-prod/LICENSE.html - 2023-09-18T13:29:40.512Z + 2023-09-18T13:42:40.908Z https://posit-conf-2023.github.io/shiny-r-prod/units/d1-03b-lunch.html - 2023-09-18T13:29:40.696Z + 2023-09-18T13:42:41.076Z https://posit-conf-2023.github.io/shiny-r-prod/units/d1-05-deploy-admin.html - 2023-09-18T13:29:40.696Z + 2023-09-18T13:42:41.076Z https://posit-conf-2023.github.io/shiny-r-prod/units/d1-02-structure.html - 2023-09-18T13:29:40.696Z + 2023-09-18T13:42:41.076Z https://posit-conf-2023.github.io/shiny-r-prod/units/d1-01-welcome.html - 2023-09-18T13:29:40.696Z + 2023-09-18T13:42:41.076Z https://posit-conf-2023.github.io/shiny-r-prod/setup.html - 2023-09-18T13:29:40.692Z + 2023-09-18T13:42:41.072Z https://posit-conf-2023.github.io/shiny-r-prod/materials/d1-04-loadtesting/index.html - 2023-09-18T13:29:40.636Z + 2023-09-18T13:42:41.024Z https://posit-conf-2023.github.io/shiny-r-prod/materials/setup-resources/index.html - 2023-09-18T13:29:40.692Z + 2023-09-18T13:42:41.072Z https://posit-conf-2023.github.io/shiny-r-prod/materials/d1-02-structure/ex-1.html - 2023-09-18T13:29:40.616Z + 2023-09-18T13:42:41.004Z https://posit-conf-2023.github.io/shiny-r-prod/materials/d1-03-performance/index.html - 2023-09-18T13:29:40.624Z + 2023-09-18T13:42:41.012Z https://posit-conf-2023.github.io/shiny-r-prod/materials/d1-03-performance/codealong-2.html - 2023-09-18T13:29:40.624Z + 2023-09-18T13:42:41.012Z diff --git a/units/d1-02-structure.html b/units/d1-02-structure.html index 860debc..a94b667 100644 --- a/units/d1-02-structure.html +++ b/units/d1-02-structure.html @@ -240,7 +240,7 @@

Code-Along Examples - + Modules for LEGO attribute selections @@ -264,7 +264,7 @@

Exercises

- + Value Metrics Module diff --git a/units/d1-03-performance.html b/units/d1-03-performance.html index 539d798..544a967 100644 --- a/units/d1-03-performance.html +++ b/units/d1-03-performance.html @@ -240,7 +240,7 @@

Slides

- + Profile the LEGO Bricks App @@ -260,12 +260,12 @@

Slides

- + Using .parquet files in Shiny - + Asynchronous Processing of LEGO Model Prediction