Monday, March 21, 2016

Gotcha #5 - Network Performance, CSS, and HTML5

Today's article comes courtesy of understanding your customer's environment, and that emphasizing style over substance can break the bank.

Our story starts with an urgent request for assistance from a system administrator, a minor application update has resulted in a nearly five-fold increase in total network traffic at a remote office. On Monday morning, when the morning shift arrived network traffic began to spike. It grew, and grew, far beyond normal traffic levels for the office and stayed there, night and day, until the last shift signed off on Friday evening.

Think about this for a moment.

The application's network traffic did not increase five-fold. The entire office's network traffic consumption increased from ~2Mbps (24-hour average) to nearly 9Mbps (24-hour average) with peaks topping out at 10Mbps.

The first stage is always denial.

How could a minor update to a server-based web application that mostly consisted of a couple minor bug fixes, one new summary screen, and some UI tweaks be the problem? It must be something else, there isn't anything new or unusual in the application update.


Step 1: Isolating the Problem
Easy enough to do, by using more detailed reports we could see the initial spike in unusual network activity began at 10am on the Friday before, the same time as the outage window when the application update was deployed.

Also, there were no other maintenance activities ongoing at that time, no file transfers, and no other system updates scheduled or otherwise.


Step 2: Reproducing the Issue
To confirm, we conducted a test where all instances of the application on every workstation on the site was closed, and by so doing network traffic returned to its normal (low) stable state.

One by one, each workstation re-loaded the application and by time the last workstation was reconnected the network traffic was back at its five-fold peak. It was during this process of re-loading that the system administrator noticed something unusual. A new UI feature had been added to some screens, when a specific piece of data was in a warning state - the text box would flash orange. And every time a new screen loaded that happened to display one of these flashing orange boxes, network traffic would spike sharply.

In the end, the system administrator noticed 10 out of more than 100 workstations happened to be displaying this flashing orange box. Returning to shut down just these 10 flashing displays suddenly dropped network traffic back to normal once more. When they were re-loaded, network traffic would spike once more.

Step 3: Cause and Solution
So how can a simple CSS and HTML5 flashing text box on 10 screen possibly start pushing 4 times the total network traffic of an office of more than 100? The technique to highlight a text box had been used elsewhere in the application already, and the style control was rendered entirely in-browser with no additional server requests being made.

How can a box no larger than 400px by 300px with a lovely fade-in/fade-out HTML5 animation possibly consume 800Kbps per screen?

The Epiphany

Animated. For the first time in this application, the developer (to satisfy a requested requirement) used a simple animation cycle to flash the control orange on a 4-second cycle. It was a lovely effect, understated, but unmistakable and was easily visible when displayed on a large screen from across the room.

What wasn't clear however, was that each workstation did not use a browser to view the application. Instead, each workstation used a Remote Desktop (RDP) session to a centralized (offsite) server which then connected to the application in a browser window.

Instead of being rendered in a local browser session and consuming no network resources at all, the beautifully animated flashing textbox was being rendered and streamed as uncompressed full-motion video over the network to the site office.

10 workstations streaming uncompressed video for 24-hours a day, 5 days a week.

Step 4: Resolution
In the end the problem was easy to solve. Rip out the animation, and using a simple steady-state orange highlight to communicate the information.

But it was an important lesson. You must be aware of how your customer is using the tools that you build, and how the simplest of design choices can cause a major impact under the wrong circumstances.

Tuesday, January 19, 2016

Research Study: Memory Test


Anyone who signs in with an email address and completes the test before Feb 28 will be entered into a drawing for one of the top 2015/2016 indie games from Steam or an equal value Amazon book order.

Participate Here!

I'm conducting a study on memory and the ability for people to memorize short sequences of numbers. In order to do this I've built a small web app to conduct memory tests. It tracks both correct answers and time spent and scores your performance - so speed is better but not at the expense of answering incorrectly.

The purpose of this study is to test your short term memory skills, numeric analysis ability, and speed. The test is divided in 5 levels of 5 questions that increase in difficulty. You may complete them in any order you choose and at any time if you would like to do some now and return later to do the rest, but you must complete them all before the results can be processed.

The test is randomly generated, so you can take it as many times as you'd like to try and do better, and it tracks your history so you can see you best score if you do it more than once. Each question presents you with a small set of numbers to memorize, then asks you to answer a question about the numbers.

It's very simple, and quick to do. Please give it a try, and share it around - compete against your friends!


Tuesday, November 17, 2015

Refugees - Past, Present, and Future

I debated with myself about writing this post. I normally stick to technology, literature, and various constructive activities on my blog, and I avoid commenting on current affairs or political situations. I avoided the Canadian federal election, talking about who I supported and why, among various other noteworthy events.

This post is different. If you want to avoid my thoughts on refugees and their place in Canadian history, then go ahead and stop reading now.

This is from a post that I wrote and shared on Facebook.

Did you know: 21,000 Mennonites came to Canada as refugees between 1923 and 1930. These were German-speaking people from Russia. This was shortly after the Russian revolution deposed and assassinated most of their royal family who were close allies of the west. This was shortly after the most violent and bloody war the world had ever known, where Germans were the enemy. This was a time when Canada only had 10 million people and 21,000 refugees was a much bigger number for the population to support.
Mennonites said they were a religion of peace, they were pacifists, but to many Canadians they were the enemy. Sure some Mennonites already lived here, but those Mennonite had been living here for two generations and more than fifty years already.
But Canada welcomed them anyway, because that is what we do. Canada welcomed my great-grandparents to this country. My family were refugees fleeing war, fleeing persecution, fleeing the Soviet Gulag. They were the enemy in the eyes of many, but they were welcomed anyway.
Many people are questioning the wisdom of allowing 25,000 refugees into our country who come from circumstances my family knows all too well, as do many families in our nation. I ask you, when has welcoming refugees EVER been bad for this country? When have we ever welcomed in the desperate and persecuted and not been made better for it?
I would gladly open my arms to Syrian refugees and tell each and every one of them only one thing. "Welcome home."
In light of the attack on Paris, many people are questioning the wisdom of allowing Syrian refugees into their country, about the possibility of enemies sneaking into the country among them. An observation was also made in response to my post about having never heard of a Mennonite strapping on a suicide vest.

This is how I answer.

I am not calling for scrapping the vetting and selection process that normally takes place for refugees resettling in Canada. I'm not rejecting this: CBC - Syrian Refugee Screening
I am rejecting this: CNN - Syrian Refugee BacklashThe refusal to aid in a humanitarian crisis because of fear of a few. What is known of the attackers in Paris is that it was masterminded by a Belgian with a history of violence, and conducted by two Belgians, three Frenchmen, and one Syrian who registered as having crossed over in Greece, along with other unknowns.
Registered - as in unlikely to have gone through a checkpoint clutching an AK-47 and a suicide vest. The attack in Paris would have happened with or without this one person's participation - and it sounds to me like the French have more to fear from its own natural-born citizens.
You say you have never heard of a Mennonite with a suicide vest, and I agree with you there. But I would counter that I have heard of Mennonites who joined the SS, and entered the gates of the Stutthof concentration camp as guards. The Mennonite - Mennonites and the Holocaust
ISIS may be trying, but they do not yet hold a candle to the mid-century meat grinders that were Germany and Russia.
What is one or two extremists without resources or equipment in the grand scheme of things? We have exported far more Canadian extremists to Afghanistan, Iraq, and Syria over the past fifteen years. I would suggest perhaps that we might concern ourselves more with actions that we ourselves take that create homegrown extremists, people who feel they are desperate, disenfranchised, and have nothing to lose right here.
CBC - Mosque Arson is a Hate CrimeCTV - Ontario Youth UnemploymentCBC - Poverty In Canada
I am the product of refugees being welcomed into Canada. Refugees who were hated, and feared, and demonized for where they were from, for the language they spoke, and for the beliefs that they held. I understand there is fear here, and that to some people it is a very real fear.

Imagine being one of those refugees. Living in a country halfway around the world, a country where you do not speak the language, where you do not share their culture, or the religion of most. A place where people fear and distrust you because they associate you with an enemy. An enemy that kills unexpectedly, attacking with surprise, an enemy that wants to start a war.

Imagine a new war starting, worse than the last one, started by the same people that your new neighbours see you as being part of. A worse war, one more horrible than anyone could imagine, one where atrocities were committed that saw millions of innocent civilians murdered. And you, living in your new home country, refuse to fight.

In World War 2 military casualties on the Eastern Front exceeded 15 million soldiers with another 14 to 17 million civilians killed in a war between my family's ancestral homeland (Germany) and its former adopted homeland (Russia). The fall of one as an enemy of the west led directly into the rise of the other as an enemy of the west.

And all along, my family lived, grew, and prospered in their new land. They made friends, lived in peace, and grew to be an intrinsic part of their new home. Today there are nearly 200,000 of us in this country, and once again a new wave of refugees are fleeing terror, war, and persecution.

We have made the right choice in the past. We must have the courage and the fortitude to make the right choice again. It is frightening, risk, uncertainty, the unknown are frightening things. But it is the right thing to do. It is what we do.

Because this is what Canada is.

Tuesday, October 13, 2015

The Black Art of Performance Requirements

BAWorld Winnipeg (October 7-9, 2015) at the RBC Convention Centre is now over, and I had a wonderful time listening to a full slate of excellent, interesting, informative speakers. I had the opportunity to meet many new people both in the Winnipeg Business Analyst community as well as others who joined us from out of town, and renew acquaintances and friendships with others that I haven't seen in awhile.

My own session, The Black Art of Performance Requirements went very well, I had a great time presenting and I'm glad I could provide something a little bit unique and different.

If you are interested in the slides from my presentation, I have made them available here. Download presentation for The Black Art of Performance Requirements (315kb).

Thursday, August 20, 2015

Timesplice - Inkshares Funding and Nerdist Competition

Timesplice is now open for funding on Inkshares as part of a competition being sponsored by Nerdist. The top 5 funded sci-fi and fantasy books will be published by Inkshares, one of which will also be selected to be added to the official Nerdist book collection.

The complete first chapter is available now on Inkshares (and hasn't even been published on my own site yet - but will be over the next couple of weeks).

If you have never been to Inkshares before - it is a crowd funding site for book publishing. To pledge support for a book it is only $9.99 - with no payment or cost until the book has been completely funded. And if you are new to Inkshares, they will give you a $5.00 credit towards supporting a book - reducing your very first pledge to only $4.99.

If you happen to like what you read, it would make me very happy if you would be willing to support Timesplice. One way or another I will complete this book and make it available to everyone, but if you support it now we might even be able to get it published on actual paper - giving you something to hold in your hands and read which would be amazing!