My colleagues Bryan Boyd and Mark VanderWiele have created a nice demo where you can drive smartphones using Sphero balls. I've modified the sample slightly so that it also works for Android phones. Watch the video to see how to steer a driving smartphone via IBM Bluemix, the Internet of Things and cognitive services from IBM Watson.



Here are the details:

The phone is carried by a Sphero ball and a chariot.

The phone communicates with the ball via bluetooth protocol. The native Android app uses the Sphero Android SDK.

The phone communicates with the Internet of Things service in Bluemix via a Java MQTT library.

A Node-RED flow is used to send commands to the native app either when certain URLs are invoked or certain Twitter tweets are sent.

For the speech recognition the sample of the Speech to Text service has been slightly modified to send the text to the Internet of Things service via MQTT from the client side JavaScript.

The Node-RED flow receives the spoken text via an Internet of Things input node. The first word of a text is used to interpret the command and then the same flow as previously is triggered.

This is a screenshot of the flow for incoming URL commands and the devices.

How Docker Containers relate to Cloud Foundry in IBM Bluemix

By Niklas Heidloff, posted on Feb 20, 2015

IBM Bluemix is based on Cloud Foundry, an open PaaS (platform as a service) to provide customers a choice of clouds. This PaaS model allows developers to focus almost exclusively on writing code since all infrastructure including the application servers are provided. This enables developers to build applications rapidly in local IDEs and push the applications to the cloud. This ease of use however comes at the expense of having less control over the infrastructure (obviously) which is desirable in certain scenarios.

At the end of last year IBM launched IBM Containers Beta. The IBM containers are based on the popular Docker containers. On a high level containers are similar to virtual machines (VMs) and have similar advantages like the fast creation of new instances. As my colleague Carl Osipov describes in his blog there is a significant difference though: "Instead of virtualizing the hardware (as the case with traditional virtual machines) containers virtualize the operating system" and are more lightweight than VMs.

In difference to the Cloud Foundry model developers don't only have to provide the applications, but essentially also the application servers/runtimes which are both included in the containers. This comes with the benefit that you can port your applications much better. Everyone in our business has probably heard the response of developers when something doesn't work: "but it works on my machine". This is exactly the issue containers address. As the name alludes to, containers can be 'shipped' very easily between different environments. For example developers can run these containers locally, other developers or quality engineers can run them on other on-premises environments, or the same containers can be run in the cloud.

The downside of the container approach is a little more work for developers who also need to take care about building these container images. Fortunately there are many images already available provided by the community which can be used or extended. As part of Bluemix IBM provides images for Liberty and Node.

So with these different approaches the question is when to use what. The containers are basically a new option between Softlayer's IaaS (infrastructure as a service) and Cloud Foundry's PaaS as described in this deck.

Here is how the redbook describes the pros and cons of the different approaches.

"Containers seemed like an optimal approach that would allow us more flexibility of what we were deploying, with the cost of a small increase in management overhead." and "Existing applications are more likely to adopt the container model; new applications are more likely to build from scratch, using the power of the Cloud Foundry model."

Carl Osipov adds that containers have advantages "especially for I/O heavy workloads like databases and analytics". (Update 02/20 10:45 AM: This statement was done in the context of comparing VMs vs containers, not containers vs CF. See discussion below)

So a typical scenario where someone might want to use containers is for example when you need lots of write access to a database from an application. Or you might want to have your own database engine on your container to use features of databases that don't exist in the cloud (e.g. full text search in relational databases).

In order to get started check out the redbook, Carl's blog and the documentation.

Here is the screenshot of the list of containers deployed onto Bluemix.

The question that I've been asked most often recently by Java developers is how to deploy applications to Bluemix. There is a lot of good documentation available. Below is a quick overview with pointers to more detailed information. The different approaches have pros and cons dependent on the scenarios and personal preferences.

cf Tool

You can deploy Java applications (war and ear files) via the cf command line interface. This can be as easy as "cf push app_name -p app.war" where all additional parameters are defined in an additional manifest file. The Java code is built locally and the war file is deployed on Bluemix with the defined buildpack (Liberty by default).
I use this option sometimes as fallback when I have deployment issues and when I'm not sure whether it's because of my code or potentially the other deployment tools. I can also use another cf logs command to see the logs easily during the deployment without having to go to another place.

Cloud Foundry Maven Plugin

When using the cf push command you need to build your code first. Personally I use Maven for all projects right now. You can use Maven from within Eclipse which comes with the M2Eclipse plugin. Alternatively you can build via the Maven command line tool.
Additionally there is an extension to Maven called the Cloud Foundry Maven Plugin which deploys the build to Bluemix directly. Check out the samples from Ryan Baxter how to do this.

Jenkins Cloud Foundry Plugin

If you're using Jenkins as your continuous integration server you should check out the Jenkins Cloud Foundry Plugin which allows you to deploy your applications to Bluemix. I haven't tried this one yet though.

Bluemix DevOps

Rather than building the code locally and then pushing the built code to Bluemix the Bluemix DevOps service can be used. In this scenario developers use Git to commit and push code to a source control repository on Bluemix or to GitHub and the code is both built and deployed on server side. In this case developers don't have to set up and learn any additional tools which is why this option is especially interesting for short hackathons where people have little time. If you want to see this in action watch the demo I gave in a webinar recently or watch the videos from Lauren Schaefer.

Eclipse Tools

For many Java developers the easiest way to deploy applications to Bluemix is to use the Eclipse plugin. With this tool you can not only directly deploy projects to Bluemix but also debug code remotely, push incremental changes and even push the full Liberty server if you need a custom configuration.



So as you can see there are many options to deploy Java applications to Bluemix. I'll update this blog entry when more options will become available.

Bluemix to manipulate and share Objects in Virtual Reality

By Niklas Heidloff, posted on Feb 13, 2015

Last weekend the DeveloperWeek Hackathon took place where IBM hosted an IBM Bluemix Challenge. One of the winning projects was "CadSpace" which was developed by Aria Sabeti.

“CadSpace enables you to manipulate objects in virtual reality, while sharing your vision in real-time with anyone in the world. One URL is all it takes to share visual ideas and get immediate feedback — no sharing large files that need complex software to view, no delays, no confusion.  

CadSpace uses IBM Bluemix as the glue between the Autodesk View and Data API, and a Sphero toy as the interface. The prototype was originally built over a weekend. Its current state can be seen live."

The diagram shows the high level architecture.



The Sphero ball is used as remote control using the Bluemix Internet of Things.



The VR device is basically just a smartphone displaying two pictures.



This is an example of the two different views.

Last weekend the DeveloperWeek Hackathon took place where IBM hosted an IBM Bluemix Challenge. The winner of our challenge was the project "Hedge (Housing Edge)" developed by Evan Pun, Dong-han Yao, Zachary Zeleznick, Emma Marriott, Jae Young Ryoo, Ryan Ma and Emily Le.

"Hedge (Housing Edge) is a web application that helps a renter/buyer visualize healthy spaces and housing affordability in your community. Cost of living is easily defined by housing prices, but what is the cost of living on your health for a particular neighborhood? We use heat maps (a choropleth map with 574 blocs) to reveal where problem spots may be in a city, as well as accessibility to what is most important to the user, at a sub-neighborhood resolution. Users can simultaneously select multiple metrics (like asthma rates, proximity to green space, and proximity to a farmer’s market), and the heat map will change to reflect desirability based on the combined values. As the user hovers over each of the 574 blocs, a popup reveals an overall “Livability Index”, as well as individual subscores of each metric, if applicable.

Additionally, we use IBM Watson to highlight the top 3 most desirable blocks based on the Livability Index of the user selected metrics.

All of our map visualizations are generated from official city and government provided data and streamlined into a clean and intuitive interface. Datasets were normalized and given a corresponding color on the heat index. All datasets were obtained from DataSF, the largest online repository of data published by the City and County of San Francisco, and verified with public available public health information."

The screenshot shows Watson's recommendations for places with proximity to garden, air quality and affordability in San Francisco.  



Check out the presentation to find out more.

More Blog Entries ...

Hi, my name is Niklas Heidloff. I work for IBM as an IBM Bluemix Developer Advocate. The blog contains information about IBM Bluemix and articles about my previous work in IBM Collaboration Solutions, esp. IBM Connections and XPages.

@nheidloff

Disclaimer

The postings on this site are my own and don't necessarily represent my employer IBM's positions, strategies or opinions.