Firebase: Martin Galajda, Lenka Janečková
Firebase: Martin Galajda, Lenka Janečková
Cloud-hosted database
Backend-as-a-Service (BaaS)
Started as a YC11 startup, acquired by Google in 2014
Data stored in JSON and synchronized to every connected
client
Supports iOS, Android, C++, Web apps, REST API, Unity, ...
Used by Shazam, Skyscanner, Booking.com, Viber, ...
Introduction
Other features Firebase supports:
Storage
Hosting
Authentication
Notifications
Cloud functions
Cloud messaging
Analytics
Remote config
Crash reporting
How does it work?
The clients connect directly to the database in the cloud and don’t
have to go through the application’s server
No need to worry about the backend server, database, real-time
component (socket.io) or writing REST API
App is connected to Firebase through WebSockets
The app just sends data to Firebase and it handles saving and
syncing across all connected devices / sites
All data is synced through the single WebSocket connection
Writing data offline
.read
if and when data is allowed to be read by users
.write
if and when data is allowed to be written
.validate
what a correctly formatted value will look like, whether it has child
attributes, and the data type
.indexOn
specifies a child to index to support ordering and querying
Firebase Database Rules Example
Delete operation
Detach listeners