Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The R in Production Handoff: Building bridges from data science to IT

kellobri
September 11, 2019

The R in Production Handoff: Building bridges from data science to IT

EARL London 2019

kellobri

September 11, 2019
Tweet

More Decks by kellobri

Other Decks in Technology

Transcript

  1. The R in Production Handoff: Building bridges from data science

    to IT RStudio Solutions Engineering Kelly @kellrstats
  2. Production is... CUSTOMER/USER FACING - Ready to use - Software

    that end users are using - An app that is live and available to the end user - Apps on our production server are available to our clients - Client facing Credibility AT SCALE - Scaled to a larger audience - Bulletproof, scalable, fails predictably - Live to 1000 of users with production vehicle data SERVICE LEVEL AGREEMENTS - Required for mission-critical operations; downtime affects the ability to serve customers - Deployed for end users to have continual access without performance issues ENVIRONMENTAL REQUIREMENTS - An area where validated applications are deployed in a locked down environment - The main part of a company that handles all process - Application or system operates effectively without much maintaining effects - A server or environment that runs the “final” applications that your ultimate end-users (often external customers) use to get stuff down DOCUMENTATION - TESTING & MONITORING - Creating apps that can reach a wider audience and are deployed/tested in a consistent manner - Running in a way that is stable to use, documented and monitored
  3. Start by answering some questions… - What is a Shiny

    Application? - Who is the audience? - What is your service level agreement definition? (SLA) - What does your analytic architecture look like today? - What are your goals for evolving this architecture? - How will monitoring be handled? - Who is responsible for maintenance? Make work visible, Define shared goals, Build a checklist, Iterate Empathetic Communication is Challenging Code Profiling Version Control Testing Deployment/Release Access/Security Performance Tuning
  4. What happens when... Industrial Research Business Management Human Resources Government

    Work Regulated Environments Big Data Applications Cloud Infrastructure R in Production What is there to learn? What are the needs? What can we build? The R for Data Science Workflow Drops in Solutions Engineers!
  5. Building Bridges with Existing Solutions Push-button Deployment Alternatives: - Content

    Management API - Bundle Promotion API - Git-Backed Deploys - CI/CD Visit solutions.rstudio.com for more information!
  6. Scaling and Performance Tuning in RStudio Connect RStudio Connect is

    built to scale content. Publishers and administrators have access to runtime settings to help tune and scale their applications and APIs. The scheduling parameters tell RStudio Connect to act somewhere in between Scenario A and Scenario B, to maximize the trade-off between app responsiveness and memory consumption/load time. Max processes - Determines the maximum number of processes that will be created. Max connections per process - The maximum number of connections per process.
  7. • IT/Ops doesn’t want to interact with a GUI to

    manage scaling and performance tuning. • Applications silently refusing requested connections makes IT/Ops nervous!
  8. Instrumentation API RStudio Connect records different types of user activity

    for different types of content. 1. Shiny applications - records information about each visit and the length of that visit. 2. Static and rendered content - records information about each visit. github.com/sol-eng/connect-usage Code examples showing how to access the instrumentation data are in the User Activity recipes within the RStudio Connect API Cookbook.
  9. Drill Down on Shiny Sessions Over Time for a Single

    Shiny Application of Interest Goal: Build the ultimate dashboard for your IT hand-off gift basket Building Bridges with Custom Solutions
  10. Benefits of R Markdown over Shiny - Scheduling - History

    - Email Notifications! (For this dashboard project!)
  11. Gauge Widget for Tracking Concurrent Sessions Visualize session duration Use

    lubridate to calculate overlapping time intervals for counting session concurrency Custom Email!
  12. Suppress Email Send only if concurrent connections exceeds your warning

    buffer threshold Icing on the Cake: Update the runtime settings programmatically RStudio Connect Content Management API
  13. Production Building Blocks Code Profiling Version Control Testing Deployment/Release Access/Security

    Performance Tuning bit.ly/shiny-prod-book RStudio Conf Keynote 2019