Circuit Breaker design pattern and library for Swift

Working with REST services can be extremely error prone. You could have latency, network failures, or at worse case even total down time. I have been writing a lot of code as of late that requires extreme error handling and graceful failing when dealing with remote REST services and in general web calls – like parsing or loading external web sites for DOM evaluation as an example. The issue is you can’t trust the performance or even trust the service is even available and knowing what methods are failing or causing the bottlenecks could be extremely cumbersome. You could implement network profilers to capture what is going on, or, you could implement a CircuitBreaker design pattern and take control of your calls yourself.

Welcome the Circuit Breaker design pattern. This pattern allows you to monitor a specific function call and “break” gracefully if it has taken too long or even fails. This is usually symptomatic with asynchronous calls that may require calling other code on completion, fail, or timeout. Methods like jQueries ajax where you supply the various error, complete, and done methods work great and even languages like Swift and Java have similar callbacks but it lacks data around the calls. The CircuitBreaker design pattern will make your code easier to follow for race conditions and it can even track statistics around the calls…

If you are a Swift programmer you can check out the Swift CircuitBreaker project on GitHub. It has complete documentation and makes using this design pattern very easy and straightforward.

Now, what sets this package apart in my opinion is it also gives a large set of statistics around the calls. Capturing how long calls take (latency), how many successes, failures, and even average response times.  From an SLA perspective this is great! You can then quickly identify what remote calls to “other” services are the primary bottlenecks or problems in your application.

IBM Skills Gateway: Refreshing your technical arsenal!

I have been hearing a lot about the different courses offered on the IBM Skills Gateway so I decided to try one. Since I have been working with BlueMix for a bit I figured it would be easy to go through the BlueMix Essentials course and earn the badge, I squeaked by the test with a 90% (you need an 80% to earn the badge, so make sure you REALLY pay attention as there are only 10 questions).

BlueMix Essentials.png

I have to say I am pretty impressed with the way the course played out; mixing video, text, and lab content into a seamless straightforward experience. You can stop and start as you will, it will just keep track of where you left off. I got a little impatient with a few videos but that was only because I was familiar with most of the material, however it makes you finish watching each video – so no skipping around! I really like this course because if anything, it teaches you how to setup an application, make code changes locally, and then deploy those changes to the BlueMix cloud. Make sure you before you actually do the lab you watch the lab video. I kept making the mistake of just doing the lab as described and then I was forced to watch a 10-12 minute video of the instructors walking through the lab. It explains how to install the different tools you may need, walks you through all configurations, using the command line Cloud Foundry tools (cf), and using Eclipse as your IDE for your project.

Finding courses is very easy and many are free! You can filter courses by duration, category, product group, and skill level.


You can take courses that are instructor led or self-paced. Some courses are a combination of reading material and videos, while others may contain hands on labs, or may just be a simple article like An introduction to InfoSphere Streams. If you really like the concept of badges, which in my opinion are similar to certfications, then you can search for them here. The badge system is a partnership with Acclaim and it uses Open Badges which can then be posted to your social profiles, like on LinkedIn.

Screen Shot 2017-03-30 at 2.33.10 PM.png

I am still waiting for my first badge, I guess some badges could take from 1-2 weeks to get. I would be interested to hear others experience with this process. Meanwhile, I think I might earn a few more badges and beef up my own technical arsenal!

Is the future of photo libraries with auto-tagging and Watson?

Tagging digital content is time consuming for a person and very hard for a computer. Who remembers when Flickr’s auto-tagging was called out? (read more here) So needless to say its not a trivial task, unless you are Watson…

I am fascinated by this technology. To be able to actually pull apart an image and apply tags that describe what is in the image is amazing. If you think about the applications here, they are endless. I was thinking about how I constantly look for images on my Mac. I have over 10,000 photos on my mac and the only way I can find them is using the map if I recall where I took it or I remember the time frame and find it based on date. Imagine if you could do a search based on tags!

Since Watson Content Hub(WCH) does the auto-tagging for me I decided to whip up a short video showing the power of this amazing feature using WCH. Remember, you could always build your own application like this article explains using OpenWhisk and the API’s on BlueMix. To get you started, below is a screen shot of the Watson API’s on BlueMix:

Now for the video. Like I mentioned, I was really just playing around with various photos in my collection to see how well Watson did at tagging. All in all, I am very impressed…

Where do you think this technology is going? Will you expect your photo albums to have this ability in the future?


Using Watson Content Hub as a central repository and tag generator

Want to learn how to integrate Watson into your applications? Well, it’s as easy as clicking on this link and getting started. From image recognition to financial services API’s there is an entire catalog of Watson API’s right at your finger tips. I personally have been playing with the Watson Content Hub API’s and they are very cool. A project I worked on used the Watson Content Hub(WCH) API’s with WebSphere Commerce where we used WCH as not only a central repository but also extracted the tags Watson generated for product images and pushed them into the product record in WebSphere Commerce. This enhanced the searching for products by a customer greatly. Watson generated key words we didn’t think of at first, making search and type-ahead much better.

Here is a quick video where we used a City Cool product called Minimals Moped. We pushed the images to WCH, Watson generated new tags, then we used those tags in the products keyword field. The search indexer did the rest and viola, the search experience was greatly enhanced to have a broader set of key words per product.

Working in the BlueMix Garage

screen-shot-2017-03-01-at-2-26-39-pmI have always been a fan of gamification and now I can be manly and say I am working in the garage, the BlueMix Garage!  You can earn points by completing different tasks in the BlueMix Garage Method site.

Top 5 things that make a SaaS product great

Screen Shot 2016-10-03 at 12.57.47 PM.pngSelling software can be really easy or really hard and the harsh reality is it depends on the product. Great sales people use to say “I can sell ice to an Eskimo” but today, with the internet, the level of global competition, and a more educated younger generation, the products  have to sell themselves. In a world of instant gratification with zero patience, and almost no tolerance for faultiness, the world of continuous development and value-add is here and it is demanded. I will not include what I consider the number one element in the list: it has to be simple to use and easy to navigate because that should be the golden rule for all software. I will focus on the “other” areas that make a product great not only to the customer but for the creator.

Here are my top 5 elements that make a SaaS product great:

1 – Platform, Availability, and Scale

In almost every discussion I have, availability and scale is always a number one concern and “is it a platform” frequently comes into question. Many times the platform question may be for API interfaces or extensions from other platforms since micro-services based architectures are the “in thing”. Questions like:

  • Do you support in place upgrades with zero down time?
  • Are you distributed and support a world wide content delivery network?
  • Can I scale up during peek times?
  • Are all the API’s REST based?

Those questions and more are almost always asked. Remember, eople are putting the IT tasks in your hands and they know the pains of their business and you better be able to answer their questions in their context.

2 – On-boarding

On-boarding needs to be dead simple. A few fields on a form, a verification email, and you should be up and running in minutes. That is the expectation today. If your SaaS product works with data, images, or videos, then uploading those assets need to be just as simple. Searching and managing those assets need to be as intuitive as using a Microsoft Office Application or using your iPhone. If it’s not, you have failed.

3 –Video Library/Training Webinars

Almost every company has a YouTube channel of some sort. But do you have self paced videos showing off your products best features? Do you have videos of your products solving a business user problem? Those are the videos customers look for. This generation searches for videos to figure things out more than ever before. Video is the new encyclopedia and that includes webinars.  Webinars play a big part in building a community around your product. It brings your customers together while giving out the latest and greatest information for how your product can help solve their problems. Recorded webinar videos are also becoming a popular reference for education and should be included in your library.

4 – Self-paced tutorials and gamification

The last two generations, mainly because of online gaming, are conditioned for being rewarded for their accomplishments. From the almost certain participation awards in AYSO and Pop-Warner to ranking systems in games like Call of Duty it is almost expected. Having self paced tutorials and badges for completing work benefits you in two ways:

1 – it entices your customers to really learn and understand your software while getting rewarded and

2 – their badges, certifications, and rewards can be posted to online social profiles like LinkedIn, an instant resume bonus!

5 – Know exactly what your customers are doing

Analytics are so critical in software today you simply can not be competitive without it. Data and the internet of things is quickly proving that big data really is BIG. So big in fact most companies have no idea how to handle the amount of data or make heads or tails of it. This is where having cognitive assistance will differentiate you from your competitors. The companies who can understand this data are the ones with the competitive advantage, they will be the winners. More and more augmented intelligence systems are coming into play – you are probably thinking, don’t you mean “artificial intelligence”? No, I really do mean augmented. I say augmented because as it stands today you most likely won’t let the computer fully make a decision for you. I am talking about serious business impacting decisions like sending out a million emails of $20 off coupons – that could get rather costly. So essentially what systems do today are suggest actions to take and a human makes the final decision – augmented intelligence. Understanding how your customers use your software is extremely important to your success. You can optimize click paths, find best/popular practices, understand customer journeys, and most of all know which features are used most and understand where to further your investment.

Three out of the five items in the list directly impact your customer. The first one directly impacts your customer and potentially their customers. The last one affects your overall product growth and strategy. I could have picked very different topics for my top five but after much reading I think these five are definitely at the top of the list. I know there are many more out there and I would really like to hear what you think should be in the top five!

Screen Shot 2016-10-03 at 1.53.32 PM.png

3000 Members now in the BlueMix LinkedIn Group!

Today, as I processed the pending membership requests on LinkedIn for the IBM Bluemix group, we surpassed 3,000 members!  In less than two years the group continues to grow and membership and activity have grown regularly each week. Keep promoting it and keep posting important material to the group!

While the group has some good discussions and examples of how BlueMix is used, if you prefer video then you should consider checking out the YouTube channel dedicated to IBM BlueMix, which is run by the Developerworks team: