Advertisment

Enabling SMS Channel for Your Existing Enterprise Apps

author-image
PCQ Bureau
New Update


Advertisment

Snapshot

Applies to: Enterprise Apps Developers



USP: An open source SMS framework for businesses to add SMS channel to their apps

Primary Links: None


Search engine keywords: Open-source based SMS framework , PhoneGap, Sencha

Advertisment

Girish Dhanakshirur, Emerging Technology Institute, IDT Lead, IBM India

The 90s saw an explosion of Internet-based business applications, where companies moved their traditional enterprise applications to web-based model. In recent years, companies are repeating the same phenomenon --writing enterprise applications to run on mobile phones. Open source frameworks, such as, PhoneGap, Sencha, and others are helping enterprises develop and deploy mobile applications. Although this trend is true in the western markets where both network and smartphones have advanced in terms of capabilities while growth markets still lack stable, reliable and ubiquitous Internet connectivity. Businesses still rely on a popular messaging technology, called, Short Message Service (SMS), to provide services. In this article, we propose an open-source based SMS framework that businesses can use to add SMS channel to their existing enterprise applications.



SMS Framework

Advertisment

A typical web application, modeled on Model-View-Controller (MVC) pattern, the view is the presentation layer that handles data validation and presentation details and delegates the application flow back to the controller. To enable SMS technology in such applications, the SMS interaction module can be considered as the view letting application developers reuse the model and controller code as-is.

Now, implementation of such SMS view poses a number of technical challenges. For example, SMS messages cannot exceed 160 characters therefore, the prompts, labels, etc should be handled appropriately, perhaps by splitting, sequencing and reconstructing them.

Unlike web clients where cookies can be used to track sessions, SMS is session-less interaction, so in order to implement dialogs a fake session will be required. Guaranteed delivery is another challenge, where the client device may go offline from minutes to hours and multiple retires, based on certain policy will need to be implemented. Absence of HTTPS and other authentication mechanisms over SMS is another challenge while considering security.

Advertisment

Although these short-comings can certainly be implemented in the application logic, a framework, let's say SMS Orchestrator, that addresses all the above would be desirable.



SMS Orchestrator

Advertisment

The SMS Orchestrator framework can be implemented as a component that runs in any web container. It comprises of the following modules that run on open source technologies: A run time Web Application Archive (WAR) that runs on any servlet container, such as Tomcat. It uses MySQL to store session information. A tooling Eclipse plugin to help in developing SMS applications to run on SMS Orchestrator. A Dojo-based light weight SMS simulator to help in testing applications without requiring an actual phone to test. Kennel, an open source SMS Gateway, can be used for system testing.

Advertisment



Modules that make up the SMS Orchestrator

Inbound Servlet decodes the incoming message from the SMS gateway and passes to the Request Handler component. Request Handler checks the channel policy to determine whether the request is permitted and forwards the request to the Dialog Manager. SMS Policy Manager validates the incoming messages against a set of predefined policies. If validation fails, then no further processing is needed. Dialog Manager enables to have a conversation with the user. It will need to keep track of sessions that can keyed off the users phone number, which gets sent in the request. This session can be persisted into a database.

Response Handler processes the normal reply and exception, determines the destination phone number from channel context, and calls the Outbound Dispatcher to send reply SMS message.

Advertisment

A Delivery Report Handler (DLR) handles delivery report confirmation from the gateway.

Outbound dispatcher dispatches the message to the SMS gateway. Configuration file persist all the configuration details, like the gateway URI, authentication information, policy information, operation to be called for a particular short code/keyword. An Eclipse plugin that offers editors, project creation wizards, samples, etc that will aid in developing SMS applications.



SMS Orchestrator Framework scenarios

Many real-world problems can be addressed using the SMS-Orchestrator framework. For example, a Pizza store may send out SMS notification the moment pizza is ready to be picked up. Another example is booking a movie ticket. In this case, the user sends an SMS to the movie application providing the city information. The SMS orchestrator framework, in particular the Dialog Manager, conducts a dialog with the user requesting input, for example, the theater name, movie name, timing and credit card information. The collected data can then be sent to the back-end business logic to perform the actual booking.



Conclusion

A framework such as SMS Orchestrator Framework, developed purely on open source technologies can help businesses enable SMS channel for their existing enterprise applications. By implementing the framework as a View in a Model-View-Controller pattern, application developers can leverage their existing code assets and augment a new channel to conduct business.

Advertisment