Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Scaling Shiny apps to 700 users at EARL London_2017

187 views

Published on

In this talk, shared our experience from a real-life case study of building an app used daily by 700 users where our data science team tackled all these problems. This, to our knowledge, was one of the biggest production deployments of a Shiny App.

We showed an innovative approach to building a beautiful and flexible Shiny UI using shiny.semantic package (an alternative to standard Bootstrap). Furthermore, we talked about the non-standard optimization tricks we implemented to gain performance. Then we discussed challenges regarding complex reactivity and offer solutions. We went through implementation and deployment process of the app using a load balancer. Finally, we presented the application and give details on how this benefited our client.
blogposts: https://appsilon.com/our-experience-at-earl-london-2017/
https://appsilon.com/how-we-built-a-shiny-app-for-700-users/

If you need any support on R Shiny apps please contact us at https://appsilon.com

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Scaling Shiny apps to 700 users at EARL London_2017

  1. 1. 1 EARL 2017 London How we built a Shiny App for 700 users
  2. 2. Key Account Manager Konrad Pabianczyk Passionate about Data Science and unique applications Focused on creating value, not clutter
  3. 3. Finance and Insurance
  4. 4. 5
  5. 5. 6 Healthcare
  6. 6. 7 Source: https://gallery.shinyapps.io/genome
  7. 7. 8 Sales and Retail
  8. 8. 9
  9. 9. 10 Appsilon Stack END 2 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
  10. 10. 11 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 Appsilon Stack END 2 END SOLUTION
  11. 11. 12 Case Study: SCALING SHINY APPS TO 700 USERS
  12. 12. 13 “It took us one month to get from sketch to a working application”. John Dannberg, The Boston Consulting Group
  13. 13. 14 CHALLENGES SCALE UI UX
  14. 14. SCALE UP
  15. 15. 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 workload distribution across multiple servers LOAD BALANCER AUTH
  16. 16. 17 Prox y Container NGINX Shiny Authorizatio n Container NGINX Shiny Container NGINX Shiny COMPATIBLE WITH: On- Premise Our Architecture
  17. 17. 18 BEAUTIFUL UI
  18. 18. 19
  19. 19. USER INTERFACE using shiny.semantic Package: shiny.semantic - http://appsilon.github.io/shiny.semantic What is it? ● R package available on CRAN and GH ● alternative to currently available Bootstrap ● domain specific language wrapping HTML tags install.packages(‘shiny.semantic’) devtools::install_github(‘Appsilon/shiny.semantic’)
  20. 20. 21 USER INTERFACE 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. CUSTOMIZABLE We were able to deliver results at the same pace or faster as with standard shiny components. NO OVERHEAD UI LOOKS GREAT CUSTOM FAST
  21. 21. 22 USER EXPERIENCE
  22. 22. 23 User Experience Rendering plotly charts only when 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 to an app significantly improves the user and development experience ROUTING We have managed to achieve 20x speedups in Shiny app lookups INDEX DATA SETS
  23. 23. 24 What’s next? shiny.i18n internationalization
  24. 24. QUESTIONS? @itsjustkonrad konrad.pabianczyk@appsilondatascience.com appsilondatascience.com

×