IBM Acquires StrongLoop – Leveling Up Node.js in the Enterprise

Today IBM announced the acquisition of StrongLoop, Inc,  leaders in enterprise development on Node.js and major contributors to Express, LoopBack, and other Node.js tools and frameworks.


Node.js is an incredible tool for rapidly building highly performant and scalable back end systems, and you develop it using a familiar core language that most front-end developers are already accustomed to, JavaScript. This acquisition is positioned to greatly enhance Node.js in the enterprise, and StrongLoop’s offerings will be integrated into IBM Bluemix, IBM MobileFirst, and WebSphere.

Even though the acquisition is still “hot off of the presses”, you can start using these tools together today:

You can read more about this acquisition and the future vision between IBM and StrongLoop on the StrongLoop blog, IBM Bluemix Blog, and IBM MobileFirst Blog.

If you haven’t heard about StrongLoop’s LoopBack framework, it enables you to easily connect and expose your data as REST services. It provides the ability to visually create data models in a graphical (or command line) interface, which are used to automatically generate REST APIs – thus generating CRUD operations for your REST services tier, without having to write any code.

Why is this important?

It makes API development easier and drastically reduces time from concept to implementation.  If you haven’t yet looked at the LoopBack framework, you should definitely check it out.  You can build API layers for your apps literally in minutes.  Check out the video below for a quick introduction:

Again, be sure to check out these posts that detail the integration steps so you can start using these tools together today:



Adaptive mobile apps that change based on personal context

That title get your attention?  Yes, it really read “Adaptive mobile apps that change based on personal context” – with near real-time rules application, without much extra development effort.  If that sounds interesting to you, or like a product you might want to use within your own apps, then you might want to check out this site where you can get involved in the product’s development:

IBM is looking for your input on creating these types of mobile app experiences. User experiences within a single app that can be dramatically different per user based on location, past behavior, profile information, social media activity, and so much more.  With this behavior being driven by configurable rules that can be changed without redeploying an app to the app store.

How it works for your customer

Consider this scenario:

Jon and Andrea download the mobile app for S&W, a retailer known for its attention to providing great customer service. Over the next month, Jon and Andrea use the app to browse and discover content and merchandise differently.

Jon primarily navigates to sports related content for his favorite teams to find gear and clothes for travel to his favorite team’s games. Andrea scours the app for sales and fashion trends and usually ends up following her favorite designers.

Andrea and Jon go to a baseball game together. She’s never enjoyed watching it, so she opens up the S&W app to entertain herself, and her app’s navigation quickly steers her through Spring fashion articles.

Jon however, wants to replace the hat he’s worn the last three times the team lost, and since he’s in the stadium, his S&W app opens right up to the team’s gear page. The app knows he’s out of town and tells him how to get to an S&W store.

How it works for the dev team

Consider another scenario:

One of the developers on the team, George, sets up the system and application. He then gives access to Janet who is responsible for the customer experience.

Janet writes rules defining how the application could adapt and become more personalized based on inputs like , social media, geolocation, app usage, or customer information data.

Once Janet has built out her rules, she simply hits ‘Submit’ and can immediately see her clever interactions reflected in the mobile application without having to involve the development team.

Analytics let Janet know which adaptations are working best, and helps her find new opportunities to optimize the app’s user experience.

Sound interesting yet?  Check it out, and get involved in the product development at:

We’re not talking about a content management system, or translation based on locale, instead a rules-driven product that can adapt literally every aspect of your app:  customize the user interface, enable or disable different features, customized messaging and notifications, and much more, all variable based upon the user context.  This can be used to present contextually relevant information, drive adoption, provide more/less data depending on your physical context, and so much more.

It won’t be tied to a specific UI framework, won’t be tied to a specific content management system, isn’t attempting to re-create Google Now or Apple Proactive Assistance.  Rather, a set of tools and a rules engine that enable you to customize and tailor the app experience to the individual user.

Head over to to learn more and get involved!

Video – Smarter Apps with Cognitive Computing

Last week I had the opportunity to present to a great audience at the MoDev DC meetup group on “Smarter Apps with Cognitive Computing”.   In this session I focused on how you can create a voice-driven experience in your mobile apps. I gave an introduction to IBM Bluemix and IBM Watson services (particularly the Watson language services), and demonstrated how you can integrate them into your native iOS apps. I also covered IBM MobileFirst for operational analytics and remote logging to provide insight into your app’s performance once it goes live.  Check out a recording of the complete presentation in the video below:

You can read more detail about how this example works and access source code for the sample application in the links below:

Just create an account on IBM Bluemix and you can get started for free!

This app uses three services available through IBM Bluemix, all of which are available for you to try out:

App Architecture
App Architecture

Feel free to poke around the code to learn more!

Video: Enabling the Next Generation of Apps with IBM MobileFirst

Back in February I had the opportunity to present “Enabling the Next Generation of Apps with IBM MobileFirst” at the DevNexus developer conference in Atlanta.  It was a great event, packed with lots of useful content.  Luckily for everyone who wasn’t able to attend, the organizers recorded most of the sessions – which have just been made available on Youtube.

In my presentation I introduce both the MobileFirst Platform Foundation Server and MobileFirst services on IBM Bluemix to enable mobile applications. The video is available below.  In it I cover remote logging, operational analytics, exposing & delivering data, managing push notifications, and more.  Both the platform server and cloud solutions are free to try and enable developers to deliver more from their mobile apps more efficiently and more securely.

Here’s the session Description: Once your app goes live in the app store you will have just entered into an iterative cycle of updates, improvements, and releases. Each successively building on features (and defects) from previous versions. IBM MobileFirst Foundation gives you the tools you need to manage every aspect of this cycle, so you can deliver the best possible product to your end user. In this session, we’ll cover the process of integrating a native iOS application with IBM MobileFirst Foundation to leverage all of the capabilities the platform has to offer.

Learn more – IBM Bluemix:

Learn more – MobileFirst Platform Foundation Server:

To get started just sign up for Bluemix or download MobileFirst Platform Foundation Server today (they’re free to try!)


Voice-Driven Native Mobile Apps with IBM Watson & IBM MobileFirst

Update: The IBM Watson team just announced a new native SDK for both iOS and Android that simplifies and streamlines integration with Speech To Text and Text To Speech services.  Check out more detail here: IBM Watson Speech Services Just Got A Whole Lot Easier.

Using your voice to drive interactions within your app is a powerful concept. It is the primary interaction driving Apple’s Siri, Microsoft’s Cortana, and Google’s Voice Actions. By analyzing spoken words, voice commands allow you to complete possibly complex actions with minimal interaction with the device. Or, they enable entirely different forms of interaction, for example, interacting with a remote system through the telephone.

Voice driven interactions are essentially a two part process:

  • Transcribe audible signal to text transcript
  • Perform a system action by parsing text transcript

If you think that voice-driven apps are too complicated, or out of your reach, then I have great news for you: They are not! Last week, IBM elevated several IBM Watson voice services from Beta to General Availability – that means you can use them reliably in your own systems too!

Let’s examine the two parts of the system, and see what solutions IBM has available right now for you to take advantage of…

Transcribe audible signal to text transcript

Part one of this equation is converting the audible signal into text that can be parsed and acted upon. The IBM Speech to Text service fits this bill perfectly, and can be called from any app platform that supports REST services… which means just about anything. It could be from the browser, it could be from the desktop, and it could be from a native mobile app. The Watson STT service is very easy to use, you simply post a request to the REST API containing an audio file, and the service will return to you a text transcript based upon what it is able to analyze from the audio file. With this API you don’t have to worry about any of the transcription actions on your own – no concern for accents, etc… Let Watson do the heavy lifting for you.

Perform a system action by parsing text transcript

This one is perhaps not quite as simple because it is entirely subjective, and depends upon what you/your app is trying to do. You can parse the text transcript on your own, searching for actionable keywords, or you can leverage something like the IBM Watson Q&A service, which enables natural language search queries to Watson data corpora.

Riding on the heels of the Watson language services promotion, I put together a sample application that enables a voice-driven app experience on the iPhone, powered by both the Speech To Text and Watson Question & Answer services, and have made the mobile app and Node.js middleware source code available on github.

Watson Speech QA for iOS

This native iOS app, which I’m calling “Watson Speech QA for iOS” allows you to ask Watson questions in natural, spoken language, and receive textual responses based on the Watson QA Healthcare data set.

Check out the video below to see it in action:

Bluemix Services Used

This app uses three services available through IBM Bluemix:

  1. Speech to Text – Convert spoken audio into text
  2. Question & Answer – Natural language search
  3. Advanced Mobile Access – Capture analytics and logs from mobile apps running on devices
App Architecture
IBM Watson Speech QA for iOS App Architecture

The app communicates to the Speech to Text and Question & Answer services through the Node.js middelware tier, and connects directly to the Advanced Mobile Access service to provide operational analytics (usage, devices, network utilization) and remote log collection from the client app on the mobile devices.

For the Speech To Text service, the app records audio from the local device, and sends a WAV file to the Node.js in a HTTP post request. The Node.js tier then delegates to the Speech To Text service to provide transcription capabilities. The Node.js tier then formats the respons JSON object and returns the query to the mobile app.

For the QA service, the app makes an HTTP GET request (containing the query string) to the Node.js server, which delegates to the Watson QA natural language processing service to return search results. The Node.js tier then formats the respons JSON object and returns the query to the mobile app.

The general flow between these systems is shown in the graphic below:

IBM Watson Speech QA for iOS - Logic Flow
IBM Watson Speech QA for iOS – Logic Flow


Code Explained

Mobile app and Node.js middleware source code and setup instructions are available at:

The code for this example is really in 2 main areas: The client side integration in the mobile app (Objective-C, but could also be done in Swift), and the application server/middleware implemented in Node.js.

Node.js Middleware

The server side JavaScript code uses the Watson Node.js Wrapper, which enables you to easily instantiate Watson services in just a few short lines of code

var watson = require('watson-developer-cloud');
var question_and_answer_healthcare = watson.question_and_answer(QA_CREDENTIALS);
var speechToText = watson.speech_to_text(STT_CREDENTIALS);

The credentials come from your Bluemix environment configuration, then you just create instances of whichever services that you want to consume.

I implemented two methods in the Node.js application tier. The first accepts the audio input from the mobile client as an attachment to a HTTP POST request and returns a transcript from the Speech To Text service:

// Handle the form POST containing an audio file and return transcript (from mobile)'/transcribe', function(req, res){

  //grab the audio WAV file attachment and prepare to send to Watson
  var file =;
  var readStream = fs.createReadStream(file.path);
  console.log("opened stream for " + file.path);

  var params = {
    content_type:'audio/l16; rate=16000; channels=1',

  //send the audio WAV file to the watson.recognize service
  speechToText.recognize(params, function(err, response) {

    if (err) {
      return res.status(err.code || 500).json(err);
    } else {
      //parse the results and return them to the client
      var result = {};
      if (response.results.length > 0) {
        var finalResults = response.results.filter( isFinalResult );
        if ( finalResults.length > 0 ) {
          result = finalResults[0].alternatives[0];
      return res.send( result );

Once you have the text transcript on the client, you could do whatever you want with it. You could parse it to invoke local actions, or delegate to a natural language query service

The second method does exactly this: it accepts a URL query parameter from a HTTP GET request and uses that parameter in a Watson QA natural language search:

//handle QA query and return json result (for mobile)
app.get('/ask', function(req, res){

  //get a copy of the search query text from the req.query object
  var query = req.query.query;

  if ( query != undefined ) {
    //perform a search using the QA "ask" method
    question_and_answer_healthcare.ask({ text: query}, function (err, response) {
      if (err){
        return res.status(err.code || 500).json(response);
      } else {
        //format the results and return them to the mobile client
        if (response.length > 0) {
          var answers = [];

          for (var x=0; x<response[0].question.evidencelist.length; x++) {
            var item = {};
            item.text = response[0].question.evidencelist[x].text;
            item.value = response[0].question.evidencelist[x].value;

          var result = {
          return res.send( result );
        return res.send({});
  else {
    return res.status(500).send('Bad Query');

Note: I am using the free/open Watson Healthcare data set. However the Watson QA service can handle other data sets – these require an engagement with IBM to train the Watson service to understand the desired data sets.

Native iOS – Objective C

On the mobile side we’re working with a native iOS application. My code is written in Objective C, however you could also implement this using Swift. I won’t go into complete line-by-line code here for the sake of brevity, but you can access the client side code in the ViewController.m file. In particular, this is within the postToServer and requestQA methods.

You can see the flow of the application within the image below:

App Flow: User speaks, transcript displayed, results displayed


The native mobile app first captures audio input from device’s microphone. This is then sent to the Node.js server’s /transcribe method as an attachment to a HTTP POST request (postToServer method on line 191). On the server side this delegates to the Speech To Test service as described above. Once the result is received on the client, the transcribed text is displayed in the UI and then a request is made to the QA service.

In the requestQA method, the mobile app makes a HTTP GET request to the Node.js app’s /ask method (as shown on line 257). The Node.js app delegates to the Watson QA service as shown above. Once the results are returned to the client they are displayed within a standard UITableView in the native app.

MobileFirst – Advanced Mobile Access

A few other things you may notice if you decide to peruse the native Objective-C code:

  1. Within AppDelegate.m you will see calls to IMFClient, IMFAnalytics, and OCLogger classes. These enable operational analytics and log collection within the Advanced MobileAccess service.
  2. All network requests inside of ViewController.m use the

    IMFResourceRequest class. Using the IMFResourceRequest class enables the collection of analytics for every request made within the application (through this class).

Together these allow for the collection of device logs, automatic crash reporting, and operational analytics that provide one of the strengths of the Advanced Mobile Access service, which is one of the mobile offerings on IBM Bluemix.

Source Code

Mobile app and Node.js middleware source code and setup instructions for this app are available at:

Just create an account on IBM Bluemix, and you have everything that you need to get started creating your own voice-driven apps.