Recommended Architecture for Building Applications

vedagarw
Regular Visitor

For your mobile/web app to succeed you need a wonderful idea, killer UX and top class architecture; so that you can scale the product. An important thing to keep in mind while building a new product is to design it in a manner which simplifies easy updates and scaling without breaking any of the existing functionality.

 

One thing most users hate is the need to constantly update their mobile apps. Constantly updating mobile apps requires effort and resources from both the developer and users. In order to solve this issue, we are going to walk you through the recommended architecture for mobile/web apps to solve given problems.

 

Mobile/Web App Directly Talking to VDP (Not Recommended)

 

Generally, when developers try to create a web or mobile app they often try to code the business logic directly into the app. This may seem like an easy solution but this approach has certain issues which could cause problems in the future.

WithoutProxy.jpg

Issues with the above approach

 

  • Intellectual Property resides in the user’s device. It can sometimes be easy to reverse engineer an app and find out the business logic that makes your app run.
  • Potential security issues if the users can decompile the app and find out the certificates and API keys used for connecting to the various API platforms.
  • Larger installer size as the business logic in the app so the size of APK package for Android or IPA package for iOS becomes bigger.

 

Mobile/Web App Connecting to VDP via Proxy Server (Recommended)

 

In this approach; instead of talking to VDP directly we recommend having a proxy server/service in between which has all the business logic residing in it. This approach decouples the business logic from the application logic.

WithProxy.jpg

 

 

Advantages of the above approach

 

  • Business logic now resides in a server which is controlled by the developer. Hence no issues with losing the Intellectual Property.
  • Smaller installer footprint; which could translate into larger user base.
  • Easy updates as the client mobile app can use the same API but the proxy server can choose to send an updated response based on new business rules.
  • The client app communicates to the same server so the developer can have a load balancer at the proxy server and easily scale the application.

One of the biggest advantages of using the above approach is when a developer is trying to mix and match multiple APIs; it can reside on the same proxy service and the mobile/web client connects to only one service provider. This helps us in creating a very efficient, fault tolerant system which can allow for a high uptime. Moreover, the keys and certs which are used to connect to various API providers reside at a single location which can never be accessible to you end users.

 

The above approach also helps in building capabilities like quota limiting and metering at the proxy layer which the developers can use in order to monetize the application.

 

Comments
frank1
Regular Visitor

vedagarw   Thank you for the great discussion, it helped us enhance our architecture design by following your recommendation to use proxy sever to decouple the business logic from the application logic and protect IP.