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

The last infrastructure talk for web developers @ PHP Serbia Conference 2018

The last infrastructure talk for web developers @ PHP Serbia Conference 2018


Slobodan Stojanović

May 27, 2018

More Decks by Slobodan Stojanović

Other Decks in Programming


  1. The last infrastructure talk for web developers or why your

    future apps will be serverless
  2. Slobodan Stojanovic CTO @ Cloud Horizon co-author of Serverless Apps

    with Node and Claudia.js @slobodan_ effortless-serverless.com
  3. @slobodan_ Do you know the feeling when…

  4. @slobodan_ • you solve the problem you worked on last

    couple of days in just five minutes this morning • you successfully implemented a new tool/framework on your new project • you receive an awesome feedback from your customer • you work on interesting problems in an awesome team • you have a brilliant new idea, and you can't stop coding it
  5. @slobodan_ The good

  6. @slobodan_ But, do you also know the feeling when…

  7. @slobodan_ • spending two days trying to setup vagrant/homestad for

    a project you just jumped in • setup a dev server, because that's no one's job but you need it • apply new security patches on all of the servers • try to figure out how to do yet another thing with Docker • try to sell yet another necessary refactoring to your client or boss
  8. @slobodan_ The bad

  9. @slobodan_ Finally, do you know the feeling when…

  10. @slobodan_ • you have an important demo, you worked hard

    on for a few weeks, and it just doesn't work on the server • you have server and application issues during an important event or advertising campaign • one of your Wordpress sites is hacked • you need to fix an urgent issue during the weekend or in the middle of the first vacation you had in a few years
  11. @slobodan_ The ugly

  12. @slobodan_ What is your job?

  13. @slobodan_ Is it to write a code?

  14. @slobodan_

  15. @slobodan_

  16. @slobodan_ I hope it's not that :)

  17. @slobodan_

  18. @slobodan_

  19. @slobodan_ Your job should be to understand the business needs

    and empower it with technology
  20. @slobodan_ How did we end up here?

  21. @slobodan_ How did we end up here? or the evolution

  22. @slobodan_ Genesis of compute and applications (ie. Eniac)

  23. @slobodan_ Custom built compute and applications, and genesis of operating

  24. @slobodan_ Compute, applications and OS are products,
 genesis of good

    architecture practices
  25. @slobodan_ New good programming practices and custom built frameworks

  26. @slobodan_ Cloud

  27. @slobodan_ New architectural best practices

  28. @slobodan_ DevOps

  29. @slobodan_ But, what's next? …and can we do better?

  30. @slobodan_ Simon Wardley explains it better with "Why the Fuss

    about Serverless?" and Wardley maps
  31. @slobodan_ From "Why the Fuss about Serverless?" (https://youtu.be/SPsaqiegOP4)

  32. @slobodan_ From "Why the Fuss about Serverless?" (https://youtu.be/SPsaqiegOP4)

  33. @slobodan_ From "Why the Fuss about Serverless?" (https://youtu.be/SPsaqiegOP4)

  34. @slobodan_ From "Why the Fuss about Serverless?" (https://youtu.be/SPsaqiegOP4)

  35. @slobodan_ … serverless

  36. @slobodan_ What is serverless, anyway?

  37. @slobodan_ Serverless computing is a cloud-computing execution model in which

    the cloud provider dynamically manages the allocation of machine resources.
  38. @slobodan_ Pricing is based on the actual amount of resources

    consumed by an application, rather than on pre-purchased units of capacity.
  39. @slobodan_ What does that mean?

  40. @slobodan_ What does that mean?

  41. @slobodan_ Serverless app costs you nothing* if nobody is using

    it * except storage price
  42. @slobodan_ Benefits?

  43. @slobodan_ • Autoscaling • Pay for used capacity only •

    No server maintenance • Short time to market • Cheap
  44. @slobodan_ Why is serverless important?

  45. @slobodan_ Why is serverless important? to me »

  46. @slobodan_ Most of the time we use big companies, such

    as Netflix or Facebook, as role models for our tech. They do amazing things, but are they really good role models for small companies?
  47. @slobodan_ You'll never have most of the problems they have.

    Should you use the same best practices?
  48. @slobodan_

  49. @slobodan_ On the other hand, serverless brings most benefits to

    small and medium business
  50. @slobodan_

  51. @slobodan_ But that's not all

  52. @slobodan_ • simplifies my apps • allows small teams to

    move fast and accomplish more • function isolation • managed infrastructure + autoscaling • code reusability • financial incentives for refactoring
  53. @slobodan_

  54. @slobodan_ It also reduces the amount of back end code*

    * probably not the smartest thing to say on BE conference :)
  55. @slobodan_

  56. @slobodan_ "Oh, and I only hire front-end developers at this

    point. I have been the sole DevOps/backend/ middle-tier developer in the last two companies I started, and it’s been fine." Joe Emison (@JoeEmison)
  57. @slobodan_ "With AppSync I could continue to be the CTO,

    do all the backend and middle-tier code, and support up to probably about a hundred front-end developers before I would need a dedicated backend developer." Joe Emison (@JoeEmison)
  58. @slobodan_ Can I host my serverless infrastructure?

  59. @slobodan_ You can, but it's not serverless anymore

  60. @slobodan_ "There's a difference between managed infrastructure and managed compute.

    You're fully serverless only when both infrastructure and compute are managed" Ben Kehoe (@ben11kehoe)
  61. @slobodan_ So, functions on your own architecture are not serverless

  62. @slobodan_ Neither are containers that are running even if no-one

    is using them
  63. @slobodan_ What do we need to change to get benefits

    from serverless?
  64. @slobodan_ Mindset

  65. @slobodan_

  66. @slobodan_ "Transition to the #cloud: treat servers like cattle, not

    pets. Transition to #serverless cloud architecture: treat servers like roaches" Ben Kehoe (@ben11kehoe)
  67. @slobodan_ No more large frameworks

  68. @slobodan_ Simplify things

  69. @slobodan_ Move fast

  70. @slobodan_ Process Driven Development cc. @simalexan

  71. @slobodan_ Are there any serverless patterns and anti-patterns?

  72. @slobodan_ Genesis of patterns and anti-patterns

  73. @slobodan_ Serverless monolith

  74. @slobodan_ Serverless monolith

  75. @slobodan_ Fanout

  76. @slobodan_ Fanout

  77. @slobodan_ Fanout

  78. @slobodan_ Fanout

  79. @slobodan_ Fanout

  80. @slobodan_ Create your own patterns and anti- patterns. Just be

  81. @slobodan_ How does serverless work in practice?

  82. @slobodan_ CodePen codepen.io

  83. @slobodan_ • team of mostly front end developers + one

    DevOps • Ruby on Rails backend • many preprocessors that needs full isolation • > 200k requests/hour in peak • unexpected peaks (you never know when some pen will become popular)
  84. @slobodan_

  85. @slobodan_ Benefits?

  86. @slobodan_ • shorter time to market • front end devs

    can deploy production-ready preprocessors without DevOps help • autoscaling and isolation • superpowers for front end developers
  87. @slobodan_ Desole desole.io

  88. @slobodan_ Desole is an open source error-tracking system you can

    install in your AWS account.
  89. @slobodan_ It enables orgs to track app exceptions and errors

    without having to choose between the convenience of SaaS and the security of a self-hosted solution.
  90. @slobodan_ • convenient and secure • cheap and scalable •

    one click installation from Serverless AppRepo • GDPR friendly :)
  91. @slobodan_

  92. @slobodan_ Three person team and 2-3 days of development

  93. @slobodan_ Vacation Tracker Bot vacationtrackerbot.com

  94. @slobodan_ • small in-company startup (1-2 developers) • Slack chatbot

    + API + Angular dashboard • current cost of the infrastructure: $0
  95. @slobodan_

  96. @slobodan_ Benefits?

  97. @slobodan_ • small team • reusable parts for the next

    product • short time to market • cheap infrastructure • easy refactoring and changes
  98. @slobodan_ Result?

  99. @slobodan_ vacationtrackerbot.com

  100. @slobodan_ Live Demo

  101. @slobodan_ Live Demo …or how does serverless work

  102. @slobodan_

  103. @slobodan_ Links to things that I mentioned

  104. @slobodan_ • Claudia.js - https://claudiajs.com • Desole - https://desole.io •

    Vacation Tracker - https://vacationtrackerbot.com
  105. @slobodan_ Summary

  106. @slobodan_ • do not be religious about your framework and

    tools • be open-minded and embrace new technology • your job is to understand and empower the business, use the best tools to accomplish that • check out serverless, it might help you
  107. @slobodan_ One more thing!

  108. @slobodan_

  109. @slobodan_

  110. @slobodan_ Serverless Apps with Node and Claudia.js Use ctwphpsrb18 promo

    code for 40% off effortless-serverless.com/book @slobodan_
  111. Thanks!