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

Serverless for Frontend Developers - ArmadaJS

Serverless for Frontend Developers - ArmadaJS

What does serverless have to do with frontend development? You might have heard or even experienced many of its benefits such as autoscaling and its pricing model. But no one told you the most important one: “Even though serverless is a backend thing, it gives superpowers to the front end developers”. It puts deployment in the hands of frontend developers, without the traditional complexity of backend systems. You can now deploy a simple production-ready API, a server side rendering tool or even the whole Google Chrome browser and do amazing things with just a few lines of code. This talk is about serverless, and about the ways you can benefit from it as a frontend developer.

Aleksandar Simovic

September 20, 2019
Tweet

More Decks by Aleksandar Simovic

Other Decks in Technology

Transcript

  1. • Team of mostly frontend devs + 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)
  2. • Full isolation between services
 • Auto-scaling (up to 5000

    parallel requests)
 • Decreased infrastructure cost 
 (250 million requests costs $1180/month)
 • More DevOps time for RoR part of the app
 • Frontend developers with superpowers?! Even though frontend, they solved it!
  3. But in reality, 
 we, the frontend engineers, often just

    stand there, 
 waiting in our domain.
  4. 1. You mock the frontend and wait. 
 (because the

    backend is late)
 2. Backend comes in.
 3. Now, do it again.
  5. "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) CTO @ Branch Insurance, 
 former CTO @ BuildFax
  6. The magic that helped 
 CodePen & Joe Emison, 


    their frontend developers,
 resolve all of their backend problems is Oh no, please don’t say it like that…
  7. simalexan Aleksandar Simovic Senior Software Engineer @ ScienceExchange AWS Serverless

    Hero coauthor of “Serverless Applications with Node.js” book AWS SAM, CDK & Lambda 
 Builders Contributor co-organizer of JS Belgrade, a friendly community of over 2000 members and 5 years
  8. Alright, but how does not having servers…? It is serverless,

    
 the same way WIFI is wireless. Gojko Adzic
  9. No server management / ops Scales per use Autofailover Don’t

    pay 
 for idle Easy to start with What are the benefits
 of serverless?
  10. • You are paying for used, not reserved capacity
 •

    Pay-per-execution model
 • If no one is using your app, it costs you $0
  11. • A single JavaScript function
 -> $0.20 per million requests

    
 • Add S3 
 -> $0.023 per GB / month of stored
 • GraphQL (AppSync) 
 -> $4 per million queries and data modifications
  12. Identify {Whatever} From a photo • Converting text to speech


    • Text recognition from image
 • Entities recognition
 
 and much more!
  13. You, as a JavaScript developer,
 can build a complete product,


    
 front to infrastracture,
 
 without anyone else.
  14. To build something new, 
 we have to repetitively build

    80% of what we did 7 times already.
  15. Time Spent:
 3 months > 2 weeks => Going serverless

    Cost: $40,000 > $10 / year Science Exchange
  16. @simalexan @slobodan_ “To minimize initial cost and to speed up

    development, we used serverless from the beginning”
  17. @simalexan • In-company hackathon idea • Small startup with one

    full time developer 
 (+ small help) • One mostly frontend developer • Slack chatbot + API + SPA dashboard
  18. @simalexan • More than 200 teams using the product •

    Current infrastructure cost is $0 • Fast development cycles • Easy refactoring, because of micro services • Reusable parts for our next products
  19. @simalexan • More than 750,000 users per month • Around

    $120 / month. • Company size of two people • Migration took around a month MindMup
  20. • Easily handling more than 
 250 million requests /

    month • $1180/month • A dozen people company, most frontend • All of processors are serverless
  21. • Serverless is easy to start with (beginner friendly) •

    No server maintenance and other boring things • Pay-per-usage model + it's cheap • You can deploy SPAs, APIs or GraphQL in minutes • It gives you superpowers!