All articles

Where To Host Mobile App Backend?

Three smartphones connected with a circle in which Backend is written

Wondering where to host your mobile app backend? 

This is an important question to answer if your app is going to perform as you would like. 

Besides happier customers, a reliable mobile backend host will offer your app enormous scalability, as well as making it faster and more secure. Here’re a few amazing case studies of companies who hired DevTeam.Space to build their mobile and web products:

  1. MejorateHealthcare Mobile and Web Application
  2. DentaMatch – Healthcare Android and iOS App
  3. Influencer Marketing Solution – Social Media Mobile App

Contents

Why talk about app hosting for your mobile app?
What are your options to manage backend for mobile apps?
MBaaS: The easiest option for hosting your mobile app’s backend
MBaaS providers compared
Hosting a backend for your mobile application using ready-made tools: the “Middle” option
Mobile app hosting in the ‘Do-It-Yourself’ way
Choose the appropriate technology stack for mobile backend development
Select a mobile app server hosting provider

Why talk about app hosting for your mobile app?

A schematic representation of how mobile app backend works

Can you reach out to a wide customer base without a mobile app these days? Well, you still need that website for your business, however, mobile apps are far too important now. In 2019, Internet users spent 35% more time on their mobile devices when compared to 2017, as “The State of Mobile 2020” report from App Annie shows.

As of September 2019, Google Play had 3.3 million Android apps, whereas the Apple App Store had 2.2 million iOS apps. Read “App stores list (2019)” for more such mind-boggling statistics, however, you can see that mobile apps are important!

You surely don’t need me to explain why a quick “Time to market” is important when you launch a mobile app, do you? After all, early movers reap various advantages, and you would surely want to do that with your mobile app!

This is where the questions about the mobile backend and hosting it gains importance. As I have explained in “10 biggest challenges when developing an app”, you need a strategy to focus on front-end development, therefore, you need help with the backend. Let’s dive deeper.

What are your options to manage mobile app backend?

After we‘ve established what backend is and why you need it, it‘s time to discuss how to host a mobile app and all the peculiarities in terms of the backend that come with it. Developing the backend of mobile apps is an entirely different ball-game from front-end development. For e.g., you and your team must have the following knowledge:

  1. Network infrastructure including web servers;
  2. Database management;
  3. Server-side programming;
  4. Modern cryptography to ensure security;
  5. Big data;
  6. Mobile telecommunications network.

But, all this raises another issue – that of hosting for app development.

You have options for the overall management of mobile app backend, and these are as follows:

  1. You can rely on a ‘Mobile Backend as a Service’ (MBaaS) provider and consume their service. It’s the easiest option, the provider handles the hosting, and you are likely to experience a faster ‘Time-to-market’. Read more about it in “How To Choose The Best Mobile Backend As A Service (MBaaS)?”.
  2. You can code your mobile backend using existing tools and templates that some Cloud service providers, for e.g. Google, offer. It’s not as easy as the earlier option, however, you at least have market-leading services that you can rely on. The Cloud service provider addresses your hosting requirements.
  3. The hardest option is for you to code your entire backend yourself and find a provider that will host your mobile app. This option needs a wide variety of skills, besides it’s a lengthy process. If you need a wide choice of customization and have the required expertise in your team, you can consider it.

 

MBaaS: The easiest option for hosting your mobile app’s backend

MBaaS providers leverage the Cloud computing “as-a-service” model, where you consume their service while they manage your mobile backend. A good MBaaS provider will offer you the following:

  • Secure infrastructure and storage;
  • APIs including social network and several others depending on your app requirements;
  • Ability to seamlessly navigate various mobile platforms and devices;
  • User authentication and management;
  • Persistent data storage;
  • Push notification;
  • Geolocation services;
  • Analytics;
  • Ability to leverage microservices architecture;
  • Ease of use and superb customer support.

Read more about the MBaaS model in “mobile backend as a service (mobile BaaS)”.

MBaaS providers compared

An image of a laptop in the background with logos of different MBaaS providers in the foreground

You have multiple choices of MBaaS providers, as follows:

  • Google Firebase: Google acquired Firebase in 2016 and entered the MBaaS space. Firebase offers the following categories of services:
    • ‘Develop’, which includes a cloud database, user authentication, messaging, and storage. It also includes hosting, testing tools, and crash reporting features.
    • ‘Grow’ category of services helps you analyze user interactions, and include analytics, indexing, and dynamic linking.
    • ‘Earn’, for advertising.

They have a free tier, and you pay beyond a threshold.

  • AWS Amplify: This is the MBaaS offering from AWS. It offers a comprehensive set of features that an MBaaS platform could have, moreover, it utilizes the excellent cloud capabilities of AWS. You can use it to build native as well as hybrid mobile apps, and AWS Amplify makes it easy for you to scale your app. You will find it easy to implement key features like security, user management, user authentication, “push notifications”, etc. AWS Amplify covers the entire set of activities in the mobile app development workflow, e.g., version control, testing, deployment, etc. You can integrate APIs easily, moreover, you can securely store data. AWS Amplify offers a complete set of tools, furthermore, you can access its open-source libraries, a CLI, etc. Read the “Amplify Framework” documentation on GitHub for more insights.
  • Apple CloudKit: This is Apples’ MBaaS offering. It offers most MBaaS services and is very good for developing your iOS apps. It’s also good if you are developing simple apps, however, they don’t support implementing server-side logic, and developers need to run application logic in the client side. You pay when you cross the threshold for their free-tier.
  • Kinvey: Gartner recognizes them as a “Visionary” in their 2018 Magic Quadrant 2018 report, and it’s justified because of the wide set of services they provide. In addition to standard MBaaS features, their ready-made app templates are very helpful. Their analytics offering is rich, while you can build native, hybrid, and IoT apps with their SDKs.
  • AWS: Amazons’ MBaaS provides a rich set of services covering the entire MBaaS spectrum. Amazon Cloud is excellent, and it’s an advantage when you use their service. They also have a free tier; however, the AWS MBaaS isn’t easy to use. So, how much does it cost to host an app on AWS? The most straightforward answer would be that it depends on the number of users your app has. As we‘ve said, there‘s a free server that can be used for 1 year for hosting a mini-site or a small app, after that the price is $8-10 a month, but if you have more users, then the price rises exponentially, and for big startups and corporations, it can be as high as $5,000 a month.
  • SashiDo: Many mobile backend developers were big fans of the Parse, an MBaaS provider that closed in 2017. A big advantage of SashiDo is that it’s built on the Parse open-source code and works like it. Their offerings cover the entire gamut of MBaaS, and while they don’t have a free tier, their customer service is excellent.
  • Kumolos: While they offer all standard MBaaS features, their platform is more suited to mobile app development companies. Kumolos offers a client portal that clients of the app development company use, to monitor trends about their mobile app. This MBaaS provider also offers an agency console that enables app development companies to manage their portfolio.

Read our comparison of MBaaS providers in “How To Choose The Best Mobile Backend As A Service (MBaaS)?” for more details.

Hosting a backend for your mobile application using ready-made tools: the “Middle” option

I will now explain the option that falls between relying solely on an MBaaS provider and coding your backend entirely yourself. While MBaaS is a nice option for you to host a backend for your mobile application, there are times when you need higher flexibility.

In this section, I will explain how you can use the Google Cloud service, and build your backend using their ready-made tools. I have earlier explained how you can consume Google Firebase services for your backend, hence let’s consider it the starting point.

While you can start easily with Firebase and bring your mobile app to life quickly, you may have a more complex requirement. For e.g., if your app needs to modify synchronized data, you need more customization options.

Firebase and Google App Engine standard environment

The Google App Engine standard environment is a ‘Platform as a Service’ (PaaS), which can monitor, scale and update the hosting environment. As with the Cloud computing PaaS model, you bring your code and data.

For your mobile app backend, it means that you need to code your backend. Read more about the App Engine standard environment in their Google Cloud document repository.

Here I recommend that instead of coding your mobile backend from scratch, you extend Firebase. This automatically provides you with real-time data synchronization. While your app can now modify synchronized data, what if you need a higher level of customization?

For e.g., do you need to:

  1. Call native binaries or write to a file system?
  2. Have a persistent connection to Firebase?
  3. Make other system calls?

Now, you need more customization. Read on!

Mobile app backend with Firebase and Google App Engine flexible environment

A sketch of an airplane engine which is a Google App Engine logo

Google App Engine flexible environment allows you more customization option over the standard environment. It does everything that the standard environment can do, however, it uses Docker containers.

Since it runs your backend service inside the container, you can configure it. Read more about Docker containers in “WHAT IS A CONTAINER”.

This enables you to call native binaries, write to file systems, or make other system calls. Find out more about the App Engine flexible environment in their Google Cloud services documentation repository.

While you have customized more with this step, what if you want more customization? Read on, to find out what you can do to automatically generate client libraries. Your app can use them to call the backend directly.

Google Cloud Endpoints and Google App Engine for your mobile app hosting

Your mobile app can make direct API calls, using the client libraries that the Cloud Endpoints generates. You don’t need to write code to facilitate communication with App Engine. As earlier, App Engine being a PaaS handles hosting, scaling, monitoring, etc.

This approach also allows you to reduce storing files on the mobile device since you are moving files to the Cloud storage. Additionally, the Cloud messaging service allows push notifications. Read about the Google Cloud Endpoints in its’ Google Cloud documentation.

So, you have customized more, and that’s great! However, you can’t use this approach, and must customize more, if your app needs to do the following:

  1. Automated and real-time data synchronization between mobile devices;
  2. Backend services requiring 3rd party services or custom servers;
  3. Connect to systems without SSL.

 

Mobile app hosting in the ‘Do-It-Yourself’ way

We are progressing on a continuum in which we started with using an MBaaS. We didn’t have options to customize, hence, we moved using PaaS such as Google App Engine, where we had more customization options. If your customization requirements are higher, then you need a ‘Do-It-Yourself’ (DIY) approach.

It’s the hardest way to manage your backend requirements, where you need to build your backend on your own and find mobile app hosting providers too. It’s a complex project and if you don’t have the necessary backend development, infrastructure, and security skills in your team, consider getting professional help.

Choose the appropriate technology stack for mobile backend development

You need to choose the right technology stack for development, don’t you? There are two main options here, namely, hybrid app development, and native app development.

Which one should you choose? Hybrid app development allows you to create a mobile app for both Android and iOS with a single code base. This keeps the development costs down, moreover, you need to maintain one code base only. Modern hybrid app development frameworks like React Native deliver near-native “user experience” (UX).

Well, the key operative word in the above was “near-native”, and that makes a difference! Native apps offer the best UX since you code them using programming languages that are specifically designed for the respective platforms. They also offer the best performance and security, as I have explained in “What is the best development approach to guarantee the success of your app?”.

I recommend that you prioritize UX and develop native apps. You should use the following programming languages:

  • Kotlin for native Android development: Java has been the mainstay of native Android development for long, and it doesn’t need an introduction. However, Kotlin has emerged as a popular choice for native Android development in recent years, and I recommend that you use it. Kotlin has lightweight libraries, therefore, you can code highly performant apps using it. Native Android developers with Java skills can easily learn it, moreover, Kotlin has excellent features to avoid common coding errors. Read our guide “Kotlin vs Java: Which is the best choice?” to learn more about it.
  • Swift for native iOS development: Objective-C was the mainstay for native iOS development earlier, however, Swift has gained immense popularity in recent years. It’s a modern language with powerful features, and you can avoid common coding errors with it. Your codebase remains manageable enough, which makes maintenance easier. Swift enables you to code performant and scalable apps, and I recommend that you use it. I have explained its advantages in “How to migrate your Objective-C project to Swift?”.

Well, we covered programming languages, however, you would like to scale your development process, wouldn’t you? You would also want to create a consistent framework for your front-end to access the back-end, therefore, I recommend that you create APIs.

“REST” (Representational State Transfer) is the de-facto standard for API development, therefore, I recommend that you create RESTful APIs. API development requires careful planning, using the right tools, documenting the APIs, hosting them on a cloud platform, and securing them. Need help with API development? Our guide “How to build RESTful API for your mobile app?” is just what you need!

You also need to use appropriate database solutions for API development, therefore, I recommend the following:

  • PostgreSQL: It’s a highly popular open-source “Relational Database Management System” (RDBMS).
  • MongoDB: If you need to use a document database, then a NoSQL database like MongoDB is an excellent choice. It’s highly scalable.

 

Select a mobile app server hosting provider

Once again, you have a wide choice of mobile app hosting providers. I recommend you explore the following, however, it’s not an exhaustive list:

  1. Amazon EC2: Amazon Elastic Compute Cloud (EC2) is the “Infrastructure as a Service” (IaaS) offering from AWS. It utilizes the robust cloud computing capabilities of AWS, and its users can quickly provision computing, storage, and networking by using various APIs. Amazon EC2 provides secure and resizable computing capacity on the cloud.
  2. Google Compute Engine: This is Google’s ‘Infrastructure as a Service’ (IaaS) Cloud offering. You can create and run virtual machines. They offer reliable service with good scalability, performance, and value for your money. You can connect your app to your Compute Engine instances using REST and gRPC protocols. There is very good documentation, check out the Google Compute Engine document repository for more details.
  3. IBM Cloud: Previously known as SoftLayer, IBM Cloud provides you with both bare metal and virtual server options. IBM Cloud is competitive on all the key parameters you can think of, for e.g. network, data transfer, bandwidth, management, monitoring, and customer support. Visit the IBM Cloud website for more details.
  4. Digital Ocean: Another leading IaaS provider, you will find it easy to deploy virtual machines with them. The company has a good process, methods, and tools (PM&T) for deployment, scaling, management, monitoring, and security. Check the Digital Ocean website to find out more about them.
  5. Rackspace: A Cloud hosting provider, as well as a managed cloud services provider, they have expertise in all major cloud platforms. Gartner Magic Quadrant for 2018 recognizes them as a leader among Public Cloud Infrastructure Managed service providers. Find out more about them on the Rackspace website.

Additional tools to consider when using a custom backend server for mobile apps

Depending on your app, you may also have to explore additional tools in the DIY approach, as follows:

  1. ‘Content Delivery Network’ (CDN): Will you have many downloadable assets in your app, for e.g. images and videos? You are likely considering storing them with your cloud provider.
    1. You should explore using a CDN to make downloads easy for your app users.
    2. CDNs help in the speedy delivery of content because they replicate it across multiple locations.
    3. Incapsula, CDN77, Liquid Web, and Rackspace are good options for you, but there are more choices.

Read more about CDNs and good CDN providers in “List of 17 Best CDN Service Providers of 2018: Updated Reviews”.

  1. Orchestration: If you need multiple servers for your mobile app backend, consider a good orchestration set-up. Since these services automate deployment, scaling, and management of cloud resources across multiple servers, you can improve your productivity. Kubernetes is a good option. Docker Swarm is another good orchestration option, read more about it in “What is Docker Swarm? A discussion on container orchestration & potential solutions”.

I recommend that analyze your requirements carefully. If ‘Time-to-Market’ is your priority, you are better off with an MBaaS to host your Mobile app backend. On the other hand, if you can’t do with customization, consider the middle way or the DIY approach I have described, however, prepare to deal with more complexity.

LinkedIn Facebook Twitter Facebook Messenger Whatsapp Skype Telegram