Scaling Shiny Apps - EARL 2017 San Francisco

Post on 22-Jan-2018

393 views 0 download

Transcript of Scaling Shiny Apps - EARL 2017 San Francisco

1

EARL 2017 SF

How we built a Shiny App for 700 users

CEOFilip Stachura

Passionate about Data Analysis and Visualisation

Contributor to R and Shiny community

 

4

“It took us one month to get from sketch to

a working application”.

John Dannberg, The Boston Consulting Group

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

6

6 MONTHS

7

6 MONTHS

Dozens of advanced Shiny dashboards.

PREDICTINGSUPPLY AND

DEMAND

9

MARITIMEOPTIMISATION

10

MARGINMAXIMISATION

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

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

13

Case Study:SCALING SHINY APPS TO 700 USERS

14 CHALLENGES

UI UX SCALE

15

BEAUTIFULUI

16

17

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

19

USER EXPERIENCE

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

SCALE UP

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

23

Proxy

Container

NGINX Shiny

Authorization

Container

NGINX Shiny

Container

NGINX Shiny

COMPATIBLE WITH:

On-Premise

OurArchitecture

24

DEMO

QUESTIONS?

filipstachura 

filip@appsilondatascience.com

appsilondatascience.com