Connecting Mobile Apps to an Oracle Backend
By Eric Jensen on Jan 31, 2013
The standard way would be to stand up some type of app server. You could choose to actually host the application on the web, and simply connect to it from the mobile device using the browser or some type of container app. Or set up a web interface for data access from a native app, typically through a RESTful interface. These approaches have advantages; development cycles are short, and it’s easier to scale when your data is all server-side. However, there are drawbacks as well. Most of these center around performance. Because of the extra layers of abstraction, web apps are slower than native apps in general. When you add in the latency of accessing all your data over the network the problem worsens. Data driven apps are the most susceptible to this.
Because of these drawbacks, there is a large and growing market for high performance native applications. These apps store their data in a local database to maximize throughput and minimize latency. Of course, this method creates a problem. These mobile devices are now islands of data, where valuable information is effectively trapped in local storage, not resident on the backend where its value can be maximized. The good news is Oracle already has the solution. Database Mobile Server was created specifically to solve this problem.
Oracle Database Mobile Server is designed to keep whole networks of mobile and embedded/M2M devices in sync with an enterprise backend. It has a compelling feature set:
- Designed to synchronize any generic data set
- On any combination of supported platforms
- Sync can be 1-way or bidirectional
- Initiated on the client or server side
- Triggered by database or external events
- Includes device/application management features (MDM/MAM) for centralized control over your device network, including remote provisioning of apps, databases
- End-to-end encryption of data, both at-rest and in-flight, means you don’t have to sacrifice security for performance
To summarize, Database Mobile Server enables native applications utilizing local data to enjoy the best of both worlds: high performance, low latency UI as well as the numerous advantages of having all your data organized and available in a centralized location.
Before I wrap up, a quick sidebar: from time to time we run across folks who are tempted to solve this problem by simply connecting their mobile app directly to an Oracle Database, often using JDBC. This practice might seem appealing, especially given that Android already runs a JVM, however it should be avoided. The various forums are full of explanations why this is a bad idea, so I won’t go into it. Suffice to say, the approach outlined here offers the same advantage, simply developing a mobile app without standing up any web backend for data access. It also has the added advantages of not creating any of the security, performance, and reliability issues associated with direct mobile devices connections to backend Databases.
In a future blog post, I’ll cover the development steps necessary to use this approach in the most straight forward way possible. I think you’ll be surprised at how easy it is to have the best of both worlds.
I will also discuss how you can leverage popular mobile app frameworks such as Appcelerator Titanium to create native apps using technologies derived from the web, for dramatically shorter development timelines.