$30 off During Our Annual Pro Sale. View Details »

PHP Railway Flow Based Programming

PHP Railway Flow Based Programming

This talk is about Railway Flow Based Programming based from the work of Anton Mishchuk


Here we present the concept and show an implementation in PHP

Source code associated to this talk


Article associated to this talk


Video associated to this talk


Mathieu Ledru

March 25, 2021

More Decks by Mathieu Ledru

Other Decks in Programming


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

  2. 25-03-2021 @matyo91 Why ?

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

  4. @matyo91 25-03-2021 Programming Paradigm

  5. @matyo91 25-03-2021 Express a problem in terms of transforms on

    streams of data
  6. Two layers in FBP application @matyo91 @matyo91 25-03-2021 Botton layer

    : « business logic » Top Layer : « communication logic »
  7. Advantages @matyo91 @matyo91 25-03-2021

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

  9. 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
  10. @matyo91 25-03-2021

  11. @matyo91 25-03-2021

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

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

  14. @matyo91 AddOne MulByTwo MinusThree 25-03-2021

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

  16. @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}
  17. @matyo91 Producer Consumer Client Client Client Rails 25-03-2021 Supervisor IP

  18. @matyo91 AddOne MulByTwo MinusThree Producer Consumer Error MulByTwo MulByTwo MinusThree

    Error 25-03-2021
  19. Implementation @matyo91 PHP 25-03-2021

  20. Symfony Messenger @matyo91 @matyo91 25-03-2021

  21. Supervisor Symfony Messenger @matyo91 @matyo91 25-03-2021 Client IP IP IP

    IP Rails & Error Consumer Producer
  22. Asynchron @matyo91 @matyo91 25-03-2021

  23. Demo @matyo91 25-03-2021 PHP 
 Elixir https://github.com/antonmi/flowex

  24. Hello! I Am Mathieu Ledru You can contact me at

    @matyo91 @matyo91 Thanks! Any questions? 25-03-2021