A Simple index.yaml File
Sending Mail With Golang
Writing To The Blobstore Using The Files API
TaskTooLargeError
Google App Engine has an upper limit on how much data you can put into a task – a maximum of 100 KB. This includes everything within an individual task such as parameters, payload, the request URL, etc.
To get around this error, store any large pieces of information within an entity in the datastore. You can then pass the entity’s ID as a task parameter and pull out the entity’s data during task processing.
Geolocation With App Engine
One of the best parts of hosting with App Engine is the free geolocation service it provides. Every incoming request has special AppEngine location headers added to it.
For instance, here’s how to find out the user’s city (req is the servlet’s HttpServletRequest object):
String city = req.getHeader("X-AppEngine-City");
Other geolocation information is available as well: the user’s country (X-AppEngine-Country), the region of that country (X-AppEngine-Region), and the nearest city’s latitude and longitude (X-AppEngine-CityLatLong).
Mapping Favicon.ico In A Golang Application
Sending Mail With The Java Low Level API
Google Compute Engine
Google’s Compute Engine just released into General Availability, and I’ve been testing it out the last couple of days.
The one thing that blows me away is how reliably fast even the low-end instances are. I provisioned and set up a f1-micro instance – it runs great and quite consistently. That’s in sharp contrast to Amazon’s micro instance which is limited to “bursty” processing; there are spikes where processing goes quickly, then the CPU gets throttled and the instance grinds to a near-halt.
I’m considering building a mail app on top of GCE – so far, everything looks great. GCE even allows inbound SMTP connections (although unfortunately no outbound SMTP connections).
Configuring Nameservers For .IO Domains
I recently purchased a .IO domain name from nic.io, and immediately set about configuring it for Google App Engine. I was surprised to find out that nic.io doesn’t provide customizable DNS – you can’t set CNAMES, TXT or MX records. The only options provided are to set your own nameservers, or forward the domain to another web site.
Fortunately I have a spare GoDaddy account, and they offer free DNS services even for domains not hosted with them. Here’s how I configured nameservers for my .IO domain:
First, go to DNS Manager:
Select Off-site > Add Off-site:
Type in your .IO domain:
Copy the provided nameservers to your clipboard, and press finish:
Paste the nameservers into the nic.io administration page:
Wait 24 hours for the changes to propagate, and you’re done!