Slide 1

Slide 1 text

Railway Flow Based Programming @matyo91 25-03-2021 In PHP

Slide 2

Slide 2 text

25-03-2021 @matyo91 Why ?

Slide 3

Slide 3 text

Flow Based Programming @matyo91 Basic concepts 25-03-2021

Slide 4

Slide 4 text

@matyo91 25-03-2021 Programming Paradigm

Slide 5

Slide 5 text

@matyo91 25-03-2021 Express a problem in terms of transforms on streams of data

Slide 6

Slide 6 text

Two layers in FBP application @matyo91 @matyo91 25-03-2021 Botton layer : « business logic » Top Layer : « communication logic »

Slide 7

Slide 7 text

Advantages @matyo91 @matyo91 25-03-2021

Slide 8

Slide 8 text

Railway Oriented Programming @matyo91 Design pattern 25-03-2021

Slide 9

Slide 9 text

Request : (userId, name, email) Name is blank, email is not valid User DB not found Authorization error Timeout Exemple @matyo91 Receive request Validate and canonicalize request Update existing user record Send verification email Return result to user 25-03-2021

Slide 10

Slide 10 text

@matyo91 25-03-2021

Slide 11

Slide 11 text

@matyo91 25-03-2021

Slide 12

Slide 12 text

Functional approach for managing errors @matyo91 25-03-2021

Slide 13

Slide 13 text

Railway Flow Based Programming @matyo91 Introduction 25-03-2021

Slide 14

Slide 14 text

@matyo91 AddOne MulByTwo MinusThree 25-03-2021

Slide 15

Slide 15 text

@matyo91 addOne MulByTwo MinusThree Supervisor Producer Consumer Error 25-03-2021

Slide 16

Slide 16 text

@matyo91 AddOne MulByTwo MinusThree Producer Consumer Client 25-03-2021 Supervisor IP {number:3} IP {number:3} IP {number:4} IP {number:5} IP {number:5} IP {number:8}

Slide 17

Slide 17 text

@matyo91 Producer Consumer Client Client Client Rails 25-03-2021 Supervisor IP IP IP IP IP IP IP IP

Slide 18

Slide 18 text

@matyo91 AddOne MulByTwo MinusThree Producer Consumer Error MulByTwo MulByTwo MinusThree Error 25-03-2021

Slide 19

Slide 19 text

Implementation @matyo91 PHP 25-03-2021

Slide 20

Slide 20 text

Symfony Messenger @matyo91 @matyo91 25-03-2021

Slide 21

Slide 21 text

Supervisor Symfony Messenger @matyo91 @matyo91 25-03-2021 Client IP IP IP IP Rails & Error Consumer Producer

Slide 22

Slide 22 text

Asynchron @matyo91 @matyo91 25-03-2021

Slide 23

Slide 23 text

Demo @matyo91 25-03-2021 PHP 
 https://github.com/darkwood-fr/railway-fbp 
 Elixir https://github.com/antonmi/flowex

Slide 24

Slide 24 text

Hello! I Am Mathieu Ledru You can contact me at @matyo91 @matyo91 Thanks! Any questions? 25-03-2021