Monday, January 11, 2016

BackEnd as a service (BaaS)

Standing on the shoulders of giants


Building software is becoming simpler and simpler.
Server-logic abstractions in the form of web-services (like google-apis, cloud databases).
Choosing the right level of abstraction will mean developing a website/app very fast, with most of the scaling problem already solved and instead of having 'opertaions' team, just use a credit card.

Why wasn't it done till now? why BaaS is becoming so popular today?
Cause of Mobile. When you had web, the developer already had his web-server and the skill-set to configure it to his needs.  iOS/Android applications are hosted in iOS/Google-play store, so there is no web-server, and their developers skill set is typically do not include web. Hence the need rose and many try to solve it.

A lot of the mobile apps, have common requirements from the BaaS:
Single-player games require: user-login, high-score, cloud save-game (upload file)
Social apps require: user-login, chat, uploading text and files,
All need analytics


  1. User Login abstraction
    1. Allow using identity from other site, like facebook/google.
    2. Allow email+password pair, including activation and password recovery
    3. Create the relevant user-tables and track their frequency of visiting 
  2. Analytics
  3. Push-notifications
  4. Database
    1. Usually non-SQL
    2. ** There are numerous hosted databases. MongolLab/Composeand/ they do only one aspect
    3. ** ElasticSearch capabilities  (uncommon need-  Compose/ Bonasi / Qbox)
  5. Files hosting (images/videos, but not the app itself)
    1. simple upload
    2. good download performance using CDNs.
  6. Chat messaging
    1. real-time chat (only a second delay between messages)
    2. history of the chat
    3. ** Pusher/PubNub



BaaS providers, see here
The most known: "Parse" and "Firebase"  (but they do not prvoide it all...)
The less known: Buddy, QuickBlox , appriaries

Parse (now part of facebook)

REST Based (polling)
Mature with great modules for Users,Analytics, Push,DB similiar to MongoDB (not sure if it is actually same interface) with great online editor.
Files hosing is lacking, Polling based (no chat!) , can be expensive.


Firebase (now part of Google)

Persistent connection based, which is totally great, except the cost per connection (user)
As of (11-Mar-2015) free: 50 Max connections,5 GB transfer, 100MB storage.
For 49$ a month -> 200 Max connections, 20GB transfer , 3GB storage



Pusher
Free: Max 20 connections, 100K messages.
For 49$ Max of 500 connections, 1M messages

No comments: