Public clouds are great. They offer great elasticity and cost savings, and in the case of a PaaS like Bluemix, allows us (developers) to forget about maintaining any infrastructure and focus in on our code. However we all realize that public cloud can’t be used for everything. There are some applications and services that must remain in our own data centers on private networks. The reasons why vary, maybe it is too much work to move the resource to the cloud, or maybe the data in the resource is too sensitive to risk exposing outside of your firewall. Whatever the reason may be, you are bound to come across a scenario where you need to access private resources in your public cloud applications. What are your options? One option is to try to setup some type of VPN and create a secure connection between the public cloud and your private network. This is probably the route to take if you are using an IaaS provider like SoftLayer to run your application. With a PaaS this is not possible, you don’t have access to the machine your application is running on or the network it is using, so if you choose Bluemix to deploy your application what are your options?
Luckily Bluemix has a solution for this problem and it is called Cloud Integration. The Cloud Integration service uses something called secure connectors to talk securely to your applications running behind the firewall. These secure connectors run behind your firewall and establish a tunnel to the Cloud Integrations service (or Cast Iron Live). The key here is that it is the secure connector is establishing the connection to the Cloud Integration service in Bluemix and not the other way around (this works on the premise that your servers running behind the firewall can talk to servers running in the cloud while servers in the cloud cannot talk to servers running behind your firewall.) Once the Cloud Integration service knows about your server via the secure connector and a tunnel is established, your Bluemix app can use the Cloud Integration service to access data from your server behind the firewall. Out of the box the Cloud Integration service has secure connectors for DB2, Oracle, and SAP, however you can use Cast Iron Live to connect to a wide range of services on a private network.
I make it sound very simple above, and it is, but your need to understand how everything works to make it click Below is a number of videos walking through how you can use the Cloud Integration service to expose REST APIs behind your firewall to an app running in Bluemix. I chose REST APIs because it is something almost every developer is familiar with and has not ties to a specific language or stack. Anyone can write REST APIs in their favorite language to expose the data the need to their cloud based applications.
Creating A Secure Connector
Creating Your Orchestrations
Using Your Cloud Integration APIs In A Bluemix App
Tomorrow I will be heading out to Grand Rapid MI to attend and speak at MWLUG (Midwest Lotus User Group). If you are attending and would like to learn more about Bluemix, IBM’s new platform for deploying applications to the cloud, be sure to stop by my session at 11AM on Thursday.
Achieving Developer Nirvana With Codename BlueMix
BlueMix is a platform for composing and running virtually any application in the cloud without having to worry about the hardware, software, and networking needed to do so. This means that developers can be left to do what they do best….CODE! By eliminating the need to deal with the infrastructure typically required to deploy an app to the cloud, and providing a catalog packed with services from IBM and its partners, BlueMix allows developers to get their apps in the hands of their users with the lightening speed, quality and innovation their users demand. It doesn’t matter if your next app is targeting web, mobile, or the internet of things, you too can achieve developer nirvana with BlueMix, and it all starts by attending this session!
Unlike most of the other sessions at the conference, mine is not directly related to IBM Collaboration Solutions, however I do have a nice surprise to tie things back to the ICS community. There is no reason why you can’t deploy applications to Bluemix that use products from ICS I am not going to give you the details here, you have to come to my session to find out!!!
If you live “north of the border” (to me anyways) there are a number of Bluemix Days that are coming up that you might be interested in attending. This is a great opportunity to learn more about Bluemix and get started building your first app. See the below flyer for more details and dates.
The elasticity of the cloud is a huge selling point for most developers when considering where to deploy their applications. The ability to add and remove instances of your application based on the load against it saves you a lot of time and money. However you can’t just deploy any application to the cloud and expect it will behave properly when scaled horizontally. In fact, if you didn’t think about scalability when building your application chances are your application will break when scaled.
Luckily if you keep scalability in mind when building your application there are a number of patterns you can use to make sure your application will scale flawlessly in the cloud. On August 19th I will be hosting a webinar going over many of these patterns and how you can use them when building your next cloud application. You can register for the webinar here, and join your fellow developers on August 19th to learn how to build applications that scale.
In my previous post I talked about how to use the IBM IoT Cloud and Bluemix to build apps based on data coming from an TI Sensor Tag. One of the apps I showed was Node-RED, however it was very basic in that it only printed the data to a debug node. In this video I show you how you can store that data in a MongoDB and create a REST API for the data all in Node-RED without writing any code! Enjoy!
The ToDo apps for Bluemix was one of the first sample projects I published after becoming a developer advocate for Bluemix. Even though the apps are simple, I still think they are some of the most meaningful samples we have. Today I have made them even better Since Bluemix went GA we introduced the MongoLab service and an enhanced Cloudant service. I have decided to change the ToDo apps so they take advantage of both of these new services.
Why change something that is already good? The old community Mongo service was unreliable, it sometime lost connections with the app, and it was so popular that it was often running out of space to create new DBs. The old Cloudant service was essentially a user-provided service. This meant you had to go out to Cloudant signup for an account, create a database, and get an API Key and Token before you could even deploy a ToDo app that used Cloudant. This was a huge pain.
With the new MongoLab service you get a reliable, production quality Mongo DB Plus you also have the benefit of using the MongoLab console to see the contents of your DBs.
The new Cloudant service now automatically generates an API Key and Token for you when you create the service. No more having to leave Bluemix to signup for Cloudant and all the ugly stuff
I have updated the Bluemix ToDo apps (all languages) to use both of these new services. Hopefully this makes something that was already good even better, enjoy!
Want to take a guess as to how many devices will be connected to the internet by the end of 2015? Give up? 15 billion. Yup ,that’s right, that is 15 followed by 9 zeros. By 2020 that number will increase to 40 billion!
All of these devices make up what is called the internet of things. As you might imagine with the number of devices growing there have been a number of new technologies emerging that help developers connect and use the data comming from these devices. One of the more important ones is MQTT. “MQTT is a machine-to-machine (M2M)/”Internet of Things” connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport.” In response to the growing number of devices and the clear importance of gathering information from these devices IBM has developed an Internet of Things (IoT) Cloud which at the core has an MQTT instance that developers can use. This offering is currently in beta but is quite functional and can be used to publish and retrieve data from your connected devices. Of course once you have a device connected to the IBM IoT Cloud you want to build an app around the data coming from that device. This is where Bluemix comes in. Using a combination of the IBM IoT Cloud and IBM Bluemix you can have a complete cloud based solution for your IoT apps. Bluemix already has a service that is part of its catalog to connect to the IBM IoT Cloud. In addition to the service, Bluemix has a boilerplate for the internet of things which stands up a Node-RED instance allowing you to design flows for your IoT data.
As part of IBM’s IoT Cloud there are a number of “recipes“. Recipes are basically example IoT scenarios that can get you up and running quickly. The recipes contain instructions on how to setup the device as well as provide you with the code needed to connect the device to the IoT Cloud and publish data. What makes using these recipes even easier is the Quickstart service that is part of the IoT Cloud. When using the IoT Quickstart you don’t have to sign up for anything or register any devices, you just run the code given to you in the recipe, head to the qucikstart page, enter the MAC address of the device, and you can see the data being published to the IoT Cloud. There are some limitations to using the Quickstart, but to get a device up and running quickly it couldn’t be easier. Being new to the whole IoT concept I decided to pick one of the recipes to experiment with. I ended up choosing the Beaglebone Black and TI Sensor Tag recipe. The main reason I chose this one was because the Sensor Tag had a number of sensors on it that you could use for different and interesting use cases. Plus the Beaglebone Black, Sensor Tag, and Bluetooth LE USB adapter costs less than $100. After my Beaglebone Black and Sensor Tag came in I was able to quickly follow the instructions in the recipe to start publishing data to the IoT Cloud.
Of course like any good developer I started to look at the code provided in the recipe. I noticed that what it was doing was gathering data from all the sensors on the Sensor Tag and then publishing it under a single topic to the IoT Cloud. I thought it would be better to publish multiple topics so consumers can subscribe to just the data they need. I also wanted to use the left and right buttons on the Sensor Tag and I thought you would see a lag between the time a button was pressed and the time the data was published to the IoT Cloud if you had to wait to gather data for all the sensors first. I quickly realized that if you wanted to publish more than one topic to the IoT Cloud you could not use the Quickstart. You actually had to sign up for an account and register the device. This ended up being really easy as well, given there was a recipe describing how to connect a registered device to the IoT Cloud. After some time coding I was left with 1 project with three components to it.
The first component publishes data from the Sensor Tag to the IBM IoT Cloud and is written in Node.js. It publishes multiple topics for the different types of data coming from the Sensor Tag and requires you to register the device publishing the data.
The second component consumes the data from the Sensor Tag that was published to the IoT Cloud. It contains 2 web apps, one which visualizes the values of the sensors and another which allows you to control an HTML5 slide deck with a Sensor Tag. The server portion of the webapp is written in Node.js. The Node.js code connects to the IoT Cloud and subscribes to the topics from the first component (the publish component). When the Node code receives data from the IoT Cloud it published that data via web sockets to a web application. Since this component is just a Node.js webapp it can easily be deployed to Bluemix.
The third component also consumes the data from the Sensor Tag but it consumes it via a Node-RED flow. Again you can run this Node-RED flow in Bluemix.
The code for this project can be found on GitHub. The READMEs contain many more technical details. Below are two videos demoing the code. The first one is a short video demoing one single use case. The second video goes more in depth and demos using the Beaglebone Black.
We have scheduled our next Bluemix virtual meetup for July 23rd at 10 AM EST. We will again be using Google Hangouts (hopefully without the audio problems this time). For this meetup we will be focusing on the mobile cloud services in Bluemix, there will be plenty of information and demos to help you get started. At the last virtual meetup we had a lot of questions on mobile so I figured this would be a good topic. You can download this .ics file to add the event to your calendar and be sure to respond whether you will be attending on the Google+ events page.