Slide 1

Slide 1 text

1 1 PROD IS NOT A FOUR-LETTER WORD How to confidently send R to produc2on. COLIN FAY

Slide 2

Slide 2 text

2 2 Colin FAY Data Scien*st & R-Hacker at ThinkR, a french company focused on Data Science & R Engineering. Hyperac*ve open source developer. > whoami h"p://rtask.thinkr.fr h"p://twi"er.com/_colinfay h"p://github.com/colinfay

Slide 3

Slide 3 text

3 1 2 3 R & DATA SCIENCE ENGINEERING TRAINING CONSUL TING

Slide 4

Slide 4 text

4 1 PROD IS NOT A FOUR-LETTER WORD How to confidently send R to production.

Slide 5

Slide 5 text

5 What are we going to talk about today?

Slide 6

Slide 6 text

6 01. What does production even mean? 02. About R in production 03. Let’s talk about tools 04. R in production, the challenges SCHEDULE

Slide 7

Slide 7 text

7 Q & A Have you ever heard? "That's good that we have this prototype in R, now let's rewrite this with a production language"

Slide 8

Slide 8 text

8 Q & A We’ve come to a point that we’ve heard this so much that we convinced ourselves that this is true.

Slide 9

Slide 9 text

9 All programming languages are basically just bundles of trade- offs, and so no single language is going to be globally superior to another. There really are no production languages – only production engineers. Gordon Shotwell https://blog.shotwell.ca/posts/why_i_use_r/

Slide 10

Slide 10 text

10 10 THEY USE R IN PROD https://github.com/ThinkR-open/companies-using-r

Slide 11

Slide 11 text

11 1 DON’T TELL ME R IS NOT PRODUCTION READY

Slide 12

Slide 12 text

12 01 DID YOU SAY ‘PRODUCTION’? 12

Slide 13

Slide 13 text

13 Gordon Shotwell https://twitter.com/jdetle

Slide 14

Slide 14 text

14 14 Production is anything that is run repeatedly (or continuously) and is relied upon. Mark Sellors Software environments that are used and relied on by real users with real consequences if things go wrong Joe Cheng

Slide 15

Slide 15 text

15 Gordon Shotwell https://twitter.com/ProbNotABot

Slide 16

Slide 16 text

16 THE PRODUCT USER(S) THE PRODUCT ENGINEER(S) USERS

Slide 17

Slide 17 text

17 IS USED IN PROD

Slide 18

Slide 18 text

18 https://twitter.com/eprosenthal

Slide 19

Slide 19 text

19 IS RELIED UPON IS USED IN PROD

Slide 20

Slide 20 text

20 https://twitter.com/dierken

Slide 21

Slide 21 text

21 21 USERS TRUST THE SOFT TO BE AVAILABLE TO MAKE DECISION # TO DO THEIR DAILY JOB

Slide 22

Slide 22 text

22 22 DEV TRUST THE SOFT $ TO KEEP RUNNING TO BE BUG FREE TO BE CUSTOMISABLE TO BE SAFE TO UPDATE

Slide 23

Slide 23 text

23 IS RELIED UPON HAS REAL LIFE IMPACT IS USED IN PROD

Slide 24

Slide 24 text

24 https://twitter.com/seanjtaylor

Slide 25

Slide 25 text

25 25 WHAT CAN GO WRONG ❌ SOFTWARE IS UNAVAILABLE UPDATE BREAKS THE CODE-BASE UPDATE BREAKS ANOTHER SERVICE RESULTS ARE NOT RELIABLE

Slide 26

Slide 26 text

26 26 REAL LIFE IMPACT ℹ DATA LOSS MONEY LOSS ⏳ TIME LOSS BAD DECISIONS

Slide 27

Slide 27 text

27 1 > PRODUCTION_TOOLS == RELIABLE_TOOLS [1] TRUE

Slide 28

Slide 28 text

28 02 ABOUT R AND PRODUCTION 28

Slide 29

Slide 29 text

29 Q & A How many ways are there to build a package in R?

Slide 30

Slide 30 text

30 30 BUILDING RELIABLE TOOLS RELY ON FRAMEWORKS ☸ DON’T REINVENT THE WHEEL 3 TUTORIALS ARE EVERYWHERE COMMENT, TEST, AND MONITOR

Slide 31

Slide 31 text

31 1 CONVENTIONS ARE AWESOME (And so is the R community)

Slide 32

Slide 32 text

32 03 LET’S TALK ABOUT TOOLS 32

Slide 33

Slide 33 text

33 R PACKAGES MAIN GOAL IS TO BE SHARED AND REUSED YEARS OF TOOLKITS ☄ JUST A LIBRARY() AWAY

Slide 34

Slide 34 text

34 34 DEVELOP AUTOMATE DOCUMENT : TEST

Slide 35

Slide 35 text

35 h"ps://www.golemverse.org/ SHINY APPS WITH {GOLEM} FRAMEWORK AUTOMATION COLLECTIVE INTELLIGENCE

Slide 36

Slide 36 text

36 https://cran.r-project.org/package=golem

Slide 37

Slide 37 text

37 37 DEPLOY RSTUDIO DOCKER / KUBE AWS

Slide 38

Slide 38 text

38 04 R IN PRODUCTION THE CHALLENGES 38

Slide 39

Slide 39 text

39 NOT THE LANGUAGE NOT THE TOOLS CHALLENGES

Slide 40

Slide 40 text

40 CUL TURAL ORGANISATIONAL CHALLENGES

Slide 41

Slide 41 text

41 https://twitter.com/seanjtaylor

Slide 42

Slide 42 text

42 Q & A Who has ever experienced? "Woaw, your PoC is awesome, let’s put that on the production server and give access to 100 users!"

Slide 43

Slide 43 text

43 The good thing about R is that one can start using it and get results in a couple of hours. The bad thing about R is that one can start using it and get results in a couple of hours. R DEV

Slide 44

Slide 44 text

44 R developers don’t learn R as software engineers. R developers don’t know what’s needed for productions. IT might not be receptive. R DEV

Slide 45

Slide 45 text

45 45 ADOPT A PROD MINDSET NO MORE “THAT WORKS ON MY MACHINE” EVERYTHING IS A PACKAGE : TEST AND DOCUMENT ⚖ DON’T START WITH TECHNICAL DEBT

Slide 46

Slide 46 text

46 46 IT ARE YOUR FRIENDS INFRASTRUCTURE IS CRUCIAL ✍ RELIABLE CODE MATTERS ADOPT A PROD MINDSET

Slide 47

Slide 47 text

47 1 YOU CAN BE A GOOD SOFTWARE ENGINEER

Slide 48

Slide 48 text

48 1 R WORKS IN PRODUCTION

Slide 49

Slide 49 text

49 49 Questions? COLIN@THINKR.FR HTTPS://TWITTER.COM/_COLINFAY HTTPS://TWITTER.COM/THINKR_FR HTTPS://RTASK.THINKR.FR HTTPS://COLINFAY.ME THANK YOU!