Building Scalable Backend Service for Flutter Apps with Serverless Architectures
Samuel Adekunle
Mobile Engineer, 1app
FLUTTERBYTES CONFERENCE 2023 | PG 2
Agenda
Why Serverless for Flutter?
What is Serverless?
Serverless Providers
Integration with Flutter
Building Scalable Backend Services
Real-World Use Cases
Security and Authentication
Monitoring and Optimization
Key Takeaways
Resources to learn
Q & A
Appreciation
FLUTTERBYTES CONFERENCE 2023 | PG 2
Why Serverless for Flutter?
FLUTTERBYTES CONFERENCE 2023 | PG 2
Why Serverless for Flutter?
In conclusion, serverless handles server management, letting you concentrate on perfecting the app’s frontend features and user interface
FLUTTERBYTES CONFERENCE 2023 | PG 2
What is Serverless?
FLUTTERBYTES CONFERENCE 2023 | PG 2
What is Serverless?
It’s often called “serverless” simply because developers don’t need to worry about server provisioning, scaling, or maintenance.
In simple terms, serverless computing is a cloud computing execution model in which the cloud provider dynamically manages the allocation and provision of servers.
�In essence, it helps developers focus on writing code (functions) while the cloud provider manages the underlying infrastructure.
One of the primary advantages of serverless is the elimination of server management tasks, allowing developers to focus solely on their application’s code
Case Study: �Consider a real-time chat application; when there’s a sudden increase in users chatting, serverless functions can automatically scale to handle the spike in message processing. This ensures that the app remains responsive, and the cost is directly proportional to usage. This shows how serverless can efficiently manage resource allocation based on real-time demands, making it an ideal choice for many Flutter applications.
FLUTTERBYTES CONFERENCE 2023 | PG 2
Serverless Providers
Amazon Web Services (AWS) Lambda
Google Cloud Functions
Microsoft Azure Functions
Firebase Cloud Functions
Note: All these serverless platforms supports Flutter integration
Choosing the right provider depends on factors such as specific project requirements, familiarity with the provider’s ecosystem, and cost considerations.
FLUTTERBYTES CONFERENCE 2023 | PG 2
Serverless Integration with Flutter
FLUTTERBYTES CONFERENCE 2023 | PG 2
A simple Flutter app with Firebase Cloud Functions using Node.js
Step 1: Set up your Flutter and Firebase Project
Step 2: Create a Firebase Cloud Function
FLUTTERBYTES CONFERENCE 2023 | PG 2
Call Firebase Cloud Function from Flutter
FLUTTERBYTES CONFERENCE 2023 | PG 2
Building Scalable Backend Services
FLUTTERBYTES CONFERENCE 2023 | PG 2
Building Scalable Backend Services
Simply speaking, scalable backend services are essential because it determines how your app will react during a spike. Here are some of the Best Practices for Scalability:
Planning for Scalability:
FLUTTERBYTES CONFERENCE 2023 | PG 2
Real-World Utilization
FLUTTERBYTES CONFERENCE 2023 | PG 2
Security and Authentication
FLUTTERBYTES CONFERENCE 2023 | PG 2
Security and Authentication
FLUTTERBYTES CONFERENCE 2023 | PG 2
Key Takeaways
FLUTTERBYTES CONFERENCE 2023 | PG 2
Key Takeaways
FLUTTERBYTES CONFERENCE 2023 | PG 2
Resources
Q & A
Thank You
@techwithsam_