Close-up: The Web Developer’s Perspective

By Ulf Ahlfors, CTO
 
The Mikz platform offers a unique opportunity for any web developer to gain access, in a controlled manner, the resources and data available in phones and other devices that have the Mikz Device Server installed.
 
One of our key objectives when designing Mikz was that accessing mobile devices from an application on the web should be at least as simple as doing a mashup with Google Maps. Of course, the resources and thus applications are unique in Mikz, but how to use the web developer’s interface should be similar.
 
The Mikz web API implements a RESTful application programming interface (API). REST is the simplest request format to use - it's a simple HTTP GET, PUT or POST action. The intention is to encourage web developers to implement and launch attractive applications and services based on the Mikz platform using the same methods and tools that they use when developing against other web service platforms. To further keep the developer’s efforts to a minimum, there will be plugins and libraries available for most major IDEs and tools, guiding the developer as he or she moves across device platforms with different capabilities, and helping the developer to test against an emulated Mikz platform.
 
Access to the API is controlled by means of API keys, where the OAuth protocol is used for both authentication and authorization. In order to successfully authenticate against the API, web service consumers require a valid consumer key and a valid consumer secret. There will be both non-commercial and commercial keys available. Which key that applies to a certain service will depend on the business scope of the service. Performance restrictions will apply, where the traffic to and from a device is controlled by the Mikz network.
 
Let’s look at an example. Most API requests will use the GET method. The REST endpoint URL for requesting a service on a device with a Mikz nick name "joe" in the mikz.me domain becomes http://joe .mikz.me/rest/. A simple Mikz test echo service on a device associated with nick name Joe is requested as follows:
 
http://joe.mikz.me/rest/doTestEcho?api_key=3a3f6092c3834a5d0ce78a165ee6f463&api_sig=9bd929845b5614a7c00b6de38fdd771&name=value
 
i.e.

GET /rest/doTestEcho?api_key=3a3f6092c3834a5d0ce78a165ee6f463&api_sig=9bd929845b5614a
7c00b6e38fdd771&name=value HTTP/1.1
Host: joe.mikz.me

The response to this example echo service would be
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<echo xmlns="http://api.mikz.me/">value</echo>

 
Although the novel and thus powerful concept of the Mikz web API is to expose, towards the web developer, the resources available in different devices in a transparent manner, the API offers more advanced “cloud” capabilities as well. Typical examples include advanced content caching and storage functionality, functions that may be used for increased performance and availability services, as well as pure backup and restore-type of services. Other parts of the web API could be access to encoded video in formats not directly supported by a specific device. These parts of the web API leverages upon an efficient interplay between the Mikz devices and the Mikz network, respectively.
 
 
 
 


© 2009, Mashmobile Inc, All Right Reserved / Legal