You may be wondering why am I blogging about non-SAP PaaS experimentation experience on SCN – SAP Business Trends. The reason will become apparent should you read on.

Firstly I admit as an IBMer I had to undertake a mandatory training on BlueMix which is IBM’s PaaS. I could have left it at that – just doing the training. But BlueMix being new technology with the buzz around it, I decided to take a look into it further. This was partly compelled by the fact I did look into HANA Cloud Platform while doing open.sap.com course last year, so there was something I “knew” about Platform as a Service.

Secondly SAP like other Technology giants are moving into PaaS as the whole IT world embraces Cloud more and more as a reality. The so-called “edge applications” need not be only deployed in HANA Cloud but can exist in other PaaS all the while communicating with SAP Enterprise Applications (read ERP, SCM) which are typically onPremise.


Introduction

BlueMix is IBM’s PaaS offering based on Cloud Foundry open source project to which recently SAP has partnered with and made commitment in terms of development time.

One useful feature of BlueMix (compared to HANA Cloud Platform when I last checked) is a set of different boilerplate runtimes that quickly enables you with creating your app. The runtimes including Java, Node.js, Ruby and something called Node-Red which described itself as “A visual tool for wiring Internet of Things”. Sounded interesting and I could find a simple app “recipe” for it at https://www.ibmdw.net/iot/recipes/node-red which got me up and running quickly.

App Use-case

With the successful deployment of my first BlueMix app, it was time to venture into something more meaningful with the available toolset.

Considering initial Node-Red and IoT recipe using a simulated sensor (incidentally also hosted in BlueMix), I came up with a simple usecase outlined below.

Assume there are Soft Drinks / Cold Dessert Vending Machines in the field that send Temperature, Humidity and Stock data to the App on BlueMix PaaS. This data is processed by Application logic comparing with thresholds for each parameter and trigger appropriate monitoring message say when temperature and humidity is becoming uncomfortable. At the same time the Stock is monitored and if it falls below pre-defined threshold triggers a message that can be used for  replenishment order creation. Node-Red provides as standard output messages based on be Twitter or SMS via Twilio.

The replenishment order creation message can technically be sent to SAP via Websphere Message Broker service. How exactly is another topic and beyond my immediate technical capability, but quick research pointed to feasibility.

[UPDATE] Node-Red provides http and Websocket output nodes. In theory using the http output node call to SAP Gateway can be done using OData service thereby triggering replenishment order in backend ECC system.


Building the App

Enter Node-Red to build the App. In the App Node-Red Flow Editor I copied original Node-Red recipe App and started modifying it adding available functions and Twitter output nodes in the palette. As seen below the IoT Input Node at the extreme left is starting point of the App logic where the MAC ID of the sensor is input. Subsequently three logical flows one each for Temperature, Humidity and Stock (used Object Temperature of simulated sensor as a proxy) in a function node, measure the value against threshold (switch node) to determine which of the two conditions (template nodes) is fulfilled. Based on the condition Twitter message is created apart from Debug mode that can used to display the message in Debug tab in the sidepanel as shown below. Once the wiring is done it is a one-click Deploy(ment) to BlueMix cloud and time to test.

Fire it up

To test I needed a sensor and so I fired up a IoT Sensor  and started playing with the temperature, humidity and object temperature (proxy for stock level) values using up-down button and swiping between the 3 tiles. Of course the debug tab lighted up with the messages from each of the parameters based on the threshold computation, but it was important to check if the messages were going to outside world.

It works

As I turned attention to my Twitter account a flurry of tweets from the BlueMix app proved it’s working. It was indeed a great feeling seeing the simple auto-generated tweets coming from the quick and dirty App that was indeed up and running successfully.


What’s next?

There can be more complex logic with current data compared with historical Temperature – Humidity – Stock data to have predictive replenishment order creation. Technically these can be built incorporating separate services and in BlueMix there are set of services from both IBM’s own Software Group products as well as 3rd Party with provision If Stock falls below threshold with Temp. & Humidity going higher – trigger replenishment; more complex logic can be built with separate Rule Service and the Historical Device data stored in TimeSeriesDatabase Service. Note: To use the Service links you will need to be logged into BlueMix.

Further it should be also possible to deploy multiple Input Devices (Vending Machines) to the app each with unique Stock, Temp and Humidity thresholds and also scale-out (adding more memory and instances of the app). All these will require actual coding, binding new services to the app, configuring DevOps services (for auto-scaling and app monitoring etc.) but the core App created as shown above may remain as-is and that is the beauty according to me.

I can proudly claim not just trained on PaaS but knowing bit more of how exactly it works and how simple use-case can be developed.


DISCLAIMER: My day-night job is with IBM, but this blog is my personal view and by no means driven by my job requirements. I like to experiment and try out new technology, Bluemix fitted in that space and I wanted to share my experimentation experience.

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Sangeeth Parvatam

    Good one Somnath. It would be interesting to see the potential use cases of bluemix interacting with SCM applications, especially invoking VSR optimizer (might be  tough as the parameter interface would be huge) or retrieving stock positions / days cover etc from APO and using it to do ‘things’.

    (0) 
    1. Somnath Manna Post author

      Sangeeth,

      As I mentioned in the blog potential apps like these will be so called “Edge Applications” interacting with SAP SCM / SCE solution. In this case if all the replenishment order requirements from Vending Machines pass on to SAP SCM or SCE (TM) system, there can always be a VSR Optimisation Run generating the transportation route plan for replenishment. Based on the final Replenishment Plan confirmations can be sent back to the Vending Machines. In an unlikely event of stockout Vending Machine can potentially display a message when the particular item will be available.

      For the stock positions / days cover based Replenishment Planning from APO, my take is the BlueMix app can be modified sufficiently to use historical timeseries data (with temperature and humidity data) and apply basic predictive analysis technique to dynamically determine when to replenish, not just a fixed reorder point planning. In fact there is more causal data available in the App compared to traditional SAP SCM APO (we normally get Sell-In History not Sell-Through and even then hardly any other causal factors) application. To me that kind of causal data (from sensors) will be the game-changer in future SCM applications.

      What do you say?

      Regards,

      Somnath

      (0) 
        1. Somnath Manna Post author

          By causal information I meant temperature and humidity at the Point of Sale for Stock level (which can be considered as proxy for Sales happening). We may concur Stock Level / Sales (dependent variable) as a function of Temp + Humidity (as independent variable).

          Hope this helps.

          (0) 
  2. Matthias Steiner

    Thanks for sharing your experience with the rest of us Somnath and – that’s the PaaS advocate in me speaking now-  thanks especially for highlighting the core value proposition of PaaS: unmatched development speed!

    As you mentioned that BlueMix is based on Cloud Foundry I’d like to point out that SAP has indeed shown more than just interest by joining the Cloud Foundry Foundation as a Platinum member. Actually, just two days ago we made further announcements related to Cloud Foundry at OSCON. Check out the respective press release here: http://www.news-sap.com/sap-commits-cloud-foundry-openstack-innovative-development-cloud/

    Regarding the multiple runtimes, it has always been our vision to support multiple runtimes as part of HCP. At the time of writing we support Java, server-side JavaScript (via SAP HANA Extended Application Services aka XS) and – recently added – HTML5 apps. We also received positive confirmations from the community that other JVM-based runtimes work as well. (You can find a compiled list here: SAP HANA Cloud Platform – Content Overview – Section: Alternative Programming models).

    As you mentioned model-driven development tools and pointing out connectors etc. you may want to check out HANA Cloud Integration (HCI) – there’s a free trial available as well: Get started with SAP HANA Cloud Platform, integration service (HCI)

    I truly like your example usage scenario as I personally believe that IoT will be a big driver for PaaS. In fact, we have some interesting projects going down in this space…

    As always, I am confident that we’ll hear much more about all of these topics (Cloud Foundry, HCI and IoT scenarios based on HCP at d-code this year! Stay tuned…

    Cheers,

    Matthias

    PS: Here’s the link of the keynote presentation done by SAP at the Cloud Foundry Summit 2014 just a few weeks back: http://www.slideshare.net/saphcp/future-of-enterprise-paas-cloud-foundry-summit-2014

    (0) 

Leave a Reply