In my previous post I described at a high level what it means to build a cloud native application and hopefully gave you an idea of why building applications in the cloud can be different than you may be used to. One thing many cloud native applications have in common is that they are often built using a microservices architecture. But before we talk about microservices lets talk about the types of applications most people are familiar with building today.
The nature of my job forces me to build quick simple sample applications that are easy to understand and demonstrate a single concept. After all I am trying to enable developers, and making something overly complex generally turns developers off when they are trying to learn something new. However I often hear questions about how to build real world production grade applications that run in the cloud. This is something that is very hard to demonstrate simply because, lets face it, no production quality application has ever been considered simple to understand. However, I do think it is an important topic to address because if you are serious about building an application in the cloud you should understand how cloud applications are different from your everyday app that everyone is familiar with building.
Drones have been getting a lot of attention lately for both good and bad reasons. Regardless of what the reason may be the bottom line is there are a lot of untapped uses for drones. Everything from delivering your online packages to helping first responders at the scene of an accident. Whatever the use case may be there needs to be a robust infrastructure behind these drones to manage them. The cloud is an ideal choice in this use case because you will more than likely have many many drones and need a dynamic infrastructure to handle the varying needs of the drones and the applications controlling them. Obviously Bluemix is my cloud of choice but in addition to the infrastructure Bluemix provides we also have the IoT Foundation which provides you with the ability to manage your connected devices. I recently had the opportunity to work with some drones for a couple of weeks and decided to use Bluemix and IBM’s IoT foundation to see how you can control drones. Check out the short video below of what I have done so far
If you logged into Bluemix late last week you might have noticed some changes. Probably the biggest change you might have noticed is that the IBM Containers service has moved out of beta and is now generally available. If you are not familiar with the IBM Container service in Bluemix let me spend a minute describing what it does. The Containers service gives you the option of deploying your application as a Docker container to Bluemix. If you are not familiar with Docker you can read more about it on the Docker website. Docker has become increasingly popular as a way of distributing and running applications because of the portability it provides. It is similar to VMs but much more light weight and flexible, making it easy to package your application in a Docker container and have it run exactly the same in any environment.
Today I was looking at some of the new Watson nodes for Node-RED created by my colleague James Thomas and was presently surprised how easy it was to start using the Watson services in Node-RED. (I am not sure why, I was surprised everything in Node-RED seems to be easy) For one of my upcoming presentations I put together a simple flow for a REST API that uses the Watson Machine Translation service in order to translate text POSTed to an API endpoint. Below is a video I created of how easy this was to do.
If you are interested in adding the flow to your Node-RED instance copy the below JSON and import into a sheet. Note: you will need a Watson Machine Translation service bound to your Node-RED app in order for the flow to work.
In my previous blog post I showed how to setup a deployment pipeline in IBM DevOps Services for a Maven project. The problem with that pipeline was that while the deployment is happening your application is unavaialable. Obviously in a production situation this is unacceptable, we need our application to be available 100% of the time (or as close to that number as possible). Luckily Bluemix allows us to map the same route to multiple applications allowing us to take advantage of the Cloud Foundry Router to load balance requests between multiple applications. This allows us to keep the old version of our application running while deploying the new version. Once the new version is deployed requests to the route will be sent to both versions of the application. After we have verified that the new version of the application is working we can delete the old version or if the new version is not behaving as anticipated we can delete the new version and direct all users back to the old version until we can fix the problem. This process is referred to as blue/green deployments.
Recently I had gotten a couple questions regarding how to build and deploy a Maven project to IBM Bluemix using IBM DevOps Services. It is actually very simple to do, especially if you are familiar with the Maven and Cloud Foundry CLIs. Below are two videos on how to setup a build and deploy stage for your Maven projects.
A topic that often comes up when I speak to other developers building apps on Bluemix is authentication. Many developers are comfortable with securing their apps in traditional development models. In the cloud, authentication is often slightly different. For example, you must store session data in an external data store instead of relying on what the app container provides. When you want to connect to an existing LDAP, Active Directory, or SAML service, that is even more daunting