Archive for the ‘Google’ tag
How To Try Gmail For iPad From Your Mac or PC
Read about Gmail’s version for the iPad? Curious to try it yourself? Don’t have an iPad? No worries.
All you need to do is to change the user-agent string of your browser to be the same as the iPad Safari:
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10
I’ve done it with Safari on my Mac with the developers tools enabled (after enabling the developers tools, go to Develop->User Agent menu and pick other). If you have other browser/OS, just google “[your browser] change user agent string”, pick the best result and follow the instructions.
Once you done with changing the user agent string, surf to gmail.com and enjoy. The iPad UI is less useful on a non touch screen, but it’s interesting to play with and see Gmail in two columns.
Obviously, this trick will work with most (all?) other iPad web apps.
App Engine: Mapping Entities Using Deferred Tasks
I recently started using deferred tasks in my App Engine application. I’m using them mainly for two things:
- splitting user requests into two pieces – one that being done immediately and one that being done in the background, to speed up the response time.
- mapping (iterating over) all my entities to calculate various statistics.
I won’t provide here details on how to use deferred tasks, because this is described in detail in a great article by Nick Johnson, which I highly recommend reading. One thing I do want to share from my experience, is my implementation of the Mapper base class:
This implementation is taken from Nick’s article mentioned above, but I made some changes to it. The first change is giving subclasses the ability to set the property to order the entities by. I needed this, because I found out that when your entities have custom key names ordering by key breaks for some reason.
The other change is re-factoring the way the next batch starts. It seems to me that in the sample provided in the article there’s an error in the indentation, resulting in the code not doing batching properly and can even break in some situations. In my version every task run maps only one batch (or less). This is sub optimal in terms of # of tasks it takes to map all your entities, but as long as you don’t have really a lot of entities this is not such an issue.
I really would love to hear others’ comments no my changes and about how you use deferred tasks or map your entities.
Arik
Gravatars to Google Contacts Importer
I really like avatars and therefore I’m a big fan of Gravatar. When Google first released their Contacts API, the first thing I though of was creating a small application to sync my friend’s Gravatars to my Google Contacts addressbook. The problem was that the first version of the API didn’t have an option to manage the photos of the contacts. Few months later, Google updated the API to include the option to update the contact’s photos. I played a bit with the new API, but never had the time to write the appliaction.
Yesterday (October 11 2008), the guys from Automattic/Gravatar wrote a post the summarizes their last year. This reminded me of this small project that I always wanted to code. I’ve decidced to code a first release of the application and put the code on Google Code for other to contribute.
I’v decided to make it a .NET application and not a Python script, to address more people (I guess that more people are comfortable with running application than Python scripts). The reason that this isn’t a webapp, is because it takes a whole lot of time to process each contact list. If there was an option to question the Gravatar API for existence of a Gravatar for each email, it would make everything a bit quicker.
It’s .NET 2.0, so I guess there shouldn’t be a problem to run it on Linux using Mono, although I didn’t try that. The code is very simple, so if someone wants to translate it to other languages it’s possible and shouldn’t take too much time.
This is an alpha version, therefore don’t be scared if a nasty exception jumps at you
There are a lot of things to imporve, like adding threads to speed up things, time left counter and more. When I will have some more free time, I might add all this.
This is my first opensource project and your comments are mostly appreciated.
Arik
The Benefits of Using Amazon EC2
Amazon Elastic Compute Cloud, also known as “EC2″, allows scalable deployment of applications.[1] Current users are able to create, launch and terminate server instances on demand, hence the term “elastic”.(Wikipedia)
I believe that the Amazon Web Services (and especially EC2) are one of the most influencing technologies that shape the future of the web. While for me it’s pretty obvious what is the benefits of such a service, it sometimes difficult to explain to others. Yesterday, I stumbled over the most convincing example of them all.
Enter Animoto. Animoto is a cool web application that you feed it with your photos and it creates you a video of it (see example above). The geeks among you readers, know that rendering video can be CPU consuming. So how they do that? Using Amazon EC2, of course.
During last week Animoto userbase grew from 25,000 users on Monday to 250,000 users on Thursday (!). But the graph the you see above isn’t the graph of their user count, it’s the graph of the EC2 instances they used to handle that traffic. They started the week with 50 EC2 instances, grew to 100, 900 and eventually 3400 instances of EC2. Later on when the demand lowered, you can see the the count lowered to something like 1200 EC2 instances.
Now imagine if they have been using regular servers. Just thinking of the meaning of managing all this amount of hardware, of storing it, DRP plans, etc.. gives me the creeps!
This example shows perfectly the benefits of EC2 in particular and cloud computing in general:
- Pay as you go – you need 50 servers today? No problem. You need 3000 tomorrow? That’s no problem either. And the day after tomorrow you want only 1000? Just do what ever you want. No need to plan ahead of how much computing power you will need, just build the infrastructure that can grow.
- No system management overhead – I guess that most of the EC2 instances used by Animoto are servers that do the video rendering. So when the usage grows that just duplicate the same server image they already have. When one of them stuck or fails, they just shut it down and start a new one. No need to have people maintaining huge server sites, buying hardware and stuff. Simple example for such an architecture using EC2 is explained in this article.
- Simple! Everything is API based, and you’re not the first one to use it, so there plenty of implementions of scalable architectures over EC2 .
- DRP? In a few mouse clicks (or automatically using a watchdog script that monitors their health dashboard) you can turn on a new instance at the European data center, and forward all you traffic from the US one there. More DRP than that?
I’m a total believer in cloud computing. I was really happy to see that Google entered the game, and I hope that other major players will join too (Microsoft, what are you waiting for?).
Arik
Google Apps Engine isn’t Amazon Web Services
For those of you who don’t know who Guido is, he’s the creator of Python and now works for Google. Recently he moved to the Google Apps Engine team. If you want a quick introduction to Google Apps Engine, just read this blog post and then watch the following two videos: (the first one shows creation of a sample application and the other one is Guido’s recap of Google Apps Engine):
Currently the Google Apps Engine is in a preview beta, and to the moment of writing this post, there’re no more inventions left. If you still want to experience the Google Apps Engine, you can download the SDK. Currently they support only Python, but they plan to support more languages as the product will mature. It really makes me curious to see what will be next language that they will support.
One important thing to understand is that Apps Engine isn’t Amazon Web Services. They both offer virtualization services, but in a different style:
Will it replace Amazon? It sure doesn’t look like it from where I sit. In fact, I don’t see this as much of a competitor to Amazon Web Services. There’s some overlap in some small area (hosted web apps on EC2), but I doubt that’s the bulk of Amazon’s business. As I said, we’ll likely end up using both (and other providers as they come along, too).
In my opinion, in current stage, Google Apps Engine is aimed at and more suitable for the most standard web applications. What’s not a standard web application? YouTube for instance – because it requires not only serving loads of pages (data), but also some computation (like converting video formats).
One things is sure – now that there’s competition to AWS, it will make things much more interesting.
Arik
A look into the new Android SDK
After seeing all this videos of prototype Android devices from 3GSM at Barcelona, it’s time for some more good news – as I reported earlier on twitter, Google has finally released the new Android SDK. As Dan Morill mentioned on the Code Day, the new SDK introduces a new UI (although Google promised that it still work in progress), new Eclipse plugin and some very interesting API changes -
- New user interface – As I mentioned when we introduced the m3 version of the Android SDK, we’re continuing to refine the UI that’s available for Android. m5-rc14 replaces the previous placeholder with a new UI, but as before, work on it is still in-progress.
- Layout animations – Developers can now create layout animations for their applications using the capabilities introduced in the android.view.animation package. Check out the LayoutAnimation*.java files in the APIDemos sample code for examples of how this works.
- Geo-coding – android.location.Geocoder enables developers to forward and reverse geo-code (i.e. translate an address into a coordinate and vice-versa), and also search for businesses.
- New media codecs – The MediaPlayer class has added support for the OGG Vorbis, MIDI, XMF, iMelody, RTTL/RTX, and OTA audio file formats.
- Updated Eclipse plug-in – A new version of ADT is available and provides improvements to the Android developer experience. In particular, check out the new Android Manifest editor.
As for the UI change, you can watch the following videos (origin) from 3GSM Barcelona :
You can see a more complete list of the major changes here (you can also find a complete difference report here). So what are you waiting for? Go upgrade
Updates from Android Code Day
It seems the Twitter is back online, so I’ve started updating there.
Soon I will upload the photos to Flickr.
Update 15:15: Caught a talk with Ouriel Ohayon (Ouriel is live blogging the event on Techcrunch.fr and on Twitter).
Update 15:40: I’m keeping updating from time to time on Twitter, and uploaded some photos to Flickr.
Update 15:50: Ouriel mentions on his blog, that the Android is going to be much more influencing than the iPhone. I guess he’s right. And now I’m happy that I didn’t buy an iPhone
Update 16:33: Dan Morrill is doing a code demo. For me, after watching his video demo, it’s a bit boring… Although from a quick survey Dan conducted earlier, it seems that most of the audience didn’t watch the video demos or even downloaded the SDK.
Update 17:20: Caught a talk with Dan Morrill. I had some really good questions, so he wrote them down and I hope to see updates from Google soon.
Update: I’m back home. At the weekend I will post a summary and my thoughts on Android. Hope you enjoyed the coverage
Arik
Android Code Day @ Tel Aviv
Thanks to a tip at SMO.co.il blog, I found out that Google conducting a day long introduction for their Android cellular phone operating system – the Android Code Day. This event takes place today in London, UK and here in Israel. Also on the 23 February they’re having a similar day in Boston, Massachusetts.
I’m attending the event here in Tel Aviv, if Twitter servers start responding I will tweet the event from time to time (you can follow me here). I’m bringing my camera, and will post the photos under “Android Code Day” tag on Flickr.
Hope to learn new cool stuff,
Arik
