Tuesday, December 31, 2013

OpenMobster, Enterprise MBaaS Platform, version 2.4-M3 released: Where do we go from here?

In the spirit of the New Year, I would like to announce the latest official release of the OpenMobster, Enterprise MBaaS Platform. This version is called 2.4-M3 (Milestone 3). This release replaces the 2.4-M2 (Milestone 2) release.

You can check out all the technical details about this release and the upcoming 2.4-M4 and 2.4-M5 releases here

So where do we go from here? Well, thats a great question and something I constantly ponder over when I am about to pass out on my pillow after a long session of hacking OpenMobster code. Keeping that in mind, I would like to share some of what I have been strategizing in the MBaaS space for the benefit of the mobile community. After all, this year is most likely going to be the year of the Enterprise Mobile App. I am not one for making bold predictions out of my b***t, but just looking at the way MBaaS marketplace has evolved over 2013, we can make some solid assumptions about what the market will look like in 2014. Based on that, OpenMobster will invest its resources along these lines.

Enterprise MBaaS stack
The Enterprise MBaaS stack will finally come out of the shadows of the Consumer oriented MBaaS stack. After working with customers in the Enterprise space, I have realized that the Enterprise Mobility requirements are very much different than the mobility requirements of Consumer Apps. This difference is nicely explained in this article. I can do a blog entry just on this topic but to sum it up, Enterprise MBaaS' most critical requirement is integration with backend and even legacy data sources to mobilize that data to be consumed by the Apps. This exercise is not trivial and needs a careful planning approach before even starting the mobilization project. Just, slapping a REST API on top of a data source will not do in mobile as the data has to stay in sync between the devices and the backend. This requires the use of a robust Sync Engine that follows the right Sync protocol to make sure the data is always integral. At OpenMobster, we are 100% committed to our Sync approach to data integration and will keep on innovating on this component and always make it available for Free and Open Source for the mobile developer community. On the consumer side, data integration is almost an after thought as App developers do not have any infrastructure to start with. They can leverage the out-of-the-box Generic data source that is provided by the Consumer MBaaS stack. In an Enterprise setting, it requires all kinds of bridge building to mobilize an Enterprise App using a Consumer MBaaS stack. Its just not natural. In my opinion, this is where Open Source shines. You can download the entire stack, learn the Enterprise integration framework (which is Java based for OpenMobster), start feeding your own backend data into the Framework and Mobilize quickly. You can deploy the infrastructure privately or use a public cloud service like Amazon to deploy your Backend infrastructure. Flexibility is key for an Enterprise MBaaS stack

 Show me the Data
Enterprise Mobile Apps are all about the mission critical data. They don't care whether you have a network connection or not. They just want the data at their finger tips at all times. Out-of-the-box Offline Support for Mobile Apps is critical with this requirement. If there was a concept of a niche in the MBaaS space (which is extremely crowded with about 50 vendors or more), this is the functional niche OpenMobster specializes in and will continue to invest resources to enable this workflow seamlessly out of the box. Our state of the art Sync Engine integrated with the Push Engine helps us handle the Offline use cases needed for an Enterprise Mobile App.

Enterprise SDKs
Going forward, we want to invest time and resources building SDKs for integrating some of the more popular Enterprise data systems. SalesForce.com comes to mind right away. Another being Microsoft SharePoint. The idea being that you get an SDK that you can customize and drop into the OpenMobster Sync Engine. When that happens, the Sync Engine starts mobilizing the data from the Enterprise backend and starts making it available for the native device SDK, to be consumed by the App. In all likelihood, SalesForce.com will be our first SDK. And yes, all this will be available for Free and Open Source.

Windows 8 Support  
This is bit of a gamble, but I do think Windows 8 devices will make some impact in the Enterprise Setting. I have not had a chance to research this aspect too much but common sense suggests that with so much investment in Microsoft technologies, Enterprises will look to integrate Windows 8 devices in their environment. With that in mind, Windows 8 Device SDK for OpenMobster will be delivered as well.

Deprecating HTML5 Support
This is a bold move on our part. HTML5 is a great platform, but only in theory. Having tried to build Enterprise Apps using this technology, we got seriously burnt. Its just not ready for the Mobile experience and I am not sure if it ever will. Simple content oriented apps are fine. But when you are talking about a truly mobile app that mobilizes data from both ends (backend and frontend), and keeps the entire Enterprise network in sync, HTML5 comes short. That is my opinion and not trying to start a religious war. I am sure HTML5 is great for many developers. Its just not for us. We tried PhoneGap approach as well, but bridging something that belongs solely in the native layer and shoehorning it into the Web layer is not the right strategy to build mission critical apps. If HTML5 matures in the next five years, we will gladly change our position on the issue. But, for now we are dropping it. Enough Said!!!!

So there we go. This is the strategy for OpenMobster going forward. Your opinions are always welcome. 

Wishing everyone a very Happy New Year
Sohil
CEO, OpenMobster, Open Source MBaaS Platform




ShareThis

Thursday, August 1, 2013

Be a Mobster...We are Hiring!!!

Hello Mobile Community,

We are pleased to announce that OpenMobster is hiring. OpenMobster is an Open Source Mobile Backend As a Service platform designed specifically for mobilizing Enterprise data. We are looking for a self motivated and enthusiastic individual to join our Professional Services team. 

Required Skills

  • Solid experience with writing backend software for mobile apps
  • Solid understanding of architecting mobile apps and integrating them with backend systems
  • Experience building native Mobile Apps on Android and/or iOS Platforms
  • Experience with any of the MBaaS (Mobile Backend As a Service) platforms is a big plus
  • Experience with the OpenMobster MBaaS platform is a bigger plus ;)
  • Must have at least 5 years experience with the Java Programming Language
  • Experience with the Build Tool Maven is a plus
Responsibilities
  • Study business requirements for an App and turn it into code going through the Analysis and Design Phase quickly. No time for Analysis Paralysis in this phase
  • Ability to understand design level guidelines and produce working software 
  • Ability to work independently with developing different components of the software system

Job Title: Senior Mobile Engineer


Type of Position: Freelance/Contractor

If you are interested and only if you meet the above criteria, please contact: Sohil Shah at sohil@openmobster.com

Thanks
Sohil
CEO, OpenMobster, Open Source MBaaS Platform

ShareThis

Friday, June 14, 2013

Mobilizing MySQL: Backend Integration Deep Dive

In our previous post, we covered how to build, deploy and run the Android App that mobilizes a MySQL database.

In this post we will look at the code that goes into making this App. We will focus on the Backend OpenMobster API used to integrate the MySQL database with the Sync+Push engine. The next post will cover the Android code that processes the data being mobilized.

Objective
The OpenMobster Backend API consists of two main components. A MobileBean and a Channel.

To mobilize the MySQL database in our App, we need to develop a MobileBean component and a corresponding Channel component. Once, they are developed we register these components with the OpenMobster platform, and the Backend integration will be done.

MobileBean Component
Designing a MobileBean component depends on the object graph that is in question of being mobilized to the device. In our App we are going to mobilize a MySQL table called data_object. This table consists of the following columns:
  • id: A self incrementing primary key
  • syncId: a unique sync id to identify the object uniquely with the Sync Engine. This must be of type String

  • field1: contains field1 data
  • field2: contains field2 data
  • field3: contains field3 data
  • field4: contains field4 data
On the Java MobileBean side, this component is represented as follows:
import java.io.Serializable;
import org.openmobster.cloud.api.sync.MobileBean;
import org.openmobster.cloud.api.sync.MobileBeanId;

/**
 * This is the data that will be mobilized to the device. Over there it will be accessed using the MobileBean generic API
 * 
 * 
 * 
 * @author openmobster@gmail.com
 */
public class DataObject implements Serializable, MobileBean

The DataObject class implements the org.openmobster.cloud.api.sync.MobileBean interface. This is just a marker interface to signal to the Sync Engine that this object should be mobilized.
        private long id; //database oid
 
 @MobileBeanId
 private String syncId; //a unique sync id to identify the object uniquely with the Sync Engine
 private String field1;
 private String field2;
 private String field3;
 private String field4;

As you see in the code, you must designate a field that represents a unique syncId for the MobileBean component. You do that using the org.openmobster.cloud.api.sync.MobileBeanId annotation.

Full Source Code for this MobileBean component: https://openmobster.googlecode.com/svn/samples/mysqlapp/cloud/src/main/java/com/mysqlapp/cloud/DataObject.java

Channel Component
The Channel component exposes a CRUD (Create,Read,Update, and Delete) interface between the MobileBean component and the Sync+Push Engine. The developer must implement this component and register it with the OpenMobster platform. I will now briefly describe the Channel component for the MySQL app using some source code.

 
@ChannelInfo(uri="data_object_channel", mobileBeanClass="com.mysqlapp.cloud.DataObject")
public class DataObjectChannel implements Channel 

To start with you implement the org.openmobster.cloud.api.sync.Channel interface. In this process, you also provide some Channel metadata via the org.openmobster.cloud.api.sync.ChannelInfo annotation. The annotation takes two properties.

  • uri: unique name for the channel. This channel is identified on the device side with this name
  • mobileBeanClass: Informs the consumers of this component (the Sync+Push Engine) about the class that implements its corresponding MobileBean component
The MySQL App Channel uses the Hibernate framework to access the data in the relational database. You could use straight JDBC to hook in to the database as well. However, Hibernate provides a much nicer abstraction and we can easily extend this App to other databases like Oracle, MS SQL Server, PostgreSQL, etc, by some minor configuration changes.

readAll
 public List readAll() 
 {
  Session session = null;
  Transaction tx = null;
  try
  {
   List objects = new ArrayList();
   
   session = this.hibernateManager.getSessionFactory().getCurrentSession();
   tx = session.beginTransaction();
   
   String query = "from DataObject";
   
   List cour = session.createQuery(query).list();
   
   if(cour != null)
   {
    objects.addAll(cour);
   }
      
   tx.commit();
   
   return objects;
  }
  catch(Exception e)
  {
   log.error(this, e);
   
   if(tx != null)
   {
    tx.rollback();
   }
   throw new RuntimeException(e);
  }
 }


The readAll method returns all the MobileBeans managed by this component for mobilization with the device. Inside this method, you can always decide how much/which beans you want mobilized. A lot of the times, the App requires only a subset of all the data stored in the backend and not all the data. Another thing this method can do is figure out which user is accessing the Sync Engine and perform filtering/data isolation based on the user in question. In this particular App, it is returning all the beans stored in the data_object database table.

bootup
 public List bootup() 
 {
  //This implementation boots up the device with all the data in the database table to keep things simple
  return this.readAll();
 }

The bootup method is called by the Sync Engine when the channel on the device side is being initialized. This method returns a subset of all the MobileBeans that will be returned to the device. It returns just enough beans to make sure the App is in a functional state. How many beans and which beans to return is at the discretion of the App being developed. In our case, since there are not that many beans in question and to keep the implementation simple we just return all the beans stored in the database table.

read
public MobileBean read(String syncId) 
 {
  Session session = null;
  Transaction tx = null;
  try
  {
   DataObject dataObject = null;
   
   session = this.hibernateManager.getSessionFactory().getCurrentSession();
   tx = session.beginTransaction();
   
   String query = "from DataObject where syncId=?";
   
   dataObject = (DataObject)session.createQuery(query).setParameter(0, syncId).uniqueResult();
      
   tx.commit();
   
   return dataObject;
  }
  catch(Exception e)
  {
   log.error(this, e);
   
   if(tx != null)
   {
    tx.rollback();
   }
   throw new RuntimeException(e);
  }
 }

read, reads the MobileBean uniquely identified by the specified syncId from the backend storage system. In our case, it reads a row of data from the MySQL database table whose syncId matches the incoming syncId value

create
public String create(MobileBean mobileBean) 
 {
  ExecutionContext context = ExecutionContext.getInstance();
  Device device = context.getDevice();
  DataObject newObject = (DataObject)mobileBean;
  Session session = null;
  Transaction tx = null;
  try
  {
   session = this.hibernateManager.getSessionFactory().getCurrentSession();
   tx = session.beginTransaction();

   session.save(newObject);
      
   tx.commit();
   
   this.newBeanDetector.addSyncId(device, newObject.getSyncId());
   
   return newObject.getSyncId();
  }
  catch(Exception e)
  {
   log.error(this, e);
   
   if(tx != null)
   {
    tx.rollback();
   }
   
   throw new RuntimeException(e);
  }
 }


Creates a new instance of the specified Mobile Bean within the MySQL Database. It returns the syncId assigned to the MobileBean once persisted into the backend. This is invoked when a new MobileBean is created on the device and synchronized back with the backend.

update
public void update(MobileBean mobileBean) 
 {
  Session session = null;
  Transaction tx = null;
  DataObject updateThis = (DataObject)mobileBean;
  DataObject stored = (DataObject)this.read(updateThis.getSyncId());
  updateThis.setId(stored.getId());
  try
  {
   session = this.hibernateManager.getSessionFactory().getCurrentSession();
   tx = session.beginTransaction();
      
   session.update(updateThis);
      
   tx.commit();
  }
  catch(Exception e)
  {
   log.error(this, e);
   
   if(tx != null)
   {
    tx.rollback();
   }
   throw new RuntimeException(e);
  }
 }

Updates an existing instance of the specified Mobile Bean within the backend storage system. This is invoked when a MobileBean instance is updated on the device and is synchronized with the backend.

delete
public void delete(MobileBean mobileBean) 
 { 
  Session session = null;
  Transaction tx = null;
  DataObject deleteThis = (DataObject)mobileBean;
  DataObject stored = (DataObject)this.read(deleteThis.getSyncId());
  deleteThis.setId(stored.getId());
  try
  {
   session = this.hibernateManager.getSessionFactory().getCurrentSession();
   tx = session.beginTransaction();
   
   session.delete(deleteThis);
      
   tx.commit();
  }
  catch(Exception e)
  {
   log.error(this, e);
   
   if(tx != null)
   {
    tx.rollback();
   }
   throw new RuntimeException(e);
  }
 }

Permanently deletes the specified MobileBean from the backend storage system. This is invoked when a MobileBean is deleted on the device. The same change is then reflected on the backend by invoking this method on the Channel

Continuous Scanning and Data Push
In the OpenMobster platform, there is a provision to scan a Channel continuously for data changes. If data changes are found, these changes are pushed to the respective device. The scanning is done for three types of changes. Newly added data to the backend, data updated by other apps in the backend, and data deleted by others in the backend.  To support scanning and data push the Channel must implement a set of methods covered below.

scanForNew
public String[] scanForNew(Device device, Date lastScanTimestamp) 
 {
  Set newBeans = this.newBeanDetector.scan(device);
  
  if(newBeans != null && !newBeans.isEmpty())
  {
   return newBeans.toArray(new String[0]);
  }
  
  return null;
 }


Scan for any MobileBean creations in the backend that need to be synchronized with the specified device. Usually the algorithm to detect these changes depends on the type and schema of the backend being mobilized. In this particular app, the Channel keeps track of all MobileBeans associated with a device. When it finds a particular bean not associated yet, it detects the bean and signals the Push Engine to push those beans to the device.


Configuration
Now that the two Backend components have been developed, they need to be registered for execution within the OpenMobster platform. You do that using the META-INF/openmobster-config.xml file.

META-INF/openmobster-config.xml
The configuration registers two beans with the system. First one is a HibernateManager bean that provides all the necessary Hibernate services to the App. The second one, is the DataObjectChannel component. It injects the HibernateManager and the DeviceController services into the Channel. These services will be used by the Channel for their respective functions. To learn more about how these services are used by the Channel, I recommend looking at the full source code of the Channel component.

Hibernate Configuration

  • mysqlapp.cfg.xml: This is where you setup the connection to the MySQL database. You specify the JDBC Driver to be used, and the JDBC Url to access the database. You also specify other Hibernate settings in this file. This is the file to modify if you want to switch integration from MySQL to some other database like Oracle, MS SQL Server, PostgreSQL, etc.
  • mysqlapp.hbm.xml: This is the Hibernate mapping file used to map domain objects to tables in the database. This is a very simple mapping file for this App. All it does is it maps the DataObject  MobileBean component to a data_object table in the database.
Getting the Source Code for this App
The best way to learn the details of any new platform is to study the source code for an App that runs on that platform. The same applies to this MySQL App. You can get the source code for this App using the following command:

svn checkout http://openmobster.googlecode.com/svn/samples/mysqlapp
For a guide on how to Build, Deploy, and Run this App please look at: http://openmobster.blogspot.com/2013/06/enterprise-mobile-app-mobilizing-mysql.html

Our next post will cover developing an Android App that integrates with this MySQL Backend we developed in this post. Until then, let us know how our tutorials can be improved for the benefit of the OpenMobster Community!!!!

Thanks
Sohil
CEO, OpenMobster, Open Source MBaaS Platform


ShareThis

Wednesday, June 12, 2013

Enterprise Mobile App: Mobilizing a MySQL database

At OpenMobster, we have laser sharp focus on mobility for Enterprise information systems. Our entire architecture is designed from the ground up to mobilize data stored in various Enterprise backends. We enable mission-critical apps that have the type of features mentioned in this detailed blog entry. With that in mind, I thought to myself, wouldn't it be a good idea to develop an App that possesses all the above features and can be used as a tool for developers to learn how to build such an App. Hence, I have built an Enterprise App that shows end-to-end integration with a MySQL database backend. This App is built on top of the OpenMobster Mobile Backend Platform and has the following characteristics:
  • Enterprise integration using the Sync Channel Framework
  • Offline Support and Fast Data Access
  • Continuous Backend Scanning and Data Push from the Cloud
Before we start dissecting the code for this App, I would like to walk you through the Build, Deploy, and Run Phases of the App so you can use the App yourself and see what it can do. Here are the steps to use the App.

Video
The instructions that will follow in this blog entry are also executed in a video available on YouTube. To skip the instructions and jump to the App in Action jump to the 13:00 minute of the video. It will show how the App can be used including CRUD operations and Push Notifications from the Cloud.

Setting up the Development Environment
Part of getting your environment ready to run the App (both Android and Backend side), you must have the following installed:
  • Android SDK
After installing these systems, you have to register appropriate environment variables with the OS. For more details about setting up your OpenMobster environment please look at: https://code.google.com/p/openmobster/wiki/Build_OpenMobster_Development_Windows. Take a look at Step 5 to make sure your environment variables are set according to what is mentioned.

Get the source code for the MySQL App
The command to checkout the source code for this project is:
svn checkout http://openmobster.googlecode.com/svn/samples/mysqlapp

Build the project
To make sure everything is environmentally correct you should do a full build using the command:
mvn -DskipTests install

Prepare the MySQL database
You must prepare the MySQL database that will be used to integrate with this App. You can do this using the standard mysql command line tool that ships with all MySQL distributions. From the tool to create a database named mysqlapp issue the following command:
create database mysqlapp;

Run the OpenMobster Cloud Server
At this point, you are ready to run the OpenMobster Cloud Server that provides the Mobile Backend for the Android App. When you start the server, it will setup the rest of the MySQL database by adding the necessary table. The command to start the Cloud Server is as follows:
cd mysqlapp/cloud
mvn -PrunCloud integration-test

Install the App on an Emulator or a Real Device
Once, the Cloud Server is running, you are ready to use the App. To install the App on an emulator or a real device issue the following command:
cd mysqlapp/app-android
mvn -Papp-hot-deploy install

Start using the App
You are ready to use the App. You can perform all CRUD operations in the App and have the data synchronized with the backend in online or in offline state. Also, any data inserted into the database will be pushed to the App using the Push Notification Engine. To see this in action, you can insert data into the table using the following command:
insert into data_object (syncId,field1,field2,field3,field4) values ('1','test1','test2','test3','test4');

I hope these instructions allow you to Build, Deploy, and Run the App with end-to-end integration with a MySQL database. In the next few entries, we will dissect the code behind the App. Until then please take the App for a spin and let us know how we can keep improving!!!!

Update: A deep dive into the Backend integration code for this project is now published at: http://openmobster.blogspot.com/2013/06/mobilizing-mysql-api-based-backend.html.

Please stay tuned for the Android App deep dive in our next post. I would check back early next week. Have a great weekend!!!!

Thanks
Sohil
CEO, OpenMobster, Open Source MBaaS Platform
ShareThis

Wednesday, June 5, 2013

Architecting an Enterprise Mobile App

Enterprise Mobility is a growing trend. Many IT departments have started evaluating options for mobilizing their workforce, both in a Business-to-Employees and Business-to-Customers scenario. Despite the growing trend there seems to be a lot of confusion surrounding this topic.

In this blog entry I will try to throw some light on the various aspects of mobile programming that should be taken into account when developing an Enterprise Mobile App. This will be helpful for all the Enterprise architects looking at mobilizing their company's information systems. The goal is to provide enough architectural knowledge that can be used to build a robust App that is fully functional under all circumstances. Having said that, here are those architectural concerns presented as a list in no particular order of importance.

Enterprise Integration
On the backend side of things, there needs to be a way to integrate the existing information systems with the Mobile Backend Platform. Usually the Mobile Backend Platform provides an Enterprise Integration Framework to plugin to these information systems. What is involved in the integration is up to the scope of the integration framework and the API of the information system in question. In my opinion, a combination of HTTP+REST+JSON is perfectly suited to make this integration possible. But, there are times where you are integrating with a legacy system and this option is not available. Sometimes your best option is to integrate directly with the database of the information system. Whatever strategy you follow, the goal is to extract the data from the information system and hand it over to the Mobile Backend Platform. Once the data is consumed by the Mobile Backend Platform, you move over to the next aspect.

Offline Support and Fast Data Access
Enterprise Apps are mission critical apps. They need access to data under all circumstances. Network or no Network, the app should remain fully functional. When offline, the App must record all updates in data and replay it with the backend once the network is found. Also, from a user standpoint this should happen automatically and behind the scenes. Mobile Backend Platforms make this simple for programmers by providing a client side library to handle offline support. These do all the heavy lifting of detecting networks, recording updates, querying local data, and replaying the update queue to send data back to the Enterprise information system. From a programmer standpoint, you have to get familiar with the API to the client library of the Mobile Backend Platform. As a side effect of having offline support, your App data access is much faster as compared to loading the data from the network on every request. Since the data is located locally on the device, querying is orders of magnitude faster.

Continuous Scanning and Data Push
Every App must stay current with the latest data in the Enterprise information system. To make this happen, there needs to be a way to scan the backend data continuously and then detect changes. These changes must then be pushed to the respective devices via a Push notification. The Push notification does not carry any data. It is just a tickle to the device to wake it up and do a data sync with the backend. After the sync, the new data is available on all the devices that the data belongs to. From a programming standpoint, the Enterprise Integration Framework provides a data scanning API that must be implemented by the App developer. Once the changes are detected and provided to the Mobile Backend Platform, it takes care of the data pushing and syncing. It also manages a Push queue for each device in case they are offline. The data is pushed to them the moment they come online

Data Replication
Any data updates on a device must be replicated and pushed to other devices that are associated with the said data. The Mobile Backend Platform takes care of this service for you out-of-the-box. On the device side data is updated via the client library by the App developer. From there on the Mobile Backend Platform takes over. The client library synchronizes the change with the backend. When the change hits the backend, it figures out all the devices associated with that data. Based on that information, it uses the Push Notification service to push the changes to those devices. This way the data stays in sync between all the devices across all the Enterprise users

Authentication
The Enterprise Integration Framework should provide an Authentication Plugin to hook into Enterprise Authentication systems like Active Directory, and LDAP. On the client side, each request should then be authenticated against this plugin as them come in to the backend. Another optimization you can do is to issue a client token upon first successful login with the system. Instead of passing around the password, you just pass this client token with each request.

Platform Support
At the outset of any Mobile App you must decide what platforms to support. You probably have to decide between the 4 most popular platforms, Android, iOS, Windows 8, and BlackBerry. This applies if you decide to take the native App route. For a HTML5 App you would take a Web App Development approach using the browser as the platform. With my personal experience, it is very difficult to implement an HTML5 Web App on top of a browser with all the above mentioned features. For the above mentioned Enterprise features, you are most likely better off developing a native App. For cross-platform support you could build the App using HTML5 using the PhoneGap framework. This typically qualifies as a Hybrid App (best of both worlds). It is deployed and run as a native App, but developed as a HTML5 Web App. You just have to make sure that your Mobile Backend Platform, provides a JavaScript API for PhoneGap to integrate with your client library. OpenMobster provides this support out-of-the-box

Whereas this is by no means all the challenges of a Mobile Enterprise Architecture, I hope it gives you a guide to proceed with the initial architecture of your Mobile project. Your feedback is most welcome.

Thanks
Sohil
CEO, OpenMobster, Open Source MBaaS Platform



ShareThis

Tuesday, June 4, 2013

Dissecting the Google MBaaS platform

As you may have heard, Google just announced their MBaaS platform running on top of App Engine. After taking a look at the features involved I thought it would be a good idea to dissect them a bit.

To be clear, this blog entry is not about applauding or criticizing the features, but more geared towards figuring out what features make up a successful backend platform for mobile apps.

  • Cloud Data Storage/Synchronization: Storage is easy. Synchronization is not. I am glad Google decided to support this feature. It is probably one of the most important feature needed for a mobile app. Mobile architects sometimes opt for an "online-only" mode of operation for their App just because its cost prohibitive to build your own sync functionality. It is great to know that a company like Google has taken the sync route with offline app capability. To be honest, sync is not just about offline capability. It has a lot to do with latency as well. Local data is always much faster to access than remote data, especially with dealing with large data sets. So between offline capability and fast data access, sync becomes a very important feature of a mobile app. Google providing this feature in their MBaaS stack, validates this argument.
  • Pub/Sub Messaging: Send messages from one device to any or all other devices. You can easily use 1:1 or 1:many devices or broadcasting. This is also another important feature. Sync is not just about moving data from one device to the backend. Depending on the relationship of the data with other users, it is very important to move data to other devices. OpenMobster's Sync platform provides this data replication feature out of the box without requiring any additional programming on the part of the App Developer. I have not used the Google MBaaS to know if there is any special programming needed to make this happen on the Google MBaaS platform. It would be great if someone with experience with the Google platform can elaborate on this feature a bit more.
  • Enterprise Integration Framework: All MBaaS Frameworks catering to the Enterprise market provide some form of integration framework to connect their MBaaS platform services with data stored in arbitrary data sources. These sources are typically Enterprise systems like SalesForce.com, Microsoft CRM and SharePoint, Oracle Database, etc. It could also be an Enterprise's SOA infrastructure that they could have built out over the years. The Google platform does not provide any infrastructure to connect with the Enterprise systems just yet. It remains to be seen if they move into the Enterprise market by introducing such a framework or focus primarily on Consumer oriented Apps.
  • Push Notifications: Data updated on one device is automatically available on all devices using GCM for Android. I personally like this data oriented use of Push notifications very much. It has been supported in OpenMobster since the very beginning. What pains me the most is when people like Apple don't get it. They think Push notifications is about sending "You've got mail" like updates to the device's Notification Framework. Far from it. Push Notifications in an Enterprise sense is about sending a tickle, initiating a background sync operation, downloading new data, and then either staying silent or notifying the user about new data. Data should always be first and ready on the device. Not dependent on whether the user launches the App by clicking on the notification. Its too late then. Apple does not get it and it would probably require some major changes to the iOS system to be able to handle Push notifications in the above mentioned workflow. 
  • Continuous Queries:  Create queries that run continuously on the server, automatically feeding data updates to the client. This is another very important mobile app feature. The key is to make sure the queries are running on the server and not the client. You may think that is obvious, but due to some platform limitations, you may not have a choice but to run queries from the client to keep the data most up to date. Android is a very sexy platform that has great support for background components. Hence, the Push notifications framework using GCM is able to provide the workflow that it does. Same way, since data push is possible, data querying for updates can be done on the server instead of the client. Client querying is horrible for battery life. OpenMobster also provides this same feature via its Enterprise Integration Framework. The difference is that you can continuously query arbitrary Enterprise data stores.
  • Google Authentication and Authorization: Looks like the Authorization piece helps with data isolation between the users and allowing data sharing where it applies. There is not much information provided on the authentication front. Does it allow authentication with Enterprise systems like Active Directory, and LDAP. Once again, it remains to be seen how inclined this framework is going to be to support the Enterprise use case.
  • Platform Support: I was a bit surprised that Android was the only supported platform. Seeing that iOS is hugely successful in the consumer space, at least there would be support for it. May be it is in the works. From a technology standpoint, the Sync+Push use case is not easy to support on iOS as they do not allow background processing. May be that is the deciding factor in not being able to support iOS. This is one of the challenges we face with the OpenMobster iOS SDK. Data replication is not real time. Period. That makes for less than optimal user experience. Another platform I can think of that Google may support in the future is a JavaScript SDK for HTML5 based Web Apps. I would be curious to find out the challenges in developing the Sync+Push use case for this platform as well. We have not attempted to solve the HTML5 Web App puzzle at OpenMobster. We do have support for HTML5 based Hybrid Apps using the PhoneGap framework. From a technology standpoint not much really changes. It still runs as a native service. Its just that this native service is exposed via a JavaScript API for the hybrid App.

So there it is. My 2 cents on the Google MBaaS platform. Overall, I am very pleased to see the features that are supported and the clarity with which they are presented. It was about time they threw their hat in the MBaaS ring. Sravish Shridhar, of Kinvey once joked on twitter that there are more vendors in the MBaaS space than there are customers. Lol....Well said!!!!

Thanks
Sohil Shah
CEO, OpenMobster, Open Source MBaaS platform   
ShareThis

Thursday, May 9, 2013

Open Source Enterprise MBaaS platform: Get Started Guide

These are exciting times in the MBaaS (Mobile Backend As a Service) marketplace. The last few weeks have seen a couple of very strategic acquisitions that validate this new category of software in the mobile space.

At OpenMobster we are gearing up to become a major provider in the Enterprise space. While other MBaaS players are trying to figure out their niche (Consumer Apps, Enterprise Apps, or both), we at OpenMobster are primarily focused on mobilizing Enterprise backend data. Keeping that in mind, we constantly work on our Sync and Push services. Our next avenue is going to be creating a free and open source SDK for the SalesForce.com Cloud Service. The ultimate goal of this project is to provide a free and open source solution for Enterprises looking to build strategic mobile apps.

With that in mind, I would like to present a very simple Step-by-Step guide on how to get started with the OpenMobster MBaaS platform.


Step 1: Prepare the JBoss AS5 server with the OpenMobster Cloud Server
Download OpenMobster 2.4-M2 binaries. Extract the zip file. You should see a cloudServer folder among the list of folders in the binary distribution.
Download JBoss 5.1.0 server from here. Extract the zip file.
Now install the OpenMobster Cloud Server into the JBoss AS. You can do that by copying cloudServer/hsqldb/openmobster to the JBOSS_HOME/server directory
cp -r cloudServer/hsqldb/openmobster $JBOSS_HOME/server/openmobster

Step 2: Run the OpenMobster Cloud Server
Go to $JBOSS_HOME/bin directory. Inside there type in:
./run.sh -c openmobster

On Mac OSX and some flavors of Linux, you will find that you need Admin rights to run a web server on port 80. Hence, if you get an error binding to port 80, the above command needs to be:
sudo ./run.sh -c openmobster

Step 3: Run an Android Emulator or connect an actual device to the computer via USB

Step 4: Install the CRUD Sync App
Download the CRUD Android Sync App. Install this App onto the emulator or the device using the following command:
adb install -r crud-1.0-zipped.apk

Step 5: Activate the CRUD App with the Cloud Server
When the CRUD App is launched you will be presented with the Activation Workflow. It will collect 4 values:
Server: The IP or FQDN address where the Cloud Server is running. In case of an emulator connecting to localhost, you can use the value: 10.0.2.2
Port: Port where the Cloud Server is running. The default value is 1502 and is pre-filled
Email: A valid Email Address
Password: Password to be associated with this user/device


Thats it. In 5 easy steps you should be able to get up and running with an End-to-End Sync App with Push notifications.

I value community feedback very much. If you run into any unexpected issues with these steps, please report them in the Comments section. It will be of great benefit to the OpenMobster Community in general.

Next: Creating an Enterprise App using the OpenMobster MBaaS Platform

Thanks
Sohil
CEO, OpenMobster, Open Source MBaaS Platform

ShareThis

Friday, February 8, 2013

Building an Enterprise Mobile Backend As a Service (MBaaS) stack


MBaaS, Mobile Backend As a Service platforms have come a long way in the last couple of years. What started off as a movement for helping Consumer App developers quickly build apps has now reached a specialization point. The MBaaS stack is now being specialized into a few verticals. Just last week OpenKit, Open Source MBaaS platform for Game Developers went live. Similarly, the Enterprise space is shaping up to be one such big vertical in this category. OpenMobster has always focused on the Enterprise space and catered its services towards mobilizing Enterprise data. With the Enterprise in mind, I would like to discuss in details what goes into building an Enterprise stack in mobile.

I stay up late at night wondering what services are relevant for the Enterprise mobile stack. So far I have come up with 4 services.

Data Synchronization 
In my opinion, data synchronization is the most important service for mobilizing Enterprise data. Apps have a local database to store Enterprise data in and work in both offline as well as online mode. However, data sync is the component that makes this a successful strategy to make sure the data integrity is always maintained between the local database and the remote database. A typical data synchronization service should provide the following features:
  • Enterprise App Integration : A developer framework to integrate the backend Enterprise data with the Sync Engine. A good framework would provide a CRUD framework and not expose any Sync details to this component. This framework will also have provision to check data updates to the backend and communicate changes to the Sync Engine for pushing data updates to the devices. 
  • Data Security: The data sync service should always provide the option to secure the local data by optionally allowing storage in an encrypted format. You should be able to access both encrypted or unencrypted data via the same API as a developer. Besides, data security at rest, it should also provide encryption of data in transit between the device and the Cloud. 
  • Data Replication: Part and parcel of keeping data in sync with the backend is also replication, where data is kept in sync with other devices that are synchronizing their data with the backend. For instance, you could have multiple devices registered with the system for synchronization. If the data on one device changes, the same change needs to be replicated across the other devices. The data replication should be device platform agnostic.
  • Offline Mode: With Data Sync you should be able to develop Apps that function 100% whether they are offline or online. When offline, the CRUD operations performed should be queued for synchronization when the network returns. The synchronization should be seamless and automatic when the device goes back into online mode. 
Data Storage
The backend provides a storage mechanism in the Cloud for data originating on the device. Unlike data sync, this service is typically functional only in the online mode in order to access the data stored in the Cloud.

  • Enterprise App Integration: Provide a developer framework to integrate the backend Enterprise data with the Storage Engine. A good framework will provide a CRUD framework for the components. There would also be provision for searching through the stored data so as to download only a subset of data at a time.
  • Data Security: In this service, only the data in transit between the device and the Cloud need to be encrypted. On the device side it is not stored in local storage so there is no need for encryption. Typically SSL provides the most efficient way to encrypt the data in transit
  • RESTful API: The cleanest way to interface with this Storage Engine from the device side is by using a RESTful API. The Enterprise App integration framework automatically generates a RESTful API for its data. This RESTful API is then accessed by the device via HTTPS and JSON object representation. A good system will not expose the REST stuff to the App developers. App developers would just provide App Integration components. From the components, a RESTful API will be auto generated.
In the OpenMobster MBaaS platform, Data Storage will be implemented and called the LiveBeans Framework. This framework is currently in the prototyping phase. 

Push Notifications
A way for the backend to push information originating in the Cloud to the device in realtime. 

  • Cross Platform API: This service should provide an API for sending push notifications to devices in the system. This API should be cross-platform in the sense that the same API should be able to Push content to different types of platforms. As far as the client code making the API-call goes, they should be sending the notification to a user and his device and not to a particular platform. Behind the scenes of course the engine detects the platform that is targeted and routes the notification accordingly.
  • Sync Engine Integration: The Push Engine should be tightly integrated with the Sync Engine. In this way, any new data originating in the Cloud is automatically pushed to the respective device in realtime. This saves a lot of battery life as the App does not have to poll the  server for data updates. Updates are pushed down when they are ready.
Security
The security service is important as it deals with securing the Enterprise data that is being mobilized

  • Secure data at rest:  This makes sure that optionally the data stored on the device is encrypted. It integrates with the Sync Engine to provide this service.
  • Secure data in transit:  This makes sure that all data traveling between the device and the Cloud is encrypted. The SSL technology is by far the most efficient and standardized to handle this aspect of security.
  • User Management: Maintains a database of users allowed to access the Cloud and its data. Provides proper activation from the App using proper credentials. Provides a plugin framework to integrate with 3rd party directory services like LDAP, and Active Directory.




I am sure as the Enteprise Stack matures, there will be more services added to the fold. In fact I am sure I could have missed a service or two in this analysis itself. Being an Open Source product, part of our job is to listen to the Community for new feature requests. I would like to get your valuable feedback on what services should make the cut in an Enterprise MBaaS stack.


Thanks
Sohil
CEO, OpenMobster, Open Source MBaaS platform
ShareThis

Thursday, January 10, 2013

Mobile-Backend-as-a-Service: Open Source MBaaS vs Cloud-based MBaaS


MBaaS, short for Mobile Backend As a Service, is a mobile architecture component used for easily integrating mobile apps with backend data and services. A typical MBaaS platform provides the following services:
  • Data Synchronization: Bi-directional data sync between the mobile database and the backend database. This allows apps to be fully functional even when offline. Later when they come online a bi-directional sync synchronizes the data in both the databases.
  •  Data Storage: The backend provides a storage mechanism in the Cloud for data originating on the device. Unlike data sync, this service is typically functional only in the online mode in order to access the data stored in the Cloud.
  • Push Notifications: A way for the backend to push information originating in the Cloud to the device. 
  • Security: This service makes sure the data exchange between the App and the Cloud is always secure and encrypted. It also links to the backend user directory to identify/authenticate users that are connecting from the mobile app.
For anyone trying to use an MBaaS service, they should know that MBaaS platform comes in two flavors. A hosted Cloud based MBaaS, or an on-premise offering which is typically Free and Open Source in nature.

This article is about comparing and contrasting these two flavors so as to simplify the decision making between the two.

Enterprise Integration

Open Source MBaaS is a more natural fit for Enterprise integration since it will usually come with out-of-the-box integration framework that is technology-agnostic. You can write your connectors based on your Enterprise Integration platform and drop the components into the MBaaS runtime. The MBaaS platform adapts to your Enterprise system as opposed to the other way round. Also, the Enterprise data never leaves the system onto a third-party Cloud so the integration is much more secure.

In the case of a hosted Cloud MBaaS, Enterprise integration is not that natural. This is because of being provisioned in a Black Box stored in the Cloud, it is not easy to extend the system and mold it to fit into whatever your Enterprise Integration platform is. In majority of the offerings, Enterprise integration is not an option. The rest that do provide the option, the integration feels more like a round peg and square hole. It typically involves adapting some form of your Enterprise system to the integration framework laid out by the Black Box in question. This relates to the protocol and programming languages used to perform this integration. You cannot adapt the Black Box to talk to your system like in the OSS model. Instead you have to adapt your system to talk to the Black Box. Also from a security standpoint, you have to poke a hole in your firewall and expose your valuable data to a third-party Cloud system. A system you have no control over. 

In a nutshell, for Enterprise Integration, the Open Source MBaaS solution is a much natural fit compared to the hosted Cloud based MBaaS solution.

Ease of Use

The Cloud MBaaS platform wins in the Ease of Use category. This is both from a Getting Started standpoint as well as Deployment standpoint. Following a simple registration process you can typically get up and running following their instructions. From a deployment standpoint, you do not have to wait on your IT folks to provision the infrastructure needed to run the MBaaS system in house. The system is provisioned and scaled automatically by the Cloud.

The Ease of Use is not so bad for the Open Source MBaaS either. Depending on the quality of documentation of the project, you can get up and running fairly quickly. Most packages come with a quick "Hello World" guide that you can read to get up and running in a few minutes. As far as deployment goes, the OSS software can be run locally on the developer machine without having to wait on the infrastructure provisioned. As the development progresses you can setup multiple MBaaS instances, say one for testing and another for production, etc. 

Pricing Structure

The Cloud MBaaS system uses a usage per month based pricing. This is typical of any Cloud based system and there are no surprises here. Some vendors also provide a freemium model where usage of resources up to a certain limit is free. Depending on the services provided by the platform the pricing is based on the following resources:
  • Number of API calls per month
  • Number of Push Notifications per month
  • Number of Sync Sessions per month
In the case of Open Source MBaaS, the same Open Source model applies. The software is Free and Open Source for use. For organizations that are looking for Technical Support, you can get Professional Services from the company sponsoring the Open Source project. Not all projects will have a company backing the project. This is something you must evaluate when looking at the Open Source MBaaS solution. In case of the OpenMobster MBaaS solution, there is a well funded software company called OpenMobster backing the solution. 

At OpenMobster, we provide a wide array of Professional Services including Consulting, Training, and Production Support.

MBaaS is a growing market in the mobile space. This was my attempt at making some sense out of what to expect from different types of MBaaS solutions in the marketplace. At this point I would like to open a discussion with the Community related to this topic.

Thanks
Sohil
CEO, OpenMobster, Open Source MBaaS solution










ShareThis

Wednesday, December 12, 2012

OpenMobster 2.4-M2 released

Hi,

Santa has been working overtime. As a result, I would like to announce the release of 2.4-M2 (Milestone 2) of the OpenMobster Mobile Backend As a Service (MBaaS) platform, way before Christmas ;) 

Highlights


  • A significant Performance Enhancement by upgrading the MINA framework from 1.1.5 to 2.0.7. The dataService code had to be changed for the upgrade because the two versions are not API compatible. We prototyped Netty as a candidate for replacement, but got some very bad CPU usage which we couldn't work around. 

Going Forward: Immediate focus

  • Prototyping BlackBerry Support. We want to add our next development platform to the mix. BlackBerry 10 will be supported before Windows Phone 8 (Customer requests)

  • Prototype Mobilizing Enterprise data using REST/JSON. I really need a one word name for this functionality. To elaborate, Sync is still king and uses locally stored data automatically synchronized with the Enterprise backend. This service is about mobilizing the data in an online only setup using a REST API and JSON transport representation. The developers only have to plugin to this engine using a simple interface and all the details about supporting a REST API and JSON handling would be taken care of by the engine. The data will not be stored locally and each request would invoke the network service. This is a complementary service to the Sync Engine giving the developer more choice about how to mobilize their Enterprise backend. I will have more on this service as the prototype progresses. Stay tuned!!!!!


We would like to know your requests as this is the start of a new development cycle. Your input will help us prioritize our tasks.

The software is now available here: https://code.google.com/p/openmobster/downloads/list

Merry Christmas and a Happy New Year
Sohil
ShareThis

Friday, November 9, 2012

OpenMobster 2.4-M1 released

Hi,

I would like to announce the release of 2.4-M1 (Milestone 1) of the OpenMobster Mobile Backend As a Service (MBaaS) platform. 

Highlights

  •   Re-architected the Android SDK such that the CloudManager App is no longer necessary to be installed on the device. The Apps now contain a fully functional Cloud runtime without delegating to an outside App. 

  •   This greatly simplifies the distribution/provisioning of individual Apps.

  •   The CloudManager App still serves a purpose. It is used to enable Device Management functions like Remote Wipe and Remote Lock in. However, it is not mandatory to install the CloudManager App like before.

  •   The CloudManager App also provides the Corporate App Store functionality to install Apps installed in the JBoss AS

  •   The system is Production Quality. Fully Load Tested

Going Forward: Immediate focus

  •   Performance Enhancement by upgrading the NIO Framework from Apache MINA to JBoss Netty. This will have to pass some prototyping before this move is made.

  •   Prototyping Clustering Support. We want to reach new heights in scalability by supporting a Clustered version of the Cloud Server in 2.4

  •   Prototyping BlackBerry Support. We want to add our next development platform to the mix. BlackBerry will be supported before Windows Phone 7 (Customer requests)


We would like to know your requests as this is the start of a new development cycle. Your input will help us prioritize our tasks.

The software is now available here: https://code.google.com/p/openmobster/downloads/list

Enjoy!!!
Sohil
ShareThis

Thursday, September 27, 2012

OpenMobster Mobile Enterprise Backend (MBaaS) version 2.2-RC1 released

Hello OpenMobster Community,

I would like to announce the release of 2.2-RC1 (Release Candidate) of the OpenMobster Mobile Enterprise Backend (MBaaS). 

Platforms Supported
  • Android
  • iOS
  • Location-Oriented Apps
  • Support for Offline Apps

Release Highlights
  •  iOS Sync Plugin for developing PhoneGap based offline/sync web apps on the iOS platform. Android was already supported in the previous release (2.2-M8)
  • Push Infrastructure Performance Enhancements
  • Internal Messaging Bus Infrastructure Performance Enhancements
  • Sample App bug fixes. Sample Apps are the best way to learn to develop Apps on this platform
  • Making the system Production Quality. Fully Load Tested
Going Forward: Immediate focus
  • The 2.2 branch is now feature complete. Only bug fixes will be added to this branch.
  • Prototyping Clustering Support. We want to reach new heights in scalability by supporting a Clustered version of the Cloud Server in 2.4
  • Prototyping BlackBerry Support. We want to add our next development platform to the mix. BlackBerry will be supported before Windows Phone 7 (Customer requests)
We would like to know your requests as this is the start of a new development cycle. Your input will help us prioritize our tasks.

The software is now available here: https://code.google.com/p/openmobster/downloads/list

Enjoy!!!
Sohil
ShareThis

Tuesday, June 19, 2012

OpenMobster Professional Services Launched

Hello OpenMobster Community,

Just wanted to shout out and let everyone know that OpenMobster Professional Services are now available through www.openmobster.com.

The Community forums will always remain the place for asking questions and getting answers. 

The Professional Services are an enhancement to that workflow for individuals and companies requiring a little extra attention. For details about services offered please see the following:



Thanks
Sohil
ShareThis

Monday, March 26, 2012

Developing Synchronized Offline Apps using the PhoneGap Sync Plugin

This tutorial covers how to develop an offline sync app using the OpenMobster Sync Plugin for the PhoneGap framework. You can develop your App using HTML5 and Javascript instead of the native programming language.

Features:


  • two way synchronization between the local sqlite database and the corporate backend in the Cloud


  • Offline mode operation. All data changes are tracked and auto synchronized with the Cloud once the connection returns


  • Use of Push notifications to push data changes from the Cloud to the device


  • Support for replicating changes to multiple devices like iCloud does


  • A Java based Channel Framework for integrating your backend with the Cloud


Tutorial: http://code.google.com/p/openmobster/wiki/PhoneGapGetStarted

Thanks
Sohil
ShareThis

Thursday, March 8, 2012

Coming Soon: Offline Web Apps

Just wanted to inform the community whats cooking at OpenMobster. March is going to be an exciting month of development. The focus is going to be developing support for offline web apps.

To clarify: Web Apps are apps that are written using web technologies like HTML5, javascript and css. As such they are hybrid apps as they run as apps and not in the browser. This wrapping is provided by technologies like PhoneGap. So as a developer you pick web technologies like JQuery, Sencha Touch or straight up HTML5. Develop the web app and then deploy it as an app using PhoneGap.

Now, the Offline capability is then provided by the OpenMobster Sync service. You store the app data as MobileBeans in OpenMobster sync channels using the OpenMobster Javascript library. Once the channels are stored with Mobile Beans, they are automatically managed and synchronized with the Cloud. On the Cloud nothing changes except for developing your Java based Sync channels.

The OpenMobster Javascript library will be part of the development of the OpenMobster PhoneGap plugin.

This will be available in the next release 2.2-M8 on Android and 2.2-M9 on both Android and iOS.

Following this integration, developers will be able to take their web apps offline and leave the synchronization worries to OpenMobster.

Enjoy!!!
Sohil
ShareThis

Thursday, February 16, 2012

OpenMobser 2.2-M7 released

I would like to announce the release of version 2.2-M7 of the OpenMobster Mobile Cloud Platform. There were a couple of areas of focus, followed by bug fixes and enhancements. For a detailed report on the tasks please see here.

Highlights:

  • Device Administation: Remote Wipe and Remote Lock functionality was added to the Management Console
  • Device-To-Device Push Framework: A framework for communicating between devices was created. Using this you can develop interesting apps like chat and instant messaging. Give it a try!!!
Whats coming in 2.2-M8?
    Download this release

    Enjoy!!
    Sohil
    ShareThis

    Monday, December 12, 2011

    OpenMobser 2.2-M6 released

    I would like to announce the release of version 2.2-M6 of the OpenMobster Mobile Cloud Platform. There is one main area of focus in this release and a good number of enhancements and bug fixes. For the list of tasks see here.

    Highlights:

    • A Framework for developing Location Aware Apps. You can get started with the following instructions.
     
    Download this release

    Enjoy!!!
    Sohil
    ShareThis