Skip to main content

Posts

Showing posts from November, 2010

Use E-Tags and Cache-Control: Caching your Dynamic web Content Better

This site rendered js and css (now even images) dynamically. Contents of files are stored in Google BigTable Datastore and are served by a DynServlet. The DynServlet maps the name of the file to content of the file in DB. This was slowly using up a lot of resources. Adding a layer of memcache, saved some Datastore API calls. But the memcache calls were still significant. So an ETag mechanism is introduced.

A Global ETag is generated on any file posted or updated, and (G-ETag is) stored in Datastore. To save App Engine resources (which are counted to cost), the ETag header is obtained from each request checked with GDTS from backend. If it is the same a "304 – Not Modified" response is sent back, asking the client to use the local cache copy. If it is not exactly same, a the request is passed through and rendered dynamically. This guarantees all content will be served fresh after every deployment. Requests in between deployments may be served from client-side cache, because t…

Ubuntu - Wayland - Excitement after all

Mark Shuttleworth recently announced that Ubuntu will do away with GNOME, The good old, desktop environment – as the default. Making Unity, (which is the current default for netbook version) THE default. The switch was barely absorbed by ubunters and is now followed by another announcement of replacing the X.org server with a newer, minimalist X server - Wayland. Wayland is still in alpha. So, for the pessimists this announcement and the switch is a little cavalier. For the optimists, this is a huge step towards a better GUI.
To put simply, Wayland is different from X.org in that it (Wayland) leverages the newer kernel's ability to do much of the work X.org's complex layers do. It natively uses 2D and 3D support from OpenGL.Technically – Quoting Wikipedia
Wayland uses existing technologies in the Linux kernel such as the Direct Rendering Manager (DRM), kernel mode-setting (KMS) and the Graphics Execution Manager (GEM) batchbuffer in order to provide a minimal display server
Wayl…

Paperbecause - Compelling point or Absurd argument?

The site paperbecause.com, is from domat, a paper manufacturer, promoting the use of paper. For one consideration, they claim paper is physical and associates it with a emotions, features and relatively subtle nuances that cannot be attributed to electronic media counterparts.Tree Huggers, Green advocates, on the contrary, try to reduce the use of paper. Reduce, Reuse and Recycle. For once, however, the use case of paper seemed to be apt. It is true that opening a paper card is much more thrilling than opening an e-card. Paper well hold well for physical and free-expressive mode of holding thoughts or expression. They press on the idea of how paper makes it easy to annotate, carry around with you – campaigning against campaigns like "Don't Print this". They also claim, paper ads make a better marketing tool than emails or online campaigns. This is a little far-fetched argument, if not absurd. Google would not have made so much money if not for online campaigns and ads. I…

500 errors on Google appengine / SarathOnline

Java on Google appengine has always been an matter of concern, especially with low traffic. People have expressed their anxiety with their application's performance. This site/blog runs on blogger. However the images and JavaScript are dynamically served from Google's Big table. This site was earlier on Google appengine  - Py. A much performant environment. It has its owns issues. However, relatively it was a more worry free environment for small applications. But as an enterprise language, java was to be used for this site. The migration was finally done after three unsuccessful attempts. And eventually, with an extremely slim home grown framework – smvc, a simple mvc with dependency injection, the site is run on java. Initially there were resource intensive cold startups. The smvc framework was an answer to it. But lately it appears that the appengine java is plaguing the site with a bunch of 500 errors, more frequently. This behavior started around Oct 27 and persists till …