Monthly Archives: September 2013

Bug, fixed: a scheduler job that was killing performance on the Kerika server

Our apologies to anyone who was affected by this bug: the email scheduler we built (about a month ago) had a bug that caused CPU utilization to periodically spike all the way up to 100%, and this in turn caused the server to temporarily freeze. We have fixed this bug, thanks in part to a couple of intrepid users, from Poland and the UK, who gave us some important clues.

By way of background: we have a scheduler program that runs periodically on the Kerika server doing various daily tasks. One such task is resending invitations that have not yet been accepted (or rejected, as the case may be); another task is providing a daily summary of each user’s outstanding tasks.

The resending of invitations takes place at a fixed time, but the creation of the daily summary is more complex, since the system sends each user his/her daily summary at 6AM based upon that user’s last known location. This means, for example, that a user based in Seattle would get his daily summary sent at 6AM Pacific Time, and a user based in India would get her summary sent at 6AM Indian Standard Time.

The bug: there was some overly complex SQL queries being used by the scheduler that was causing the server’s CPU consumption to spike all the way up to 100%. In effect, when the scheduler did one of these complex queries, nothing else could move on the server, and the result was an erratic user experience. Not good.

Why it wasn’t found before: because the scheduler ran at different times during the day, based upon the geo-location/distribution of our users, the behavior was not observed in a consistent manner. As our user base grew, the spikes occurred at different times during the day, and we didn’t make the connection.

How it was fixed: the old, complex SQL queries were taking 3-4 seconds to execute; replacing them with a couple of simple queries cut the time down to 1-2 milliseconds. That’s a 2,000X improvement!

Lessons learned: avoid complacency, even for what look like simple, routine programming. Use a profiler. And always respond to user complaints within 24 hours or less, like we always have.

Adding files to cards and canvases: in Internet Explorer 9, and other browsers

Adding files from your desktop to a card or canvas in Kerika is now easier than before: providing you are using Firefox, Chrome or Safari…

Internet Explorer 9, however, remains less elegant. And that won’t change until folks start moving off IE9 to IE10 (or, at a minimum, stop running IE9 in the dreaded “compatibility mode” which Kerika won’t support at all!)

There are several ways you can add files to your cards or canvas, all of which result in the files being uploaded to your Google Drive and shared automatically, seamlessly with your project team members:

Use the upload button inside the card details display, like this:

Adding files using the File Upload button
Adding files using the File Upload button

Drag and drop a file onto a card details display, like this:

Dragging and dropping onto card details
Dragging and dropping onto card details

Drag and drop a file onto a canvas, like this:

Files dragged and dropped onto canvases
Files dragged and dropped onto canvases

Drag and drop a file onto a card on the task board itself, like this:

Dragging and dropping a file onto a task board
Dragging and dropping a file onto a task board

All of these work on Firefox, Chrome and Safari, but with Internet Explorer 9 only the first method works: you have to click on Upload button.

There isn’t much we can do about it, since Internet Explorer’s implementation of the HTML5 standard was so erratic… Sorry.

A simple fix to the iOS Calendar and Maps apps would make both apps so much more usable!

iOS 7 is a great improvement over iOS 6, but we are sorely disappointed that a very simple bug fix to the iOS Maps App and the Calendar App remains undone!

Here’s the problem: if you create a calendar entry and add an address in the “Location” field, for some bizarre reason the Calendar App does not recognize the full address.

Here’s an example: a meeting between Rame and Arun is scheduled to take place at 255 108th Ave NE in Bellevue, Washington (which, by the way, is a well-known local office building known as the Civica Center). When you create the calendar entry, you can type in the full address like this:

Creating a calendar entry in iOS Calendar
Creating a calendar entry in iOS Calendar

But when you are viewing the calendar entry, the Calendar App only recognizes “255 108th Ave NE” as a clickable link: everything after the comma, in this case “, Bellevue” has been ignored.

Viewing a calendar entry in iOS Calendar
Viewing a calendar entry in iOS Calendar

That’s bug #1: a simple bug, which could be solved simply by adding some logic to read the rest of the text string after the comma since the entire field is a “location” anyway!

Now we come to the iOS bug, which is far more irritating — and, indeed, baffling considering that the Maps App was designed specifically for mobile devices with built-in GPS capabilities!

If you click on the “255 108th Ave NE” link within the Calendar App, e.g. to get driving instructions for getting to this location, the Maps App completely ignores your current location!

Instead, it starts, very bizarrely, with the center of the continental United States and offers suggestions in Omaha, Nebraska (about 1,000 miles away from the current location of the phone, as you can see from the blue dot in the upper-left corner):

Suggested locations from Apple Maps

Why would a Maps App designed specially for a mobile phone ignore the value of the user’s current location, and start off by suggesting locations that are hundreds of miles away?

Google Maps, in contrast, doesn’t have this problem. If you copy-and-paste just the “255 108th Ave NE” string into the Google Maps app, it wisely starts off by suggesting the closest locations, not the ones that happen to be closest to the center of the continental United States:

Suggestions from Google Maps
Suggestions from Google Maps

A problem that seems so simple to fix, and yet it persists one year after Apple’s Maps was introduced…