CS4521:   Mobile and Topics in Web Programming

 

Backend Trends - BAAS (backend as a service)

 

AWS - Amazon Web Services

  • stable

  • complex, but, they want your business --they have guides

  • OPTION 1: AWS mobile hub & AWS Lambda-- mobile Hub TOOL that helps you setup a project that you can associate any services with like - database and compute code.

      • advantages: Amazon's "easiest" solution, for less web-savy developers

      • negatives: many say more expensive costwise than IAAS (EC2) options, more locked into proprietary systems than options 3 and 2.


    Figure: Mobile app connecting directly to invoke Lamda via Mobile SDK (and uses Cognito).



  • OPTION 2: AWS Elastic Beanstalk - rather than Lambda using Elastic Beanstalk (PAAS)

      • advantages: may have faster startup time than a "cold" Lamda function --so may seem more responsive, always will have a instance of your app running with Elastic Beanstalk. Cold refers to the fact that infrequently run code on cloud (xAAS) systems can result in longer run times due to an initially "loading" of code that the cloud performs (note: you can't expect the cloud to have all code loaded and ready --these are shared resources you are paying for and Amazon manages how the code is loaded/kept active --some of this is algorithmic and specific to the service used).

      • disadvantages: somewhat complex, best for more web-systems savy people, but, still a PAAS.

      • NOTE: you may be able to schedule (run say every 1-X minutes the Lambda code so it is not "cold")

  • OPTION 3: AWS EC2 - rather than Lambda or Elastic Beanstalk -- this is IAAS

      • advantages: most flexible - you choose, machine instances, operating systems, server software,etc., could be fasted and could be most cost effective (but those 2 compete -cost and speed in general)

      • disadvantages: most work to maintain, definintely need web systems background.

Various Amazon Cloud Services  

     

Google Cloud

  • direct competitor of Amazon services.

  • Possibly leader in PAAS (platform as a service).

  • Overall Compute/Data Options from Google

    • Firebase is a fully managed platform for building iOS, Android, and web apps that provides automatic data synchronization, authentication services, messaging, file storage, analytics, and more. Starting with Firebase is an efficient way to build or prototype mobile backend services.

    • easy, little coding, read/write to a Firebase database from mobile SDK directly (don't need server side code to access database) -- this can be advantage of AWS where need to write code even in simplest scenario of Lambda.

    • negatives: proprietrary api (lock into solution like Lambda), database may not have scalability of Google Datastore and other options, cost is more? NO ABILITY TO DO ANY COMPUTATIONS/CALCULATIONS/CODING

    • older tutorial on setting up for Android

     

    • OPTION 2: Firebase & use Google App Engine (PAAS option, similiar to AWS Elastic Beanstalk and somewhat to Lambda)

      • ADDS ability to CODE backend programs - if you need to do more than simply read/write to database but, have real calculations you cant use Firebase alone (e.g. find a matching friend, send messages, shrink an image that was submitted)

      • GAE (Google App Engine) - you just deploy your code (either Java, Python, Go, etc).

        NOTE: you can use Firebase alone to read / write data --but, if you want to do any computations/calcuations you must have code in GAE


    • OPTION 3: Google App Engine (PAAS) or Google Compute Engine(like AWS EC2, IAAS option)

      • GAE easier than Google Cloud where have to setup infrastruction

      • GAE flexible lets user setup system with Docker so can unlike GAE standard to writes to filesystem

      • Gogle Compute Engine - most flexible --you want to run Ruby on Rails no problem but, you manage everything this compares to AWS EC2 solution.

    Firebase Features / Components

    Feature Description
    *Analytics Firebase Analytics is a free and unlimited analytics tool to help you get insight on app usage and user engagement.Check out how PicCollage improves and analyzes their experiments with Firebase Analytics.

    Develop

    Feature Description
    Cloud Messaging Firebase Cloud Messaging lets you deliver and receive messages across platforms reliably. Check out the Firebase Cloud Messaging documentation for more details.
    *Authentication Firebase Authentication is a key feature for protecting the data in your database and storage. Check out authentication in action on Bobon Profiles to help save the brewing profiles of users.
    *Realtime Database Firebase Realtime Database lets you sync data across all clients in realtime and remains available when your app goes offline. Check out how Skyscanner uses Firebase Realtime Database to keep clients in sync with the database.
    *Storage Firebase Storage lets you store and serve user-generated content, such as photos or videos. Firebase Storage is backed by Google Cloud Storage, used and trusted by many.
    Hosting Firebase Hosting provides fast and secure static hosting. Check out Firechat, one of the many web apps hosted with Firebase Hosting.
    Test Lab for Android Firebase Test Lab lets you test on Android devices hosted in the cloud. Check out the Firebase Test Lab for Android documentation for more details.
    Crash Reporting Firebase Crash Reporting provides detailed reports of errors and bugs in your app.Check out how Shazam uses Firebase Crash Reporting to find bugs to improve their user experience.

    Grow

    Feature Description
    *Notifications Firebase Notifications helps you re-engage with users at the right moment.Check out the Firebase customers page to see real-world uses of Firebase Notifications.
    *Remote Config Firebase Remote Config can change the behavior and appearance of your app without publishing an app update. Check out how Fabulous uses Firebase Remote Config to streamline their processes.
    App Indexing With Firebase App Indexing, you can drive organic search traffic to your app, helping potential users of your app become your app’s biggest fans. Check out some App Indexing case studies from companies like Etsy and The Guardian.
    Dynamic Links Firebase Dynamic Links lets you pull users right to the content they were interested in, keeping them engaged and increasing the likelihood that they will continue to use the app. Check out the Firebase Developer Story on how NPR uses dynamic links.
    Invites Firebase Invites helps your users share your app with others. Check out some case studies on apps using Invites such as Yummly.
    AdWords AdWords help you search potential users with online ads. Check out the AdWords testimonials page to see how businesses use Google ads.

    Earn

    Feature Description
    AdMob AdMob provides easy and powerful ad monetization with full support in Firebase. Check out the AdMob success stories page to see how businesses use AdMob.

     

 

  • Special Note on Google Endpoints = it is similar to AWS Gateway API and allows you to "publish/expose" your code in a restful way.

  • Special NOTE on Data Options:

      • option 1: use builtin database in Firebase and directly read/write from app using Firebase SDK inside your mobile app

      • option 2: use Google Datastore (equivalent to DynamoDB) and read/write using SDK using GAE code you call from mobile app. This may be more versatile as can use from web too. But, only go with this option if you think you have a lot of data, need special processing. Potential Lower costs of this over Firebase are a reason to use Datastore instead. Now a more advanced issue and one you may not appreciate at this point is that the APIs to Google Datastore can be more "universal" and not cloud platform specific and this means you can potentially switch your cloiud more easily. With Firebase you are more locked in.

  • Full range of services like Amazon, has less specialized services like Kinesis for streaming data but, has lots of services liek Maps, Video (YouTube), Google ID, etc. not even shown here. Note Google seems to be (at this moment) featuring Big Data more.

    Various Google Cloud Services   (NOT ALL listed)

     








Apple CloudKit

  • -- iOS focused

  • -- requires app user to be logged into iCloud (apple's persistence server)

 

OTHER- Microsoft Azure, Joyent and many more

  • why --maybe cost, maybe they have some feature you want, maybe for your cost you get more.....

     

     

     

WHICH IS BEST?? ---ULTIMATELY IGNORE THIS IMAGE --why?     

    • it is old and changes all the time...

    • but, an ongoing question and frustration for many is which cloud will give me more for my money --this is not a question that has one answer and can literally change one second to another --these are shared machines and load and sharing algorithms influence greatly.

    • In fact, how to determine what is the best public cloud for you to use is a topic of research in computer science


© Lynne Grewe