Oct 18, 2009

Panoramio Photo API (III)

Well it is exactly a month since Panoramio API has started to misbehave after a major site maintenace, although they fixed that particular bug quite fast, still the API it is not working properly so I checked if their own application work properly. To my surprise it seems their own applications are also affected  which quite strange for a Google company, see my post at their forum  http://www.panoramio.com/forum/viewtopic.php?p=249432#249432
" Photos shown in world map ( http://www.panoramio.com/map/) do not correspond to the coordinates of the map but include photos from very distant places not shown in the map - this is particular true on low zoom levels of the map."
they requested some examples which I also posted there with some explanations.
Still waiting for an answer.

Sep 23, 2009

Panoramio Photo API (II)

It seems somebody in Panoramio listened to my prayers and they were fast to respond. So according to their official Forum ( http://www.panoramio.com/forum/viewtopic.php?t=20934 )
" Panoramio API: "count" is not working and changes in call back function. We are working in bringing them back."

Sep 22, 2009

Google Maps API V3

Some good news about API's now.
Today Google has released a new version of v3 maps API today, with a nice surprise this time it has included a badly needed feature, Poly-lines and Polygon overlays !.

Panoramio Photo API

I am using  Panoramio JSON Photo API since quite some time.
Well, during last weekend they have a major maintenance of their platform.
Unfortunately after this maintenance the API format has been changed without any notice, It took me half a night to realize what was happening and fix my mash-up application.
I have filled a report here ( http://www.panoramio.com/forum/viewtopic.php?p=239662#239662 )
Lessons learned : If  you are using any third party APIs - have a plan and be ready for surprises !.

Sep 12, 2009

Server Instance Life time (part II)

I got some remarks on the above mentioned post today at :
Following is my response :
"server-instance-life-time"    "that's not my experience.  In the early days an instance of my app  would live for about half day between hits,"  Well it depends on how we define 'early days' - I am talking about circa  May 2008 since when I started keeping an eye on instance life time. It used to be a some seconds value, now it is something like a minute  class value for me.  I do not dispute other values given by some members of the group here since (I) some other -  application specific parameters could be possibly (?) -  used by the environment to  determine how long it keeps an instance running. And (II) ... may be a particular application has a request served by a new instance although previous instance is still up and running. ? (just food for thinking).   Anyway I do not see the point made by Mr. BJörn Lindqvist of pinging at 5'' intervals.  It is a waste of recourses (let's think Green !). There are other solutions even if his numbers are right. i.e: {I really hate this initials reminding me of Internet explorer}  think ...  of a static landing page which will ping the server preparing it for successive visits etc. etc..  If we are talking about sub 30'' lifetime something must be really wrong, why you don't try a with a simple 'hello-world- application' to check the figures.  By the way, i have a handler which was always giving me red figures in the vicinity of 1000 + cpu_ms. I was happy to see it going purple at around 750 cpu_ms since a week or so without me touching anything for this particular handler.  Anybody else experienced something similar ?   Happy coding  Nick

Sep 3, 2009

Google Maps API V3 (part II)

Glad to see that my bug issue report mentioned in a previous post was verified, accepted and fixed by Google's developers team in ZERO time (whole process took less than 1 working day). This tells me a lot about the quality of their work.
It is a pity that I have to revisit my code now and remove the work around I devised.
Lesson learned: If you run into a bug and you are damn sure it is a real bug and not your lousy code causing the problem do not hesitate, fill a report and wait a little before you start waisting your time devising a work around.

Sep 2, 2009

Gmail failure today.

Well it happened again, after last February  there was one more outage  of Gmail for some hours today.

But ...  a small remark -  What was down and not functioning was  only Gmail's web interface - Email Servers were up and running and we could send-receive through POP / IMAP agents.

And that was the case with (almost) all major Gmail failures - no real service interruption.  I am sure it will make headlines tomorrow but nobody (well .. almost) will mention this fact.

Hm .... It has started already : "This is one of the reasons that corporate e-mail has not moved to the cloud," said Tim whatever, president of Creative Strategies in Campbell. "Under no circumstances do they want to have the system taken down."

Hope somebody tells this guy of Creative Stratospheric Disasters  in Com(p)eBackToFortran  that most of Corporate Email is in the cloud already one way or the other.

For system admins that were prepared for this it was really NO EVENT at all.

And ... for people asking what this has to do with Application Engine  the answer  is obvious :
This (non) event will be used by people of   BackToEarthFromCloud  camp   to spread around FUD  (Fear Uncertainty Doubt)  for cloud computing in general - just because they were very late in this game or they do not really understand it. :)

Aug 30, 2009

Google Maps API V3

I was doing some work with  Google Maps API V3 during last couple of weeks,
and here are some of my experience with this version.

  • Very small footprint and quite fast.
  • Although in Beta I think it is quite stable to be used in production - if of course you are ready to follow with latest developments and fixings.
  • A small but annoying bug I discovered (for which I filled a ticket : http://code.google.com/p/gmaps-api-issues/issues/detail?id=1643 along with a work around)
  • A tip : Since there is no way to hide-show the zoom - pan and Map type selection controls through api you have do it by writing some javascript 
        var housediv=yourmapObject.getDiv();
        if (housediv.childNodes[3]) { 
            housediv.childNodes[3].className = myClass 
            housediv.childNodes[4].className = myClass 
         // if exist 
        //controls reside in childnode[3] and [4] of container div 
        //rest is done with CSS class where you can hide-show or change the opacity

Aug 16, 2009

Be careful with Yaml editing

The other day I have almost erased an application of mine in App Engine the only thing that saved my day is that I was working on a version.
So how this happened to me ?
Well you edit your yaml file which probably have been copy/pasted from some other application , you read it, you are satisfied with what you see and you decide to upload on the spot so here we are: appcfg ... and presto your old application is gone coz you forgot to save this yaml which looked good to your eyes.
You see appcfg does not read through your own eyes it prefers its own devices which can read a complete different story than yours.

Server Instance Life time

This was always an issue since the beginning of GAE, with people suggesting fake requests or cron jobs to keep an instance alive.
I am following the issue since the very beginning and although I do not have indisputable numbers to share here there is one thing I can tell for sure the average timeout has increased quite a lot since the early days and currently is satisfactory to the extend that any application with reasonable hits, can expect to almost always be served from a hot instance.

CPU and latency of a bare bones application.

I have done some research today regarding App Engine's response time cpu usage etc.
I got some conclusions but need more verification before posting those here but between some tests I decided to check what is the minimum cpu time usage when starting cold, so I creating a brand new application I uploaded a plain "Hello World application, with a bare minimum configuration.

Just a single yaml handler and a print statement for output no import whatsoever.

I was amassed to see in in the logs that a cold start would cost around 100 cpu_ms or more with successive requests consuming around 10 cpu_ms and request time latency of more than 100 ms in the hot start.

So if we have a proper application with cpu consuption and latencey close enough to above values we are doing wanders.

One more remark on the aftermath of these tests today, do not forget to include a favicon to the handler since most of the browsers will request for it any way and the cost of this request and the denial is probably greater than provide one in the first place.
And ... here are the real logs where you can see a Cold % Start and successive Hot Starts :
    1. 08-16 10:37AM 50.074 /Hot%20Start 200 8ms 8cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/ Safari/532.0,gzip(gfe)
    1. 08-16 10:37AM 48.149 /favicon.ico 200 11ms 14cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/ Safari/532.0,gzip(gfe)
    1. 08-16 10:37AM 47.616 /Hot%20Start 200 37ms 55cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/ Safari/532.0,gzip(gfe)
    1. 08-16 10:37AM 37.885 /favicon.ico 200 24ms 16cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/ Safari/532.0,gzip(gfe)
    1. 08-16 10:37AM 37.340 /Cold%20Start 200 229ms 168cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/ Safari/532.0,gzip(gfe)
    1. 08-16 09:27AM 29.460 /favicon.ico 200 7ms 6cpu_ms 0kb Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/ Safari/532.0,gzip(gfe)

Google Application Engine

Well... after more than a year that I spent some of my free time doing development on the cloud mostly with Google Application Engine, I decided to start this blog as a means of keeping some notes of the whole process.
Hoping this will be valuable to me and any others working in this field.
Probably I am starting this a little too late, but then again "never is too late never is too far" since I do believe the "cloud" is here to stay.