Showing posts with label app engine. Show all posts
Showing posts with label app engine. Show all posts

Thursday, September 22, 2011

Fall 2011 App Engine events

Buenos días desde Buenos Aires!! Wow, we are just blazing through the summer! We had an exciting Google I/O in May where we saw the launch of the Go runtime, introduction of the Backends feature, and confirmed Google's commitment to the platform with our plans to leave preview mode, not to mention the five releases since that time. We then hit the road this summer with team members appearing around the globe, including mega events like the Cloud Computing Expo, EuroPython, and OSCON.

At Google I/O, many App Engine team members gave in-depth technical sessions. Alfred Fuller, an App Engine Datastore engineer, revealed how the High Replication datastore gives greater reliability and availability for users. Michael Handler, one of App Engine’s talented Site Reliability Engineers, discussed how App Engine works in production. At OSCON, the largest open source event in the world, yours truly gave a three-hour App Engine overview and workshop to help new users get up to speed, and earlier in the year at PyCon, described how Python users can avoid “vendor lock-in” via the Django-nonrel project by porting their applications from webapp to Django, allowing them to move on to or off of App Engine as they please with only minor configuration changes. We participate in events like these because we like to communicate with users to find out what they like & don’t like about the platform, and we often take their suggestions to heart!

This fall we have a full schedule, appearing at many developer events worldwide, including Google Developer Days and Google DevFests. At the Google events, we'll recap App Engine and those announcements we made at I/O, and you’ll learn how to build exciting applications using App Engine and other Google cloud technologies as well as how to build games in the cloud. Here are the dates, events, and locations that we will be visiting:

Fall 2011
Sep 19-20 - Google Developer Day Argentina - Buenos Aires - Wesley Chun, Chris Schalk
Sep 19-23 - Strata - New York - Chris Schalk
Sep 23-24 - PyCon Argentina - Junín - Wesley Chun
Sep 26-30 - Congresso Brasileiro de Software - São Paulo - Wesley Chun
Sep 29-Oct 1 - Python Brasil[7] - São Paulo - Wesley Chun
Oct 8-9 - Silicon Valley CodeCamp - Los Altos Hills - Wesley Chun
Oct 10 - Google Developer Day Russia - Moscow - Iein Valdez, Fred Sauer
Oct 18 - Google Developer Day Czech Republic - Prague - Iein Valdez, Fred Sauer
Oct 20 - Google DevFest France - Paris - Iein Valdez, Johan “Proppy“ Euphrosine
Nov 1 - Google Developer Day Japan - Tokyo - Takashi Matsuo, Johan “Proppy“ Euphrosine
Nov 8 - Google Developer Day Australia - Sydney - Chris Schalk, Johan “Proppy“ Euphrosine
Nov 12 - Google DevFest Singapore - Singapore - Chris Schalk, Wesley Chun
Nov 13 - Google Developer Day Israel - Tel-Aviv - Michael Manoochehri
Nov 16 - Google DevFest Indonesia - Jakarta - Chris Schalk, Wesley Chun
Nov 19 - Google Developer Day Germany - Berlin - Michael Manoochehri, Wesley Chun

If these aren't close enough to you, keep an eye out on this list as we'll add new events and locations as they are scheduled. A calendar with all of Google's developer events is also available. We look forward to meeting you soon!

Posted by Wesley Chun (@wescpy), Google cloud Developer Relations team

Monday, March 7, 2011

Implementing Workflows on App Engine with Fantasm

This post is another entry in our ongoing series of guest posts contributed by App Engine developers. Today we partner with Jason Collins and Shawn Rusaw of VendAsta Technologies who discuss their simplistic workflow management system for Python App Engine called Fantasm. Fantasm is very simple to start using but incredibly powerful. So powerful in fact, that they couldn't fit it into one blog post. So for more detail, see the Implementing Workflows on App Engine with Fantasm article in our documentation.

Most software systems of reasonable size need to implement workflows: a series of processing steps and decision points over an artifact, typically a document. You are likely using workflows even if you don't realize it; often processing is built up iteratively over time until you're left with a complex system with lots of subtleties. These systems can mysterious and difficult to manage or extend.

A formal workflow engine can offer help in these instances. It allows developers to break the steps and decision points into manageable and testable chunks, so that processing is predictable and measurable. Workflow engines can offer visibility into system operations and metrics around execution times and failure points. They provide retry mechanisms and allow tasks to be distributed among multiple computers.

We have developed Fantasm to be just such a workflow engine. Fantasm is a Python library that allows you to specify your tasks and steps between those tasks in a YAML configuration file. It uses a finite state machine model where the tasks are states and the steps are transitions. As a developer, you implement the code that executes inside of a state and are only responsible to return an event that is used to identify the appropriate transition to the next state. It is similar to the App Engine Pipeline API but is more simplistic and serves as a user-friendly introduction to the concept of workflows in App Engine apps.

Fantasm has become the central processing tool within our organization and we hope it can be of help to yours. For a more in-depth look at Fantasm (including examples!), please see the full Implementing Workflows on App Engine with Fantasm article in the App Engine documentation.

Posted by Wesley Chun, App Engine team

Wednesday, January 12, 2011

App Engine team appearances Winter 2011

The Google App Engine team has launched some significant features recently, including: High Replication Datastore, Channel API, Always On, Warm Up requests, longer 10-minute (vs. 30-second) limit for tasks, and increased API call sizes. We are excited about these features and think you will be too, so team members will be appearing at a variety of events around the world this Winter to talk about some of these features and the platform as a whole!

One of the marquee events this quarter includes PyCon, the largest gathering of Python developers from around the world, where several App Engine team members will be speaking:

Winter 2011 event appearances:

  • Jan 18 - ICT Meet Ethiopia 2011 - Addis Ababa - Richard Ngamita
  • Jan 22 - Google Hackathon (Year One Labs) - Montréal - Sean Lynch
  • Feb 1-3 - Strata - Santa Clara - Patrick Chanezon
  • Feb 14-16 - Jfokus - Stockholm - Patrick Chanezon
  • Feb 17-18 - Developer Summit - Tokyo - Takashi Matsuo
  • Feb 28-Mar 4 - Game Developers Conference - San Francisco - Ikai Lan, Alfred Fuller
  • Mar 7-10 - CloudConnect - Santa Clara - Chris Schalk
  • Mar 9-17 - PyCon - Atlanta - Guido van Rossum, Wesley Chun, Ikai Lan, Brett Slatkin, Alfred Fuller
  • Mar 11-15 - SXSW - Austin - Sean Lynch, Greg D'alesandre
  • Mar 28-31 - Int'l WWW Conference - Hyderabad - Patrick Chanezon, Rajdeep Dua

If these aren't close enough to you, keep an eye out on this list as we'll add new events as they materialize. There is also a separate calendar for events featuring other Google products/APIs. For App Engine, look for posts like this throughout the year. We look forward to meeting you in 2011!

Posted by Wesley Chun, Google App Engine team

Friday, October 22, 2010

Research Project: AppScale at University of California, Santa Barbara

The following post is a guest post by Chris Bunch, a Computer Science Ph.D. student at the University of California, Santa Barbara. He is one of the student leads on the AppScale project, an open source Google App Engine compatible hosting solution led by Professor Chandra Krintz. Chris has developed and maintained AppScale as a research project over the last two years with fellow student lead Navraj Chohan and others.

---------

Over here at the UCSB Racelab, we've complained endlessly about finding a web framework we actually could use. For a long time we thought we just wouldn't be able to find it - many were so-so or good but only after a substantial learning curve. So imagine our surprise back in April 2008 when we heard about what we thought would be just-another-web-framework provided by Google in the Python version of App Engine. But after giving it a try, we were smitten. We finally found a web framework that (1) we could actually use on non-trivial projects and (2) we could teach in nine-week classes without having students lose half the time with the idiosyncrasies of the programming language involved or the web framework itself. Furthermore, the minimalistic APIs make it simple to get work done: it did for us exactly what we needed and nothing else.

Yet as researchers and hackers-at-heart there was one thing that we really wanted to do with App Engine that we couldn't do: run it on a whole bunch of our machines and tinker with it. A similarly-minded hacker named Chris Anderson had released AppDrop, which was a modified version of the App Engine SDK that hooked up to PostgresSQL and run in Amazon EC2, but only ran over a single machine. So after much discussion, we came up with the following short list of things we wanted to do with App Engine:

  • We wanted to run it on our own virtual machines or those running in Eucalyptus or Amazon EC2 in order to investigate how we can optimally harness cloud infrastructures in our cloud platform.
  • Tons of new datastores have emerged as part of the "NoSQL" movement, and we need a mechanism to evaluate their performance under controlled experiments as well as traditional databases such as MySQL. We also need a platform that supports the ability to add new data storage mechanisms so that when developers tout the features of their new datastore, we can download it and evaluate it under similar circumstances as other datastores.
  • One of the reasons we love Google App Engine is the simple set of APIs provided, but we also wanted to use that as a starting point where we could add new APIs and control the environment in which they run.
  • We love that Google App Engine "just works". You don't know where it's running and how it's running, but you can see that it is running, and we wanted to make sure that whatever we developed, that it did the same. We wanted to develop something that automatically deployed your App Engine app and configured everything for you. Expert users should be able to have more control over the system, but the system should be able to handle your app from the moment you deploy it to the moment you tear it down.
  • It had to be open-source - just like how we wanted something to tinker with and run experiments on, we wanted it to be something that you could tinker with too. We wanted you to be able to add in support for a database you're interested in and see how it performs, and we wanted you to be able to add in APIs that you think would be interesting to have an easy-to-use web framework interact with.

So with that in mind, we created AppScale, an open-source cloud platform for Google App Engine applications. Here's how we did it:

We took the standard three-tier web deployment approach and clearly segmented each tier into a specific component in the system: an AppLoadBalancer routes users to their applications, an AppServer runs the user's App Engine app, and an AppDB handles database interactions. Each have clearly defined roles in the system and are controlled by an AppController, a daemon that runs on each machine, monitors each component, and controls the specific order in which services are started. It writes all the configuration files for each service and coordinates services between the other AppControllers in the deployment. For those interested, we detail the specifics on the original AppScale implementation in this paper.

We also wanted to embody the principle of "standing on the shoulders of giants", and as such, we employ open-source software as often as possible, where appropriate. Our AppLoadBalancer employs the nginx web server as well as the haproxy load balancer to ensure high performance. Our Memcache API implementation uses memcache under the hood, while our MapReduce API uses Apache Hadoop, which we added to give App Engine users running over AppScale the ability to run Hadoop MapReduce jobs from within their web applications.

Because we were able to keep the database support abstracted away from the other components in the system, we were able to add support for nine different data storage solutions within AppScale: HBase, Hypertable, MySQL, Cassandra, Voldemort, MongoDB, MemcacheDB, Scalaris, and SimpleDB. Many of these databases have seen interest in recent years but have been hard to measure under comparable conditions, and vary greatly. To give a few examples, they vary in the query languages they provide, their topologies (e.g., master / slave, peer-to-peer), data consistency policies, and end-user library interfaces. This has made it non-trivial for the community to objectively determine scenarios in which one database performs better or worse than another and investigate why, but under AppScale, deploying all these databases is done automatically with no interaction from the user. And because AppScale is open-source, if a developer doesn't like the particular interface we use for a database, they can improve on it and give back to the community. We've used AppScale internally to evaluate the performance of Google App Engine applications on these datastores as well as developed an App Engine app, Active Cloud DB, that exposes a RESTful API that developers can use to access these datastores from any programming language or web framework.

Finally, the most important lesson we learned was the value of incremental development. Our core development team fluctuates between two to three developers, so from the first meeting we had, we knew that our very first release couldn't support every App Engine API nor could it run nine databases seamlessly. Therefore, we started off with support for the two BigTable clones, HBase and Hypertable, as well as support for just the Datastore API, the URL Fetch API, and the Users API within App Engine. From there, we learned what datastores people actually wanted to see support for as well as what APIs people wanted to use. We were also able to add APIs within App Engine apps deployed to AppScale to be able to run virtual machines under the EC2 API, while also running computation under the MapReduce API.

But developing AppScale was certainly not a cakewalk for us. Over the course of the last two years, five major issues (some technical and some not) have arisen within the project:

  1. Writing software that works without knowing ahead of time how many machines will be in the system proved initially to be difficult to grasp, but in many cases we were able to reduce the number of variations that could occur and use that to provide some predictability with respect to how we configure and deploy databases and applications.
  2. We couldn't assume that the AppScale administrator has access to DNS; without it, a number of APIs and features are extremely difficult to implement. Load balancing is much more difficult, and many APIs that are tied to host names must be tied to one machine in the system, else they don't work properly. VLAN tagging shows some promise to alleviate these problems, but right now is far from being deployed inexpensively and easily.
  3. The source code for the Java version of App Engine isn't publicly available, so we had to spend a lot of time decompiling the SDK, modifying it to use our database and our API implementations instead of the SDK implementations, and recompiling it. All of these were non-trivial and greatly added to the time it took for us to deploy a version of AppScale with Java App Engine support.
  4. Not all users want a pre-built virtual machine image, so ensuring that building the AppScale environment was done right every time was a top priority. We had to limit ourselves to Ubuntu Jaunty for many releases, and only recently were we able to expand to include Karmic and Lucid, which still make up a microcosm of the distributions available in the Linux world. Adding the ability to install AppScale via apt-get in these specific Linux distributions has also been a crucial step in making sure that users could easily and quickly install AppScale for use.
  5. Both undergraduates and graduate students here at UCSB have done projects involving AppScale, which means that the number and experience levels of developers working on AppScale is completely unpredictable at a given moment in time. Oftentimes the projects they work on are only tangentially related to features that users want, and the time scales that they are available to work for is vastly different than most software engineers are used to.

All of these problems are greatly exacerbated by only having a two-to-three person core developer team, but this also makes the AppScale project particularly interesting to work on. Despite having worked on AppScale for two years, there are still tons of interesting problems to work on and we still love the Python App Engine web framework as much as we did when we first picked it up. And of course, AppScale is open-source, under the New BSD License, so feel free to download it and tinker around like we have! Check out AppScale at:

http://appscale.cs.ucsb.edu

http://code.google.com/p/appscale

-- Chris

Thursday, September 30, 2010

App Engine conference appearances this Fall

It's conference season, and we're going around the world again! This fall, Google team members will be speaking about App Engine at events in more than 10 countries! In addition to the regular conference circuit, Google is also hosting Developer Days and DevFests in a variety of locations to bring not only App Engine but a bunch of Google technologies directly to you!

Fall 2010:

We look forward to meeting you at one (or more) of these events!

Posted by Wesley Chun, Google App Engine team

Wednesday, August 4, 2010

Rapid cloud development using App Engine for the Cycle Hire Widget Android application

Update Oct 2010: It's been several months since we introduced you to Little Fluffy Toys and their exciting Google App Engine story. Since then, their app has continued getting rave reviews. We're happy to let you know that there is a great follow-up to this story from the Android and UI/UE/UX perspective, and you can find it here: http://blog.radioactiveyak.com/2010/10/android-app-surgery-cycle-hire-widget.html

This post is another entry in our ongoing series of guest posts contributed by App Engine developers. Today we partner with Little Fluffy Toys Ltd to tell the story of how they were able to learn App Engine (plus Python) and launched their service paired with their Android application in less than a week!

Introduction

Last week, Little Fluffy Toys Ltd (LFT) launched an Android app to help its users find bicycles and rental locations in London. While this story doesn't sound particularly phenomenal, how they accomplished this using Google App Engine (and Android) makes their application and its launch one of the most exciting success stories so far in 2010.

The development team at LFT were able to quickly come up-to-speed on learning a new programming language and development environment in order to build and launch the App Engine backend service for their Android mobile app to the world in less than one week. The executive summary:

  • Attended 1-hour Thursday night presentation on Google App Engine (Jul 22)
  • Started to learn Python and App Engine on Saturday afternoon
  • Launched live service Wednesday, announcing their Android app with an App Engine backend (Jul 28)

Before we get to the good stuff, a brief backgrounder on the project which spawned the application: metropolitan bicycle-sharing systems, specifically London's. Based on the success and popularity of the Paris Vélib' system, the Barclays Cycle Hire scheme originated mid-November back in 2008 from its mayor, a strong cycling proponent.

The system launched on July 30, 2010; however a month before the project reached its completion, a call for apps was given by the mayor seeking independent developers so that there would be a variety of mobile and web apps available by show time. Enter Little Fluffy Toys Ltd which ended up creating the Cycle Hire Widget app for Android. They needed a backend system to manage the data, found App Engine, and the rest was history. Shortly after going live with their app and the launch of London's bicycle rental system, I had a chance to discuss how their project came together with the help of App Engine.

NOTE: Cycle Hire Widget is only available in the Android Market if you are located within the UK. If you wish to view the application from outside the UK, please download and install it from within your Android browser via this link — bear in mind that the distances to your nearest rental/hire location will be ridiculous!

App Engine and LFT

As we mentioned above, the sole purpose of their App Engine app is to receive data from and provide data to the Android app running on users' mobile phones. The App Engine stored data is "global" for all mobile clients out there, and this includes names, locations, and dynamic specifics related to each bike station such as the data found in the app's screenshot below. Take note all the valuable data that is provided in real-time by App Engine:

If you're a bit familiar with App Engine, you would no doubt have heard about it as a platform for web applications, but this is a use case highlighting App Engine for a non web-based server-side application where no part of the app is user-facing save for what gets sent back to the mobile app. While this type of app doesn’t get much press, it’s more common than people think.

I met Kenton Price, the director and chief architect of Little Fluffy Toys Ltd, at a developer event recently, and he seemed to think that App Engine would be the right tool for the Cycle Hire Widget. It turned out to be true(!), and when I asked about LFT's needs and how they were met by App Engine after their successful product launch, here is what he had to say:

"As you know, we were massively against the clock with the launch of the cycle hire scheme, and we needed something we could get going with fast that would effortlessly scale to perhaps tens of thousands of mobile users. App Engine seemed the perfect choice from what we had read of it before the meeting, and after your presentation it was obviously the way to go. Your recommendation to use Python was scary given neither of us knew a thing about it, but then again we only knew Java from Android not from web development so we didn't have the domain knowledge of building Java web services. So we went with Python, and it worked out really well. I'm astounded how we actually delivered this product in a very short space of time when we both have full schedules working on projects for our clients and other demanding outside interests. Particularly satisfying was having a solution that was agile and flexible enough to enable us to display live cycle availability data within hours of it becoming unexpectedly available at the launch, so we were live in the field with real-time data that very same launch morning, a feature our competitors are still struggling to replicate."

Development experience

Reuben Harris, LFT's chief technical officer, is the lead App Engine developer for the Cycle Hire Widget. He had a great experience even though he was new to Python as well as App Engine. What excited him the most, and what was his development experience like? He tells his story here:

"The single coolest thing about this project is that it was possible to go from a state of knowing nothing whatsoever about App Engine or Python (other than the mile-high view) to having a working and useful application inside of eight hours. We're long-time geeks but we're not geniuses. For us to pick up a new language, a new SDK, a new environment, a new way of doing things, and produce anything of value at all in such a short time speaks volumes about the value, potential, and quality of App Engine and Python.

After installing the App Engine SDK, yes, the very first thing I did was your online tutorial. I did "Hello World" to find my feet then continued into webapp, since a clean URL handler with easy ways to get at HTTP variables seemed essential. Then I immediately jumped into learning about data storage. And wow, what an enlightenment that turned out to be! Goodbye SQL, don't think I'm going to miss ya.... :-)

Since the app's purpose is to manage just ~400 simple objects representing Cycle Hire Stations, each of which contains only Plain Old Data types — no object references or anything possibly messy — I felt I knew enough to implement it now, and so I dived in. And it was so easy! I started with a handler to rebuild the datastore from scratch. Then I wrote a "get" type of handler to retrieve information about groups of hire stations (returning the data in JSON). Finally I wrote an "update" handler so that updated information about cycle hire stations could be posted, and that was it. Job done.

One thing that initially confounded me was an HTTP 500 error caused by our "reset" handler exceeding the 30-second request limit. For a while I was ready to despair; HTTP 500s to anyone with much ASP experience usually means a hideous low-level bug somewhere! However, once we discovered the problem, this was easy to fix by splitting the work into multiple requests (/reset1, /reset2, etc.) It's an admin function that only we'd ever be using, so no harm done and no need to work out anything more clever.

I know we've barely scratched the surface of what can be done with App Engine. We've yet to use Memcache, background tasks, batched updates, or anything beyond simple cloud-based data storage. But that simple thing alone seemed then, and still seems, not far short of miraculous. To not have to worry about databases, servers, uptime, upgrades and above all scaling... to not have to think about any of that at all is such an immense freedom. I'm completely hooked on it and am unlikely to go back to my traditional server tools of MySQL and PHP.

To see Reuben's work in action, check out this video demonstrating how to use the Cycle Hire Widget app while roaming the streets of London seeking a bike to rent/hire or park:

Conclusion

Since the launch, the Cycle Hire Widget has gotten rave reviews from CNET, The Guardian, and The Londonist. It has even been featured by the Press Association of the UK and Ireland! One user commented on Android Market: "Can't really think of a way to make it better," a sentiment reflected in its very high feedback rating. It certainly does sound like quite a success. What does the future look like? I asked Kenton about how LFT came about as well as how they're looking to improve their succeeding offerings, and here's what he had to say:

"We formed Little Fluffy Toys Ltd as a vehicle for Android development where we do consultancy work as well as our own stuff like the Cycle Hire Widget and Social Wallpaper. Whilst all custom development enquiries are very welcome, we're also interested in hearing from people or organisations that would like us to customise Cycle Hire Widget for their particular domain, whether it's cycles with availability in another city, coffee shops with opening hours in a geographic region, or dieting group meetings at pertinent times nearby. You name it, there are a gazillion applications for it!"

Well here on the App Engine team, we're happy for Kenton and his team on being able to implement the server-side solution they needed in such a short period of time on App Engine, and better yet, to help out a worthy cause. Google itself is a socially responsible company that applauds efforts like Barclays Cycle Hire, so we're proud that technologies we provide such as Android and App Engine can be used to help make London and the Earth more sustainable!

Posted by Kenton Price & Reuben Harris, Little Fluffy Toys Ltd, and Wesley Chun, App Engine team

Friday, July 23, 2010

Introducing the Mapper API

At Google I/O we announced the Mapper API. Built completely on top of public App Engine APIs today, this API is only the first component of App Engine’s MapReduce toolkit, but can be extremely useful on its own.

The Mapper API can already be of use to many developers who would otherwise need to build their own tool for doing large scale data manipulation. In addition to taking care of the distribution of these jobs over task queues, it provides the ability to store state, batch datastore writes via mutation pools, and ships with an easy to use administrative interface for job management, all optimized for the constraints of App Engine’s dynamic serving environment. Some examples of the types of operations that work with minimal configuration with this tool:

  • Report Generation
  • Large scale migration of entity properties
  • Datastore cleanup
  • Computing statistics and metrics
For an introduction to the Mapper API, watch Mike Aizatsky’s video from Google I/O, where he demonstrates building a source code indexer. The slides can be downloaded here, and the video is below:

The App Engine team has also written a few great articles on how to use the Mapper API.
  • For Python developers, take a look at the Python Mapper API post on Nick Johnson’s blog.
  • For Java developers, Ikai Lan has written a great post about the Java Mapper API, which takes some design cues from Hadoop’s API and includes several examples of common operations such as large scale modification of properties or batch delete.

When you’re ready to jump in and start using the tool, head over to the project homepage on Google Code. You’ll want to check out the “Getting Started” page for the language you’re using:

Happy Mapping!

- Fred, Mike, Ikai, Nick + the App Engine team