Today we are having a real life test of our online high scores system because iCombat game version 1.2 got approved by Apple and there has been a flow of users populating the DB with their scores since then.
And suddenly it has stopped working - the online table wouldn’t show and as a result I had to learn a bit more about OAuth system we are using for the authentication purposes.
Following the advice of Sandeep, my colleague, CEO to Indianic, I have moved all our corporate e-mails to Google Apps.
This is wonderful!
Every member of the team gets 7Gb of e-mail space, all the great Gmail functionality + you can set it up so you still use your domain name (injoit.com in our case). No problem of losing any single e-mail of your clients anymore, no spam, easy access through POP3 or webmail.
Morevover, members of your team can use all the great Google features such as Calendar, Contacts, Sites, Docs, Chat and there is a great permissions management service so you can actually choose between storing data privately, sharing it with your team or making it public.
This is just great bunch of solutions from Google coming for free so thanks very much for them as they will help to do our business more effeciently.
In case you would also like to set up an account, start here:
http://www.google.com/a/cpanel/domain/new?hl=en
Our client Miguel just showed me what looks like real-time Basecamp - a project management / repository tool where you see in real time how project documents, sources etc get added and how people do things and chat.
Check it here: http://drop.io/
I was reading stackoverflow and found one great idea on making client-server based high scores system for your iPhone games so as this is something we would need to develop soon, I’m posting it here so not to forget and I’ll update this post when we come up with our own solution. Actually I had a similar idea but benzado has formulated it nicely so here it is:
One idea that might be Good Enough:
- Let Secret1, Secret2, Secret3 be any random strings.
- Let DeviceID be the iPhone’s unique device ID.
- Let Hash(Foo + Bar) mean I concatenate Foo and Bar and then compute a hash.
Then:
- The first time the app talks to the server, it makes a request for a DevicePassword. iPhone sends: DeviceID, Hash(DeviceID + Secret1)
- The server uses Secret1 to verify the request came from the app. If so, it generates a DevicePassword and saves the association between DeviceID and DevicePassword on the server.
- The server replies: DevicePassword, Hash(DevicePassword + Secret2)
- The app uses Secret2 to verify that the password came from the server. If so, it saves it.
- To submit a score, iPhone sends: DeviceID, Score, Hash(Score + DevicePassword + Secret3)
- The server verifies using Secret3 and the DevicePassword.
The advantage of the DevicePassword is that each device effectively has a unique secret, and if I didn’t know that it would make it harder to determine the secret by packet sniffing the submitted scores.
Also, in normal cases the app should only request a DevicePassword once per install, so you could easily identify suspicious requests for a DevicePassword or simply limit it to once per day.
Disclaimer: This solution is off the top of my head, so I can’t guarantee there isn’t a major flaw in this scheme.
Written by benzado
Currently, I’m trying to figure out the best way to make online highscores system for our clients without having to invent the bicycle. It seems however there is no great solution yet. I was looking into OpenID but the evidence that at the moment it doesn’t allow easy automated identification using the iPhone’s deviceId feature:
http://factoryjoe.com/blog/2008/01/13/the-openid-mobile-experience/
http://openid.net/pipermail/specs/2009-January/002688.html
so likely we will come up with our own solution something like Benzado mentioned above
ПЕСНЬ МЕДВЕДА
однажды в студеную зимнюю пору,
я вышел из леса,
был сильный мороз.
дорога лежала моя к точприбору
инжоит совсем без меня бы замерз
Karina
====
MEDVED SONG
at winter once I came from forest
it was a very heavy frost
my way was laying to our office
without me - Injoit lost
translated into English by Taras
powered with Alexander S. Poushkine’s rhymes

Ah yes, I Googled for “outsource iphone” without the quotes, and your website was the 3rd result
![]()
- Tor Martin Kristiansen, one of our customers
As it was announced in our blog earlier, our team was going to participate in Google Developers Day in Moscow. So we did.
Here I wish to say thanks to Alexei Shelestenko, from Google Russia, for making an exception for us allowing more than 2 people to come. It was really important that we don’t share out train coupe with some non-geek people :)) Seriously, imagine Russian customs officers entering seeing 4 silent guys with laptops coding something. Their facial expression. Priceless.
Click “More” to check our photos and read more about the event.
Wordpress might be heavy for your web server as it works a lot with MySQL database and has tons of scripts and plugins that run along.
This as simple script, add it to the footer.php of your Wordpress theme and you will get a line in the bottom with your SQL queries and generation time.
You may start to think of next steps if this values are not acceptable. What you could do, to start with, is:
1) get rid of unused and unnecessary plugins
2) install WP Cache or WP Super Cache plugins
3) add automated MySQL tables optimize script to your cron jobs
4) check your server configuration (php.ini, mysqld.conf) to find if the memory allocation and other settings are optimal
5) upgrade your server
Number 3 stays without attention very often however this is important. MySQL doesn’t optimize itself unlike Oracle. In a while, your DB, depending on its size and usage characteristics, gets fragmented making mysqld process to eat all your server resources. As result, your Wordpress powered website starts working really slowly. At Injoit.com we resolve this by installing additional mysql optimize script to the websites of our customers. Added to cron this script launched daily or weekly and does the job perfectly.