scaling shiny apps - earl 2017 san francisco
TRANSCRIPT
![Page 1: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/1.jpg)
1
EARL 2017 SF
How we built a Shiny App for 700 users
![Page 2: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/2.jpg)
CEOFilip Stachura
Passionate about Data Analysis and Visualisation
Contributor to R and Shiny community
![Page 3: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/3.jpg)
![Page 4: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/4.jpg)
4
“It took us one month to get from sketch to
a working application”.
John Dannberg, The Boston Consulting Group
![Page 5: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/5.jpg)
5
Facebook made spreadsheet UI passé. Nowadays business's expect better design and experience.
USER EXPERIENCE
This approach delivers superior resultscompared to pure machine learning models and well beyond manual work.
BLENDING HUMAN KNOWLEDGE WITH ML
The shiny.collections package allows us to build distributed R apps with realtime collaboration in mind.
INTRODUCTION OF SHINY.SEMANTIC
EARL 2016 Boston
![Page 6: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/6.jpg)
6
6 MONTHS
![Page 7: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/7.jpg)
7
6 MONTHS
Dozens of advanced Shiny dashboards.
![Page 8: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/8.jpg)
PREDICTINGSUPPLY AND
DEMAND
![Page 9: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/9.jpg)
9
MARITIMEOPTIMISATION
![Page 10: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/10.jpg)
10
MARGINMAXIMISATION
![Page 11: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/11.jpg)
11 Appsilon Stack
END-TO-END SOLUTION
Allows for training and validating
models and running them in the
production environment.
PLATFORM
This can be an API or a Shiny
dashboard. Interactive dashboards
are a perfect decision support
systems.
INTERFACE
The initial part of each project
starts with data. Make sure not to
put garbage into your models.
DATA ACQUISITION
Models are a crucial element of the data science process. They range from linear models, up to deep learning model.
MODELS
![Page 12: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/12.jpg)
12 Appsilon Stack
END-TO-END SOLUTION
Allows for training and validating
models and running them in the
production environment.
PLATFORM
This can be an API or a Shiny
dashboard. Interactive dashboards
are a perfect decision support
systems.
INTERFACE
The initial part of each project
starts with data. Make sure not to
put garbage into your models.
DATA ACQUISITION
Models are a crucial element of the data science process. They range from linear models, up to deep learning model.
MODELS
![Page 13: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/13.jpg)
13
Case Study:SCALING SHINY APPS TO 700 USERS
![Page 14: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/14.jpg)
14 CHALLENGES
UI UX SCALE
![Page 15: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/15.jpg)
15
BEAUTIFULUI
![Page 16: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/16.jpg)
16
![Page 17: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/17.jpg)
17
![Page 18: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/18.jpg)
18 USER INTERFACE
USING SHINY.SEMANTIC
Our clients were so happy with the
prototype design they’ve decided to skip the
designing phase of the project.
SKIP GRAPHIC DESIGN
Using shiny.semantic makes it is easy to deliver advanced components not available in the Shiny base.
HIGHLY CUSTOMIZABLE
We were able to deliver results at the same
pace or faster as with standard shiny
components.
NO OVERHEAD
UI GREATLOOK
CUSTOM
FAST
![Page 19: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/19.jpg)
19
USER EXPERIENCE
![Page 20: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/20.jpg)
20 LESSONS LEARNED
USER EXPERIENCE
Rendering plotly charts onlywhen the plot is visible
saved precious resources
LAZY RENDERING
Reactivity is great, but
sometimes it just makes
sense to get away
(NON-)REACTIVE
Adding a front end router toan app significantly improves
the user and development experience
ROUTING
We have managed to achieve
20x speedups in Shiny app
lookups
INDEX DATA SETS
![Page 21: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/21.jpg)
SCALE UP
![Page 22: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/22.jpg)
SUCCESSFUL SCALING
CONTAINERS
Each Shiny Server has the same
configuration, and we run the
same app in each container
We move authorization to
a separate layer of our
stack
Improves the distribution of
workloads across multiple
servers
LOADBALANCER
AUTH
![Page 23: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/23.jpg)
23
Proxy
Container
NGINX Shiny
Authorization
Container
NGINX Shiny
Container
NGINX Shiny
COMPATIBLE WITH:
On-Premise
OurArchitecture
![Page 24: Scaling Shiny Apps - EARL 2017 San Francisco](https://reader035.vdocument.in/reader035/viewer/2022062523/5a64d3397f8b9ac86f8b4b2d/html5/thumbnails/24.jpg)
24
DEMO