Thanks for coming to my talk, A Gentle Introduction to Building Serverless Apps. Here you will find all the resources discussed during the talk.
About
Do you want to crank out features the business wants, or spend a lot of time writing code and capacity planning for authentication, authorization, and complicated data access? Of course we all know the answer.
In this session will begin a beginner-friendly introduction to Serverless computing. We will then do a quick overview of the MongoDB ecosystem in the 3 major cloud providers for rapid application building. Then we will walk through a guided tutorial of how to use the MongoDB Stitch serverless platform to build your elastically scalable microservices based app within minutes, complete with end-user authentication and access rules, on a fully managed MongoDB cluster in your favorite cloud platform.
Video
Slides
Source Code
https://github.com/JoeKarlsson/mongodb-stitch-todo-tutorial
Outline
Introduction to Serverless
- What is serverless?
- Devs don’t manage anything, except for their application code
- Runs only when needed
- Scales automagically
- Pay per function execution-only
- Why it’s popular
- No managing of infrastructure whatsoever.
- No provisioning.
- No patching.
- No capacity planning.
- No scaling.
- Sounds great – what’s the catch?
- No control over infra can be bad – need to be warmed up servers
- State is external
- DevOps is still a thing
- When should you go Serverless?
- Occasional Server needs on a static site
- Variable traffic levels
- Additional compute without extending the current system
- Any web app that you want to be cheaper!
- Introduce Stitch
- What is it?
- A serverless platform that makes it easy to build modern, cross-platform apps with MongoDB
- QueryAnywhere
- Functions
- Triggers
- Mobile Sync
- How does it compare to other providers?
- Stitch actually can be used on any cloud platform! Flexibility to be co-located with a cloud provider of your choice means that there is no added network latency, and the boxes are tuned nicely to make sure MongoDB is humming along just fine.
- MongoDB Stitch is designed to work with a broad set of applications. It is especially suitable if you plan on implementing most of your application’s logic in the frontend – with the backend focussed on accessing the database and other public or internal services.
- If you have an existing MongoDB database, then Stitch can be used to safely and selectively expose your existing data to new applications.
- What is it?
- Guided Serverless Tutorial
- Introduce Project
- Tech stack
- Architecture
- Connecting
- How to Query a DB
- Serverless Function
- Serverless triggers
- Introduce Project
- The future of serverless
- The continued rise of abstraction
- Cheaper, easy and performance bugs will be fixed
- More services will have a Serverless option
- MongoDB acquired Realm
- FAQ
- Can I use this for free?
- Yes! Stitch provides a free tier:
- The first 25 GB of data transfer per month is free.
- The minimum of 1,000,000 requests and 100,000 GB-seconds compute per month are free.
- Do I have to use the GUI?
- No, There is a CLI available
- https://docs.atlas.mongodb.com/tutorial/create-new-serverless-instance/
- No, There is a CLI available
- Do I have to use JS to write serverless functions?
- Yes
- Can I use this for free?
- Recap/Questions
Related Links
- MongoDB University
- MongoDB Developer Hub
- MongoDB Community Forums
- Realm Docs: https://docs.mongodb.com/realm/
- My blog covering the app being built during this talk can be found here: https://joekarlsson.com/2019/04/a-gentle-introduction-to-setting-up-a-react-and-mongodb-stitch-app-from-scratch-in-10-minutes/
- You can find the source code for this tutorial here: https://github.com/JoeKarlsson/mongodb-stitch-todo-tutorial
Follow Joe Karlsson on Social
- Twitter – https://twitter.com/JoeKarlsson1
- TikTok – https://www.tiktok.com/@joekarlsson
- GitHub – https://github.com/JoeKarlsson
- YouTube – https://www.youtube.com/c/JoeKarlsson
- Twitch – https://www.twitch.tv/joe_karlsson
- Medium – https://medium.com/@joekarlsson
- LinkedIn – https://www.linkedin.com/in/joekarlsson/
- Reddit – www.reddit.com/user/joekarlsson
- Instagram – https://www.instagram.com/joekarlsson/