Successfully Avoiding Re-platforming Onto Google App Engine (for time)
by Mike Levin SEO & Datamaster, 10/08/2013
I made a great breakthrough yesterday in my way towards programming Google Glass intelligently, and in great control of what I’m doing. I started out copying-and-pasting (doing a github clone) of the Google Glass quickstart example on the Google App Engine (GAE). Well, that’s a joke. If you’re not already of the GAE-brethren, not a heck of a lot of what’s going on is going to make sense to you. There’s a strong-arm play for getting platform buy-in by throwing you into the deep end of the pool here.
Layer the new virtual machine, deployment environment experience onto that dealing with OAuth 2 for the first time, and you are reliant out of necessity on vendor-provided client libraries - all of which conveniently come with that GAE quickstart example of using the Mirror API in all of its usual ways. And you can only really pick apart and make sense of this example if you already know the GAE. So, step 1 becomes either finding someone who already knows the GAE, or spend weeks getting familiar with it, and start eating the dog food, right?
Well, not quite correct. For those with the arcane skills of deductive reasoning, observation, making inquiries and following trails, it is quite possible to circumnavigate the giant GAE antlion death trap that lies in the middle. And this journal entry marks the beginning of my navigating this experience, and frankly, test of my personal capabilities, while elevating myself functionally, ability-to-discuss-wise and reputation-wise to a new level. Times like this always feel like crisis, but all they are is a recalibrating to the new environment. I got out of the field of SEO about a year ago, and dived headfirst into rapid prototyping - but some of that rapid prototyping calls for a nearly complete replatforming, and groking of the new platform, before you can be productive.
I have to deliver something by next Tuesday. It’s already Tuesday this week, so that’s one week to deliver. And I have a nearly-3 year old at home, and a family I love that I rush home to as soon as I can every day. My father-in-law is being honored as the only civilian man of the year by the Latino association within the NYPD today at 5:00, so I probably have to leave by 4:00 PM today, and it’s coming up on 11:00 AM. Wow, the writing I can do in just 7 minutes when I have a lot to talk about! Okay, this is the kind of journal entry that rocks. No one will hold good idea processing time against you.
This is my secret weapon, and my curse. I have to make it work for me, is all. To avoid that GAE antlion, what I do is reproduce everything required to program Glass onto Levinux. Even if it needs a real server (not a desktop virtual machine, as Levinux is), then I have the server-building formula laid out for easy reproducibility. I would be making apt-get calls instead of tce-load calls. But otherwise, I have great scalability as an attribute of the Levinux server-building recipe system. And the Python-based pip commands will be identical! It is probably wise for me to be tackling the Glass problem by escaping the gravity-well of GAE. Or rather, sending a probe into the GAE while I stay in orbit, studying its effect and reproducing its behavior in an environment that’s much less roped-in.
The point I got up to yesterday was my Levinux instance literally being able to be built into a very GAE-like virtual environment with mere menu-choices. I revised Levinux up to version Beta 2.1 in this move, by which you can first run Levinux, then Get Python, then Get Libraries, and choose both option #1 and then #2 to get the webapp2 Python WSGI environment (think of it as like Apache or IIS but built-into Python) and the Google API Python Client libraries - which are things to spare you some grisly programming when utilizing all the many services that Google has courteously put at your disposal. Daily usage quota’s exist on a per-API basis, so authenticated login for accountability and billing purposes are rigorously enforced. We saw this play out in a major way with the Google Maps pricing adjustment and accompanying exodus from Google Maps - but it’s playing out in a much less dramatic way in other Google services that don’t attract API-leaches quite so intensely as Maps.
Bottom line is that the ability to do actual OAuth 2.0 login is a deal breaker to even being able to do anything with Google Glass. And I cannot emphasize enough what a trap that is in pulling you into the bizarro world of the Google App Engine. That is where the actual coding-work for today picks up. This has been the thought-work to give me the focus, motivation, and purpose I need to make today both interesting and productive.
I have to be ready for a code-jamming session that happens tomorrow. I have to go from second minor breakthrough (first being installing the Quickstart guide on the GAE, and second being a successful OAuth 2 manually copied-and-pasted redirect URL on Levinux), I have to raise myself to force-of-nature. When you understand things down to very deep abstraction levels, while simultaneously having minimizing the levels you have to traverse, then I find this force-of-nature state being easy and natural to achieve.
Just let them watch me work a little bit on vim. Oh, and that reminds me. Whatever I do with Levinux should be pretty easily and quickly reproducible on the Rackspace servers where I host Tiger, in case the back-and-forth communication between Glass, the Mirror API and my servers needs to occur - specifically the Glass API talking to the virtual-machine can’t really happen unless my virtual machine is making the request, and the Mirror’s data is on the reply. In other words, a Levinux virtual machine can’t easily be a reachable server, except by you on your desktop (hint: which is exactly what’s needed to get OAuth 2 login to occur).