Auto-Scalability of Bluemix Applications

By Niklas Heidloff, posted on Oct 29, 2014

One of the great benefits of Bluemix applications is the ability to scale very easily. Below is a quick description of this functionality.

Here is what the Bluemix architecture overview documentation says:
"Bluemix is designed to host scalable applications and application artifacts. when the load of your application changes, instances of your application might need to be created or deleted. Therefore, any instance of your application might be terminated, deleted, moved, or re-created on a new VM or container when it is required, even if your application has only one instance. Because it might be removed at any time, your application needs to save all persistent data in a data store that is outside of your application, for example, on one of the data store services that are provided by Bluemix. Any data that is stored locally to your application, such as in memory or on local disk, is removed when the instance of your application is removed."

You can manually determine the number of instances and the used memory.



Auto-Scaling Add-On


Additionally you can use the so called Auto-Scaling add-on. Via policies you can define that Bluemix should create new instances if the memory utilization exceeds a certain limit.



Ryan Baxter explains this capability very well with a nice sample in a webinar (after registration you can download the mp4. auto-scaling demo starts at 30:00 min).

In the same webinar Ryan talks about further scalability best practices and patterns (starting at 5:05 min) that developers should be aware of when building scalable apps. I advice to watch the full video, very easy to follow.

Session Cache Service


As stated in the Bluemix documentation since an application "might be removed at any time, your application needs to save all persistent data in a data store that is outside of your application". This includes persistent data that you store in databases, but even data that you typically store in memory, for example in the HttpSession. In order to store data in memory that all application instances can access Bluemix provides the Session Cache service.

When using this service from Liberty applications, data that is stored in the HttpSession is automatically put in the session cache and available in all other application instances. So developers don't have to write any additional code to leverage this capability. Read the article on developerWorks for more details.

Samples of Watson Services on Bluemix

By Niklas Heidloff, posted on Oct 28, 2014

I've started to try some of the Watson services on Bluemix. Really impressive. Below are some samples that give some ideas what the services do and how to use them.

For a list of available services check out the landing page and the documentation on Bluemix. I like especially the user modeling service and the question and answer service.

User Modeling Service


The user modeling service "can automatically generate portraits of individuals that reflect an individuals' characteristics from noisy social media data .... Such derived insights can then be used to guide hyper-personalized engagements and interactions to make your products, services, campaigns, etc. better tailored to your audience."

You can try a simple live sample. In the Bluemix catalog there are three boilerplates (for Java, Node.js and Ruby) which come with the source code of this sample.

A more advanced sample is the talent manager scenario. Talent manager is an "application that allows you to search for candidates from a pool of applicants based on how closely they resemble one of your current employees. The app uses Watson's User Modeling API service to analyze a potential candidate's personality based on their answers to a questionnaire." You can download the source code from GitHub and deploy it to Bluemix. I've deployed it to my Bluemix organization and you can try it live (type in 'dev' and then click on one person).

Question and Answer Service


The question and answer service "enables applications to post questions and receive responses from a corpus of information that provides domain knowledge based on a specific set of input documents and other information. ... The Question and Answer service uses natural language processing and analytics to provide the unique ability to comprehend the subtle nuances of human language, sift through vast amounts of content, and provide evidence-based responses to users' questions." The beta version of the service on Bluemix works for healthcare and travel data.

The service comes with a simple sample for Java, Node.js and Ruby. My colleague Carl Osipov has developed another sample for PHP. I've deployed this sample to my Bluemix organization and you can try it live.

Additionally there is another great sample, called Watson Films. You can watch the video to see it in action and get the code from JazzHub. Note that to my knowledge this sample doesn't work via the Bluemix service since it uses another data set that you need to define via the Watson Experience Manager (but it can be run on Bluemix).

If you want to find out more about Watson services join the webinar tomorrow (10/29 at 11:00 AM EDT).

Changes

By Niklas Heidloff, posted on Oct 27, 2014

I've worked in IBM Collaboration Solutions / Lotus for more than 15 years. Next month I'll start working for another team in IBM, called Emerging Technologies as a Bluemix advocate. I'm very excited and look forward to the new opportunity!

I've really enjoyed working for ICS / Lotus over the last years. I love collaborative and social technology where you can immediately see the value for customers. I also love app dev to help customers and partners to build their own apps and extend our products. ICS has given me the chance to work on these topics, e.g. Lotus Workflow, reinventing EMail, Notes, Composite Applications, XPages and Connections App Dev. The thing I enjoyed most in ICS though are the people. I had the pleasure to work with so many talented developers, tech leads and managers and nice people. The good thing nowadays is that social software helps to stay connected.

Earlier this year I didn't go for re-election as an OpenNTF director since I didn't have enough time. The five years I worked on OpenNTF and with our app dev community were amazing. When I suggested to support OpenNTF in 2008, IBM allowed me to work in this role which was something new for ICS at that time. Working with the community and the OpenNTF directors and contributors was a lot of fun. I especially enjoyed the five app dev contests which were a huge success. With the new directors coming in, I'm confident OpenNTF will continue to shine.

While I'll start in the new team in November I'll slowly transition out of the IBM Collaboration Solutions organization. There is an important app dev project I'm working on which I'll finish and hopefully present at IBM ConnectED. I also want to continue to work with the ICS community and introduce them to and help them with Bluemix.

I'm very excited to start working on Bluemix. I've always liked rapid application development and deployment and see IBM's Platform as a service (PaaS) offering as a great solution to build apps for the cloud. The ability to use so many available services, paired with auto-scaling, analytics, devops, standard development techniques and easy deployment is awesome. I think that PaaS is really the solution for customers and partners to implement their specific requirements and to extend and leverage other Software as a Service (SaaS) offerings. PaaS allows the level of flexibility, innovation and customization that most SaaS services don't provide.

In the new team I want to be more visible in the community again, so keep an eye on my blog and follow me on Twitter. There are many new things I want to learn, e.g. Watson, Internet of Things, node.js, and so on and I want to share my experience.

Looking forward to interesting times!

Documenting REST APIs in the Source Code

By Niklas Heidloff, posted on May 28, 2014

There are several tools available that help documenting REST APIs. One of them is Swagger, an open source project under the Apache 2 license.

"The goal of Swagger™ is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection."

For REST APIs implemented in Java you can use Java annotations to document the REST APIs directly in the source code so that documentation and actual APIs are not out of synch. As part of this documentation you can not only define what parameters, types, etc. a service has but also which parameters are mandatory, validations, and more.

In order to create the actual documentation different mechanisms are available. For example you can use a Maven plugin to generate HTML files using markdown templates. Additionally there is a servlet that parses the documentation from the source code and serves it up as REST/JSON. This REST/JSON can then be consumed by custom user interfaces or via the out of the box Swagger UI.

Check out the samples developer.wordnik.com and petstore.swagger.wordnik.com. Similarly to the Social Business Toolkit API Explorer you can not only read the documentation, but also try the REST calls directly.

Last week the involved companies Reverb and Apigee announced the formation of a new working group which will work on the next version 2.0. Read the details.

IBM announced the IBM Cloud marketplace

By Niklas Heidloff, posted on May 19, 2014

At IBM Impact 2014 IBM announced the IBM Cloud marketplace. As Robert LeBlanc wrote in his blog entry the marketplace "will be one of the primary channels through which we deliver IBM as a Service. In addition, we will collaborate with partners from our global ecosystem to deliver hundreds of cloud services for the enterprise."

Watch the video for the announcement in the keynote.



IBM business partners can add their cloud based services. Read the FAQ for details.

"Business partners are selected for inclusion in the IBM Cloud marketplace based on their ability to support enterprise class cloud solutions that complement IBM's leadership in IaaS, PaaS, and Saas. As such, prospective business partners must offer services which run on or are deployable to SoftLayer, which integrate with IBM's BlueMix or patterns PaaS technologies, or which support another of IBM's key cloud offerings, including our many SaaS offerings."

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.