Looking to Improve Mobile App Performance? Use an API Mash-Up Platform
Over the last 5 years, more than a million mobile apps have been developed. (Source: NY Times). Mobile apps can be grouped into two categories. The first category consists of mobile apps created for the consumer market. The second category is custom mobile apps developed for enterprises. Enterprises create mobile apps to support their particular business needs and to create a competitive advantage. Enterprise mobile apps tend to be more complex to build, as the goal is to make PC-oriented applications work on mobile devices.
In this post, I explain the advantages Xignite’s financial API mash-up platform Splice provides in improving mobile app performance. Splice lets you create composite APIs by mashing and transforming other APIs. It also offers a visual designer where you can build the exact API you need to power mobile apps.
Advantage #1: Reducing Network Bandwidth
Network traffic is one of the biggest obstacles to mobile app performance. API mash-up tools like Splice let you reduce the amount of data returned, by letting you trim the output of APIs. This facilitates efficient memory utilization and improves mobile app performance.
Imagine you were developing a mobile app like OpenFin’s PNL tool, one that displays real-time financial market data. To get data, you would need to use the GetRealQuote operation from XigniteBATSRealTime. The data fields returned by this API are given below:
For a mobile app, you might not need all the fields (for e.g. Volume, BidQuantity and AskQuantity). Essentially, you are transmitting more data than you need. A more efficient way to deal with this to trim the API output, which can be done using an API mash-up tool.
I trimmed the output of the GetRealQuote operation using Splice. It now returns only the high, low and last. The trimmed output fetched from the API is given below:
Keep in mind you must be logged into your Splice services account in order to receive data. If you don’t have an account, just sign up for a free trial.
Advantage #2: Reducing Overhead
Imagine you were developing an mobile app where you need to fetch both equity and foreign exchange(forex) quotes. The inefficient way to get data would be to:
- Make a request to XigniteBATSRealTime for an equity quote.
- Parse the response.
- Display it on the screen.
- Repeat the steps for forex quotes.
On mobile devices, each of these actions is resource intensive because it consumes battery life. On the other hand, if the equity and forex APIs are mashed up using a mash-up tool, all the data can be returned in a single API call.
This reduces the processing overhead and overall processing power required, improving mobile app performance.
Advantage #3: Parallel Processing (Speed)
An API mash-up such as the one above lets you process API calls in parallel. In the previous example, the equity and forex APIs are independent of each other. Splice is an API mash-up tool that automatically splits the request into two parts, gets the data in parallel from both APIs and then returns the output. The data is thus returned to the mobile app and as a consequence, to the user faster.
Like the previous example, there might be situations where parallel processing might be difficult to implement for a mobile app. In such cases, it might be best to leave the implementation of such functionality to a mash-up tool, like Splice.
Advantage #4: Multiple Data Formats Available
Most mobile app developers prefer using REST instead of SOAP because it is a lightweight protocol. On the other hand, there are mobile app developers who still use the latter. Splice allows you to return data in multiple formats. After the API mash-up has been created, Splice gives you the following URLs:
WSDL URL: http://splices.xignite.com/rsrivastava_Reducing_Requests.wsdl
JSON REST URL: http://splices.xignite.com/rsrivastava_Reducing_Requests.json?Header_Username=yourauthenticationtoken &Symbol=MSFT&From=USD&To=EUR
XML REST URL: http://splices.xignite.com/rsrivastava_Reducing_Requests.xml?Header_Username= yourauthenticationtoken &Symbol=MSFT&From=USD&To=EUR
CSV REST URL: http://splices.xignite.com/rsrivastava_Reducing_Requests.csv?Header_Username= yourauthenticationtoken &Symbol=MSFT&From=USD&To=EUR
This gives you the freedom to use the data format that is best suited for your mobile app.
Advantage #5: Leaving the complexity in the cloud
Splice allows you to mash-up market data APIs with mathematical utilities. As an example scenario, consider a mobile app that has users all across the globe. It makes more sense to display stock quotes in the user’s local currency. Using an API mash-up, you can implement the currency conversion in the cloud. Leaving the complexity in the cloud saves you valuable processing power.
Using Splice, I created a mash-up that uses the GetLastQuote, GetLastCrossRate and UtilitiesMath operations to get the stock quote for MSFT and then convert it into EUR. The XML output for the mash-up is given below:
Conclusion: As mobile app development is getting more complex by the day, it is important for developers to pay attention to performance. API mash-up tools are a great way to achieve this goal. The true flexibility and power API mash-up tools offer can only be gauged by using them. I invite you to try Splice. Please feel free to let us know your views on it.
For more info on how Xignite's market data cloud can improve your business processes, request a consultation with one of our data experts.
To test drive our market data APIs and experience for yourself how easy they are to integrate into your applications, request a free trial.