Mobile application development and serverless computing are high priorities for enterprise developers and application architects. Naturally, serverless mobile applications offer an intriguing intersection of the two concepts.
While development and operations teams are interested in serverless mobile app frameworks, they are largely unsure which tools and techniques to use, as serverless computing is still in its infancy. Among the major public cloud providers, for example, there are vast differences in features and approaches.
A development team's choice of cloud platform will shape its serverless mobile development approach. AWS and Microsoft Azure each created its own general framework for serverless computing -- AWS Lambda and Azure Functions -- while Google has lagged behind with the serverless capabilities of Cloud Functions and App Engine. Apache OpenWhisk is an open source serverless cloud option as well.
Mobile applications can benefit from serverless components, as long as developers focus on the right areas. Serverless should not degrade the user experience. Don't introduce so much programming specialization that it becomes difficult for mobile development teams to cope with new techniques. Generally, development teams should put a front-end process between the mobile user and the serverless components.
Set serverless app boundaries, requirements
Serverless computing is really about event processing. When you plan out a serverless mobile app, consider what the events are and how they differ from transactions. Generally, an event is a signal for attention, while a transaction is the recording of a business process step. In the serverless mobile design process, decide where to place the serverless boundary. This boundary point determines what tools you can use for serverless mobile apps and how to use them.
If a mobile app framework needs formal, traditional or online transaction processing with multistep dialogs to inquire and update, use the serverless cloud provider's mobile front-end tools to create sequential events. Most enterprises build mobile apps based on traditional web front-end processes, because both designs have similar requirements. However, end users are accustomed to traditional GUIs, the design of which is more easily controlled via traditional web and mobile front-end development methods, as opposed to serverless.
AWS and Microsoft push developers to their respective mobile web services, such as AWS Elastic Beanstalk or Azure App Service, to create the front end and then serverless computing to process the output of the front-end elements. There are also mobile PaaS options available from third parties, such as Jelastic, that provide a scalable front-end model for mobile apps. The IT team typically distributes mobile front-end processes in the cloud for geographic and scalability reasons, and the cloud generates eventlike output messages, which can be processed as functions.
All serverless mobile app developers should study how Google Cloud Platform integrates web or mobile front-end activity with serverless event handling that connects to traditional back-end applications. While you can apply the Google Firebase model with other cloud providers, the integration is harder to visualize, as the serverless mobile app framework isn't presented as a complete package. The Firebase model enables serverless technology to process events generated by the web server front-end activity. In these cases, enterprises already successfully distribute web front-end technology, so the model uses serverless where simple web processes won't suffice.
Web front ends, like all web processes, are based on a stateless REST interface model. Consequently, the web or mobile GUI typically contextualizes multistep relationships and converts between transactions and events. In some cases, such as simple inquiry-response or POST/GET relationships, the front-end outputs could be compatible with serverless processing without any additional steps, but in others, context control is still needed.
Design in context control
Each public cloud provider offers a mechanism to add context in a serverless mobile app's design. AWS Step Functions provides orchestration of serverless features into stateful sequences that can execute functions to process transactions. Microsoft's Logic Apps and Flow offer integration with app-dev tools and serverless, while Firebase tools provide a serverless mobile app framework, including contextualization and workflow management.
It's just as important to apply contextualization tools when the serverless component of the design doesn't use a web or mobile front-end element but instead supports a mobile application directly with event-based functional computing code. Some mobile features gather information from external sources rather than provide traditional GUI-driven user support. These types of applications, such as ones that scan goods for inventory and security checkpoint logging, require some minimal form of context control to enable the user to replace something recorded in error.
Consider cloud providers' IoT tools as the basis for this kind of application, rather than writing contextual functional code in-house. Not only can functional computing result in delays as an instance of the event process spins up and executes the work, but contextualization tools like Step Functions come with a steep learning curve for IT people who have no experience in event-driven programming.