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

How software can feed the World

How software can feed the World

Infarm is a FaaS, Farming as a Service, and whether you believe it or not, our business is in-house farming at scale.

We design and build our farms, grow vegetables and sell them, and the backbone of our infrastructure is based on Python and completely cloud based.

More than 10 million observations recorded from our farms, rapidly increasing given our expansion to new markets, feed our farm management system that allows the operators, plant scientists, and supervisors to monitor each farm in real-time.

During this talk I will introduce our IoT infrastructure, software architecture, how we use python and how we plan to improve the capabilities of our farms by adding edge machine learning.

barrachri

July 11, 2019
Tweet

More Decks by barrachri

Other Decks in Programming

Transcript

  1. @CHRISTIANBARRA // EUROPYTHON 2019
    HOW
    SOFTWARE
    CAN FEED
    THE WORLD

    View full-size slide

  2. @christianbarra
    CAN
    SOFTWARE
    FEED THE
    WORLD?

    View full-size slide

  3. @christianbarra
    WHY
    SHOULD WE
    BOTHER?

    View full-size slide

  4. @christianbarra
    PROBLEMS
    WE NEED TO MAKE CITIES
    MORE SUSTAINABLE
    WE NEED TO AVOID HUNGER
    WE CAN’T INCREASE
    CROPLANDS
    WE CAN’T TERRAFORM THE
    SEA

    View full-size slide

  5. @christianbarra
    PROBLEMS
    WE NEED TO MAKE CITIES
    MORE SUSTAINABLE
    WE NEED TO AVOID HUNGER
    WE CAN’T INCREASE
    CROPLANDS
    WE CAN’T TERRAFORM THE
    SEA

    View full-size slide

  6. @christianbarra
    PROBLEMS
    WE NEED TO MAKE CITIES
    MORE SUSTAINABLE
    WE NEED TO AVOID HUNGER
    WE CAN’T INCREASE
    CROPLANDS
    WE CAN’T TERRAFORM THE
    SEA

    View full-size slide

  7. @christianbarra
    SOLUTIONS
    REDUCE WASTE !
    CHANGE OUR DIET "
    USE TECHNOLOGY #

    View full-size slide

  8. @christianbarra
    SOLUTIONS
    REDUCE WASTE !
    CHANGE OUR DIET "
    USE TECHNOLOGY #

    View full-size slide

  9. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  10. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  11. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  12. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  13. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  14. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  15. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  16. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  17. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  18. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  19. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  20. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide

  21. @christianbarra
    PILLARS
    FARM CONTROL
    OPERATIONS
    MONITORING & ALERTING
    PLANTS QUALITY

    View full-size slide

  22. @christianbarra
    PILLARS
    FARM CONTROL
    OPERATIONS
    MONITORING & ALERTING
    PLANTS QUALITY

    View full-size slide

  23. @christianbarra
    PILLARS
    FARM CONTROL
    OPERATIONS
    MONITORING & ALERTING
    PLANTS QUALITY

    View full-size slide

  24. @christianbarra
    PILLARS
    FARM CONTROL
    OPERATIONS
    MONITORING & ALERTING
    PLANTS QUALITY

    View full-size slide

  25. @christianbarra
    PILLARS
    FARM CONTROL
    OPERATIONS
    MONITORING & ALERTING
    PLANTS QUALITY

    View full-size slide

  26. @christianbarra
    PILLARS
    FARM CONTROL
    OPERATIONS
    MONITORING & ALERTING
    PLANTS QUALITY

    View full-size slide

  27. @christianbarra
    1 BIG FLASK APP
    SMALL TEAM
    OPERATIONS & FARM CONTROL
    & MONITORING & ALERTING
    CELERY FOR BACKGROUND
    JOBS
    PAST
    SOFTWARE

    View full-size slide

  28. @christianbarra
    1 BIG FLASK APP
    SMALL TEAM
    OPERATIONS & FARM CONTROL
    & MONITORING & ALERTING
    CELERY FOR BACKGROUND
    JOBS
    PAST
    SOFTWARE

    View full-size slide

  29. @christianbarra
    ISSUES
    SOFTWARE
    TOO MANY UNMAINTAINED
    DEPEDENCIES
    SCALIBILITY ISSUES
    LEAKY ABSTRACTIONS
    ORM-ALIZED

    View full-size slide

  30. @christianbarra
    ISSUES
    SOFTWARE
    TOO MANY UNMAINTAINED
    DEPEDENCIES
    SCALIBILITY ISSUES
    LEAKY ABSTRACTIONS
    ORM-ALIZED

    View full-size slide

  31. @christianbarra
    ISSUES
    SOFTWARE
    TOO MANY UNMAINTAINED
    DEPEDENCIES
    SCALIBILITY ISSUES
    LEAKY ABSTRACTIONS
    ORM-ALIZED

    View full-size slide

  32. @christianbarra
    ISSUES
    SOFTWARE
    FIGHTING WITH HEROKU
    NO CONTAINERS
    LACK OF USABLE
    LOGS/METRICS
    4 DIFFERENT CLOUD
    PROVIDERS

    View full-size slide

  33. @christianbarra
    ISSUES
    SOFTWARE
    FIGHTING WITH HEROKU
    NO CONTAINERS
    LACK OF USABLE
    LOGS/METRICS
    4 DIFFERENT CLOUD
    PROVIDERS

    View full-size slide

  34. @christianbarra
    ARCHITECTURE
    CONSOLIDATE
    CLOUD NATIVE
    OBSERVABILITY
    EVOLUTION
    SOFTWARE

    View full-size slide

  35. @christianbarra
    CONSOLIDATE
    PAY TECHNICAL DEBTS
    DEPRECATE ALL THE CLOUD PROVIDERS AND
    MOVE TO GCP
    WE ❤ LINTERS: FLAKE8, ISORT, BLACK AND
    MYPY
    BUILD VS BUY &
    VS UNMANAGED VS MANAGED

    View full-size slide

  36. @christianbarra
    CONSOLIDATE
    PAY TECHNICAL DEBTS
    DEPRECATE ALL THE CLOUD PROVIDERS AND
    MOVE TO GCP
    WE ❤ LINTERS: FLAKE8, ISORT, BLACK AND
    MYPY
    BUILD VS BUY &
    VS UNMANAGED VS MANAGED

    View full-size slide

  37. @christianbarra
    CONSOLIDATE
    PAY TECHNICAL DEBTS
    DEPRECATE ALL THE CLOUD PROVIDERS AND
    MOVE TO GCP
    WE ❤ LINTERS: FLAKE8, ISORT, BLACK AND
    MYPY
    BUILD VS BUY &
    VS UNMANAGED VS MANAGED

    View full-size slide

  38. @christianbarra
    CONSOLIDATE
    PAY TECHNICAL DEBTS
    DEPRECATE ALL THE CLOUD PROVIDERS AND
    MOVE TO GCP
    WE ❤ LINTERS: FLAKE8, ISORT, BLACK AND
    MYPY
    BUILD VS BUY &
    VS UNMANAGED VS MANAGED

    View full-size slide

  39. @christianbarra
    ARCHITECTURE
    MORE STRICT SERVICE SEPARATION
    MOVE TO A SERVICE ORIENTED
    ARCHITECTURE
    MOVE DATA INGESTION TO CLOUD
    FUNCTIONS

    View full-size slide

  40. @christianbarra
    ARCHITECTURE
    MORE STRICT SERVICE SEPARATION
    MOVE TO A SERVICE ORIENTED
    ARCHITECTURE
    MOVE DATA INGESTION TO CLOUD
    FUNCTIONS

    View full-size slide

  41. @christianbarra
    CLOUD NATIVE
    INTRODUCE INFRASTRUCTURE AS CODE
    MIGRATE TO CONTAINERS (ALSO INSIDE
    HEROKU)
    EACH BUILD IS A DOCKER IMAGE
    INTRODUCE K8S

    View full-size slide

  42. @christianbarra
    OBSERVABILITY
    START HAVING METRICS
    ADOPTING STRUCTLOG
    STACKDRIVER

    View full-size slide

  43. @christianbarra
    OBSERVABILITY
    START HAVING METRICS
    ADOPTING STRUCTLOG
    STACKDRIVER

    View full-size slide

  44. @christianbarra
    OBSERVABILITY
    START HAVING METRICS
    ADOPTING STRUCTLOG
    STACKDRIVER

    View full-size slide

  45. Photo goes here
    FUTURE
    SOFTWARE
    COMPLETE MIGRATION TO K8S
    MOARRRR MICROSERVICES
    MORE FOCUS ON DATA

    View full-size slide

  46. Photo goes here
    FUTURE
    SOFTWARE
    COMPLETE MIGRATION TO K8S
    MOARRRR MICROSERVICES
    MORE FOCUS ON DATA

    View full-size slide

  47. Photo goes here
    EDGE COMPUTING WITH AI
    AUTOMATED FARM
    FUTURE
    SOFTWARE

    View full-size slide

  48. Photo goes here
    EDGE COMPUTING WITH AI
    AUTOMATED FARM
    FUTURE
    SOFTWARE

    View full-size slide

  49. Photo goes here
    EDGE COMPUTING WITH AI
    AUTOMATED FARM
    FUTURE
    SOFTWARE

    View full-size slide

  50. @christianbarra
    THAT’S ALL
    THANKS
    QUESTIONS?
    WE ARE HIRING!!!

    View full-size slide

  51. ALL MATERIALS ARE THE INTELLECTUAL PROPERTY OF INFARM – INDOOR URBAN FARMING GMBH AND ARE STRICLTLY CONFIDENTIAL WWW.INFARM.COM

    View full-size slide