Improving user experience for mobile APIs using the cloud

For your end users, one of the most important aspects of your API is the perceived response time — if your mobile application takes an excessive amount of time to load data, users will get frustrated.  

In this series of blog posts, we’ll cover three ways to approach building a RESTful API that leads to better user experience by minimizing perceived response time. These strategies include: processing requests quickly, reducing payload sizes, and eliminating requests entirely, or only downloading data that has changed. And, we’ll show you how to do each by providing sample node.js code that can be deployed ‘as is’ on Red Hat Mobile Application Platform to build a better mobile API.  

But, before getting into each strategy, why are these important? The user interface (UI) and user experience (UX) are extremely important to the success of mobile applications.

Continue reading “Improving user experience for mobile APIs using the cloud”

Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!


Are “Web Components” in the future for PatternFly?


Web development has become increasingly complicated in recent years.  The questions of which framework to use often can eat up much time at the start of a project.  I can’t remember the number of times people have asked me while working on a Knockout project if I’ve heard of Durandal, or when considering Angular 2 – what about React/Flux or Aurelia?

Patternfly is a community project that promotes design commonality and improved user experience. Its offerings include open source code, patterns, style guides and an active community that helps support it all. But, this complexity, choosing web frameworks, also affects PatternFly.  Our goal is “to build a UI framework for enterprise web applications”.  That requires that we remain outside of the discussion of which framework is best and provide a solid set of patterns and designs for developers to rely on.

How can you build a UI framework when there are so many choices and so many strong feelings about the different choices?  In my opinion, it’s important for developers to choose the framework that is best for the project and fits their skill set.  There isn’t one choice that works for everybody and it’s important that we support all developers that want the benefit of well-designed components that can be used in enterprise applications.

Continue reading “Are “Web Components” in the future for PatternFly?”

Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!


Keeping track of my subscriptions using the Red Hat Content Delivery Network API

In a previous post, where-have-all-my-subscriptions-gone, I mentioned that you can access the Red Hat Content Delivery Network (CDN) using its API — allowing you to query CDN for subscriptions and their usage, registered hosts, and more as well as unregistering hosts, and more.

I wanted to do some analysis for my own subscription usage, so I wrote some scripts that let me more easily tell where my subscriptions are being used.

Since Python scripting is still fairly new to me, and I wanted to learn something new, I decided I would write the primary script using Python 3.

For my use, I needed the scripts to:

  • Tell me which systems are using my subscriptions and pool IDs.
  • When did the system last check in.
  • List any systems with duplicate names. This is an indication that the systems were re-installed without first being unregistered.
  • When did the systems last check in. A system that no longer checks in may no longer exist.

After a little work, I had a script that could give me what I wanted. The script can generate 3 basic reports for me.

  • A pool/subscription usage report
  • A duplicate systems report
  • A report of when systems last checked in and can show me only reports that have not checked in longer than some determined number of days.

Here are some sample reports generated by my Python script. The script accepts the –help option to give details on its options.

Pool Usage Report

            Name                 | Pool ID      | Quantity | Consumed | Exported
Subscription 1                   | 123456abcdef | 300      | 101      | 30
     Attached Systems: | System ID              | Name
                       | 12345678-abcd-1a2b3c4d | system-1 Last Checkin (days): 50
                       | 12345678-abcd-1a2eeeee | system-2 Last Checkin (days): 0

Subscription 2                   | aabbcc1122dd | 10 | 8 | 0
     Attached Systems: | System ID              | Name
                       | bcdef678-af5d-1a2cfd4d | system-3 Last Checkin (days): 9
                       | 12346fde-aeed-1a2abdce | system-4 Last Checkin (days): 5

Duplicate Systems Report

Hosts with duplicates: 197
Duplicate systems: 276
Freeable systems: 79
Count | Name         Last Checkin (EPOCH) |    ID 
# 11  system-1         1466648032           12345678-abcd-1a2b3c4d
                       1466639184           1b2b32b3-1234-867ab210
                       1466132041           3b2ds525-abdd-a1b1c1d1
                       1465339439           3232bb32-43bc-abcdabcd
                       1464219749           423443dd-7652-12341234
# 10  system-2         1466649410           12345678-abcd-1a2eeeee
                       1466638967           3421dd11-abcd-bdcdeeed
                       1465339174           787dbb8a-42dc-abcdef11
# 10  system-3         1466649256           bcdef678-af5d-1a2cfd4d
                       1466638709           678acb26-6421-bcccad12
                       1464196357           5673ffff-ab12-123bcddd


Last Check-In Report

Host     | ID                     | Last Checking (Days) | Entitlements Consumed
system-1 | 12345678-abcd-1a2b3c4d | 162                  | 1
system-2 | 12345678-abcd-1a2eeeee | 156                  | 1
system-3 | bcdef678-af5d-1a2cfd4d | 156                  | 0
system-4 | 23422323-1234-11223344 | 155                  | 0
system-5 | ababaaba-4321-aabbccdd | 153                  | 1
system-2 | 3421dd11-abcd-bdcdeeed | 153                  | 0

Now that I have my reports, I can see that I have hundreds of systems I need to remove. That is a lot of pointing and clicking in the Red Hat Content Delivery Network (CDN) portal.

API to the rescue again! It allows me to remove systems and free up the subscriptions as well. This is awesome, life is good.

I wrote a bash script to remove systems from being registered. Sorry no Python here, I am being a bit lazy and I know I can get the bash script done quicker than writing another Python script. It uses the following curl command to remove a host from being registered to CDN, I wrote a bash script that will take a list of system UUIDs from standard input.

curl --silent -X DELETE -u CDN_USER:CDN_PASSWORD -k ""

I went back and added an option to the Python script to tell it to not print the header information. I also modified the output of the duplicate systems report to add a hash mark in front of the most recently checked in system. This will allow me to pass the -v option to grep so it ignores the most recently checked in system in each set of duplicates. With a little help from awk, piping the output of the duplicates report through grep and then awk gives me a list of system UUIDs  that can be used as input to the list of hosts to remove.

The Last Check-In report can either display the last check-in for all the registered systems by using the –checkin option alone. Or the report can be generated to list the systems that have not registered within a certain number of days by using –checkin and –days options.

Now I can easily remove all my duplicate systems, except the most recently registered one, and I can remove all systems that have not checked in recently.

I imagine others might find these scripts useful as well, so I am making them available via GitHub.

The README file should be fairly explanatory on how to use the scripts, so I am not including the information here since it would make this blog post very long.

Please be careful using these scripts, they are only tested when I need to clean up my systems in CDN.

Enjoy and I hope others find them useful as well. Better yet, make something even better from them.

Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!


Where have all my subscriptions gone?

Red Hat’s Content Delivery Network (CDN) is a great tool to help ensure systems have the latest supported packages available to install. Simply register your system, attach it to a subscription pool id, and start installing packages. This is great, this is easy.

There is a nice interface on the Red Hat Customer Portal ( ) that allows you to manage your CDN account. It allows you to see when your subscriptions are expiring, information about the individual systems that are registered, among other things. However, what I would like to do is easily look at a subscription and see which systems are using it or when they last checked in. If they have not checked in for a while, we can probably reuse their entitlement.

If you are like me, it can be a challenge to keep track of the systems that have registered and are using subscriptions. I have 20+ people registering systems to this account, we can easily spin up dozens of systems a day during testing. We redeploy these systems multiple times during a day, a lot of times these systems have random names. If they do not get unregistered before they are reinstalled then they consume subscriptions within CDN. Eventually we run out of the needed subscriptions.

Continue reading “Where have all my subscriptions gone?”

Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!


Seven must try user experience tactics for developers

Users have higher expectations than ever from applications. Your website or application has only 10 seconds to make a good impression, and only 20 min to help your users achieve a goal where they feel successful.

How many of you are developers? (99% are developers in DevNation 2016 audience) How many of you have worked with a UX designer? (40% have worked with a UX designer). Regardless of whether you have a designer or not, you are responsible either alone or as part of the team for making your user experience excellent.

Learning UX will make you a better developer, and make sure that you spend your development effort in the areas that have the biggest impact on your users. Here are seven tactics you can try on your applications to not only meet, but exceed your users’ expectations.

Continue reading “Seven must try user experience tactics for developers”

Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!


More about DevNation:  DevNation 2014 was our inaugural open source, polyglot conference for application developers and maintainers. View some of the DevNation 2015 session recordings here.  DevNation 2016 will be in San Francisco, USA, the week of June 26.  Be sure to follow its status and register at