Social Saga
Social Games and other information

We tried ‘Poké Radar’, the app for ‘Pokémon Go’ July 24, 2016

I am about to make this special day a pokeaventura. Today I will not waste time. I can not afford to walk around this city in the middle of heat wave, with 105,8ºF, over my head, with no results. I want to catch Pikachu once and for all and I will do it, but this time I will need help … No. There is Ash Ketchum of Pallet Town to guide me, but I have something that could be better: Poké Radar, the app in the App Store and will soon be available for Android.

poke radar

Poké Radar is like some kind of treasure map for Pokemon Go. The application is described in the App Store as an assistant to find pokémons other users may have found and marked on this app just for you. Because the world of pokémons coaches is all good, we help each other and try to fight together against Team Rocket.

I am about to start my adventure. At last I’ll catch them all! The app allows me to filter by pokémons either by distance or by name. Of course I look for Pikachu and starts the action.

At first, when I accepted geolocation permissions, I came all pokémons allegedly were around me. Then when I picked Pikachu, I appeared all yellow electric type pokémons they desired … I be able to catch them all? They were not very close, but there were many, so I began my search. The sun was leaving the stones … but I really wanted to find Pikachu.

Search for Pikachu in Pokémon with Poké Radar Go
Poké Radar allows you to select the Pikachu you want to search, or do you need pokémon. I did, I chose the closest and the app opened me some options that told me who had reported that pokémon at that site, if it had been seen day or night, and even sent me to Apple Maps to see the exact address .

Anyway … I looked for Pikachu in every recondite point coordinates app, but never found it. My next step was to use an incense to try to find him, but never happened. Pikachu never came to me … the common areas of the building looked so sad and lonely without the yellow pokémon appear anywhere.

I tried twice because the third time lucky. But Pikachu never made an appearance. Neither I found the pokémons the app said they were close. Then I searched the Web site, and found that developers warned that some users placed red herrings. A total disaster and frustration. Ultimately Pikachu never appeared, even with incense. Catch Pikachu with Pokemon go hack.

The Android app is in development, although users can place the Web version as enabling the GPS app permission.

I, for my part, I’m still looking for Pikachu. If someone finds can you leave me here location? Has anyone had more luck? SOS.

Until next pokéaventura, goodbye to you a sore coach.

No Comments on We tried ‘Poké Radar’, the app for ‘Pokémon Go’
Categories: Reviews

AppEngine ups and downs November 2, 2015

So i recently started using appengine, it should be noted i’m VERY new to it. I come from django background so this is mostly the comparison between the two.

Let’s start with the classic argument, price! A lot of people compare EC2 and GAE (Google AppEngine) prices, they are not really comparable. EC2 provides you easily spawnable machines, as many as you need, leaving the scalability to you. It means your programmers have to worry about shredding the database, your sys admins about adding more web nodes… On the GAE side you just write code, effectively outsourcing both the hardware and sys admin to Google. The advantage EC2 has is that you can use any technology under the sun, with GAE you are forced to use their platform. Does it in pure money pay off to use GAE? No idea :) , but if you get big you can iterate faster becouse you don’t have to worry about scaling (which can be a major competitive advantage). To be honest most of the sites out there don’t need anything more than what can be easily scaled.

The schema-less development is definitely one of technical things i like about GAE. South is cool, but not having to care at all about the schema is just a major pain relief.

$ appcfg.py -e redduck666@gmail.com update .
Scanning files on local disk.
Scanned 500 files.
Scanned 1000 files.
Initiating update.
Password for redduck666@gmail.com: 
Cloning 154 static files.
Cloned 100 files.
Cloning 224 application files.
Cloned 100 files.
Cloned 200 files.
Uploading 2 files.
Deploying new version.
Checking if new version is ready to serve.
Will check again in 1 seconds.
Checking if new version is ready to serve.
Will check again in 2 seconds.
Checking if new version is ready to serve.
Closing update: new version is ready to start serving.
Uploading index definitions.
Uploading cron entries.

Next thing i like very much is the deployment, you type a command poof it works. It has its downsides as well tho, unlike say svn, it is not capable of remembering the credentials. Next problem is that it deploys only as the app specified in config file, making it more difficult to do a test deploy first (this is just a minor annoyance).


Like you can see above, if it’s good, it’s really really good, likewise when it is bad, it is really really bad.

In [1]: from myapp.models import User
In [2]: User.all().count()
....
BadArgumentError: _app must not be empty.

Hello? I just want to do a simple ORM query? As it turns out i’m not the only one to have this problem, i copy/pasted stuff i found on the internets and execute it at the shell startup (’redduck666′ is the name of my app):

from google.appengine.api import apiproxy_stub_map, urlfetch_stub
from google.appengine.api import datastore_file_stub, mail_stub, user_service_stub
import os
os.environ['APPLICATION_ID'] = 'redduck666'
 
apiproxy_stub_map.apiproxy = apiproxy_stub_map.APIProxyStubMap()
apiproxy_stub_map.apiproxy.RegisterStub('urlfetch',
    urlfetch_stub.URLFetchServiceStub()) 
apiproxy_stub_map.apiproxy.RegisterStub('user',
    user_service_stub.UserServiceStub())
apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3',
    datastore_file_stub.DatastoreFileStub('redduck666', '/dev/null', '/dev/null'))
apiproxy_stub_map.apiproxy.RegisterStub('mail', mail_stub.MailServiceStub())

As far as users go, as long as your idea of “user” == “user with google account” you are gonna be happiest person around. GAE handles for you the authentication against google account and makes sure the site is usable even in development environment. What happens if you want to add twitter connect or facebook connect? Well, SOL (Shit Outta Luck), they haven’t bothered to abstract the User model so you are left with dealing with low level stuff (like cookies). Compare that to django, where you have to authorize the user once and it does everything else for you (albeit keeping a user in SQL table).

Another reason against GAE is lack of reusable stuff out there, django has much more vibrant community creating all kinds of reusable stuff. As a matter of fact i had to port django facebook connect stuff to work under GAE.

No Comments on AppEngine ups and downs
Categories: Coding

Automated scalability

My daemon takes the desired response time in milliseconds as input and scales the infrastructure accordingly. When it sees increased traffic it adds more nodes which are then shut off when they are no longer necessary. The infrastructure is based on Rackcloud, Cassandra, uwsgi and nginx.

Does it work? The end result was:

Requests per second:    823.20 [#/sec] (mean)
...

  50%    186
  66%    471
  75%    516
  80%    525
  90%    976
  95%   1108
  98%   1394
  99%   1767
 100%   1767 (longest request)

SHAMELESS PLUG: I’m a freelance developer & sys admin, drop me a line if interested in my services.

For benchmarking i’ve used my blog. It had 10000 blog posts in it, the biggest part of which was 1500 bytes of lorem ipsum text. The benchmark was performed on from within Rackcloud and consisted of displaying the index page of the blog, so last 10 blog posts. The blog engine runs on pylons web framework and uses Tragedy data mapper.

In front of entire setup there is nginx, it is load balancing the requests to uwsgi nodes. A useful feature here is that it will re-proxy the request in case one node goes down.

At its very core this setup is asd.py (automatic scalability daemon) which is scaling the infrastructure based on current needs, code here. The current needs are defined as average responsiveness of your site. It works on top of nginx, it dynamically modifies the “upstream” in nginx when it takes the node up or down. My choice was to deploy with uwsgi, i could easily replace that with FCGI or even reverse proxy to some other web server

The individual spawned nodes have uwsgi and Cassnadra on them, uwsgi at this point just serves the requests handed to it by nginx. The heavy lifting is done by Cassandra, which has to make sure your data is (eventually) consistent. Setting up the cluster was a breeze, my favorite feature is some kind of query caching. If it has to go to network to get the result to network it may write it locally as well. This is most obvious when performing a first benchmark against freshly spawned cluster, the results will be much worse than in the second one.

A problem that i had is that Cassandra cluster to function requires an ip in the config file. Since i’m spawning the instances on the fly i don’t know their ip in advance, so i made an ugly hack to fix the matter. The /etc/rc.local now has:

?
1
2
3
ip=`ifconfig | sed -n '/eth1/ { N; /dr:/{;s/.*dr://;s/ .*//;p;} }'`
sed -i "s@<listenaddress.*@><listenaddress>$ip</listenaddress>@" /etc/cassandra/storage-conf.xml
</listenaddress.*@>

Thing worth noting is responsiveness to changes, it spawns new nodes in cloud, process that takes minutes. Given how fast one gains web traffic this shouldn’t be a problem in real world.

Cloud APIs give anyone the power of hardware control to our fingertips. The images are both powerful and nice to work with, opening whole new world of possibilities. For example release could change from “deploy new code to node” to “deploy new node with new code” while guaranteeing language independent full reversibility.

No Comments on Automated scalability
Categories: Coding

Android VS iPhone

Some weeks ago after my iPhone grew couple of more dead pixels an offer for a fancy new EVO 4G has landed in my inbox. So my journey in the Android world began.

First let’s have a look at the sizes of various hardware features. EVO 4G has bigger screen, louder speakers, more pixels in the camera & an extra camera as a cherry on top. Bigger is better. Period.

A huge advantage for me was multi tasking, no more choosing between listening to pandora and twittering! But for months now it is known that iPhone is also getting this, so no heavy points here. Heavy points go for customization tho, on the first page of my phone i have full controls for Pandora, google search (searches phone for apps as well) and a handful of apps. In other words thanks to mainly widgets, android can have “workspaces” on your phone, rather than “app launcher containers” of iPhone.

On the dark side i had a lot more WTF moments, first time i lunched “Spark” app my phone wouldn’t stop vibrating, not even after exiting the app. I ended up restarting the phone. Pandora & Flash have the tendency to crash every couple of days. The apps seem to lag behind considerably as well, the games that i tried out engaged me less than iPhone ones. One app had on the splash screen written something about using the buttons, i couldn’t figure out how to use it, another one told me it is not supported on my handset.

So overall, which one is better? It all depends on your needs bla bla bla bla… Let me ask you this question, which one allows you to turn the bellow picture in your temp office (HotSpot app!)?

No Comments on Android VS iPhone
Categories: Reviews