App Engine and IPv6, Round 2

Back in March, we announced that all App Engine apps hosted on appspot.com would be reachable over IPv6, from ISPs enrolled in the Google over IPv6 program.



Today, we're adding the same service to all domains hosted by ghs.google.com. If your App Engine app runs on your own domain name using Google Apps, then be sure to review our earlier blog post, which discusses the caveats of parsing client IP addresses, and how to use the SixXS Gateway to test your site over IPv6.



Currently, the Google over IPv6 program presents AAAA records only to ISPs within our whitelist. This helps ensure that our services remain reliable, by reducing exposure to clients with broken IPv6 connectivity. As the maturity of IPv6 deployment improves, we expect this whitelist to grow, eventually disappearing as it encompasses the entire Internet.



That said, we know that some of you are fans of IPv6 who would prefer to skip the whitelist, and offer dual-stack service to everyone immediately. To make your domain bypass the whitelist, just change your CNAME pointer from ghs.google.com to ghs46.google.com. Please note that, while ghs46 will cause your App Engine site to receive a larger fraction of its traffic over IPv6, our studies show that it may make your site slow or unreachable for up to 0.1% of clients across the Internet, so use this alternate domain with care.



As before, if you experience any problems with IPv6 serving and App Engine, please report it in the App Engine issue tracker or post about it in the App Engine discussion group.





And the results are in��

Leading RF front-end chip manufacturers RFMD, Skyworks and TriQuint each released their quarterly earnings last week and the results for each were very encouraging with revenue for the quarter up 29, 44 and 23%, respectively over the same quarter of the previous year .

For its fiscal 2011 first quarter, ended July 3, 2010, RF Micro Devices Inc. posted better-than-expected quarterly results, helped by growing demand for mobile broadband devices, and said it expects its September-quarter results to be in line with its first quarter. The company earned $28.1 million, or 10 cents a share, compared with $4.8 million, or 2 cents a share, a year ago. Excluding items, RF Micro Devices earned 16 cents a share. Revenue rose 29 percent to $273.8 million. "RF Micro Devices is currently on track to grow revenue and achieve double-digit earnings growth this fiscal year," Chief executive Dean Priddy said in a statement.

While on a different fiscal calendar, Skyworks Solutions Inc.'s also announced that its second-quarter net income nearly doubled, propelled by the booming market for mobile phones and other wireless devices that rely on the company's chips. The company indicated the favorable trends are likely to extend into the third quarter; it provided a forecast above analysts' previous estimates.

In the quarter completed July 2, Skyworks said it earned $34.7 million, or 19 cents per share, up from $18.7 million, or 11 cents per share, at the same time last year. If not for certain accounting items, Skyworks said it would have earned 32 cents share. That was two cents better than the average estimate among analysts surveyed by Thomson Reuters.
Revenue for the period increased 44 percent to $275 million, about $6 million above analyst forecasts. In the current quarter, Skyworks expects to earn 37 cents per share, excluding certain items, on revenue of $300 million. Analysts, on average, had predicted earnings of 34 cents per share on revenue of $287.5 million.

TriQuint Semiconductor also reported their financial results for the second quarter which ended July 3, 2010 with revenue for the second quarter at $207.5 million, up 23% from the second quarter of 2009. The company�s Networks products continued to enjoy a strong rebound from the lows of 2009 growing 19% sequentially and 64% year over year. Net income was $22.5 million, or $0.14 per diluted share. Non-GAAP net income was $33.1 million, or $0.20 per diluted share. Gross margin for the second quarter of 2010 was 41.2%, up from 32.3% in the second quarter of 2009. On a non-GAAP basis, gross margin improved for the fifth consecutive quarter to 42.3%, up from 33.2% in the second quarter of 2009. Gross margin improved sequentially due to strong factory utilization, a higher mix of networks and defense product revenue and favorable product mix.

Operating expenses for the second quarter of 2010 were $58.8 million, or 28.3% of revenue, up from $50.3 million, or 29.8% of revenue in the second quarter of 2009. Non-GAAP operating expenses for the quarter were $54.7 million or 26.4% of revenue, up 4.4% sequentially. Most of the increase was in research and development expenses.

IEEE EMC 2010 in Fort Lauderdale

We are at the IEEE International Symposium on Electromagnetic Compatibility in Ft. Lauderdale, FL and finished our first day of attending the exhibition. Over 2000 attendees are on site with over 150 exhibitors at the Ft. Lauderdale Convention Center. The primary RF and microwave modeling, design, test/measurement and component companies that offer EMC/EMI solutions are here.

The theme of the 2010 Symposium is "Systems Engineering" and the emphasis is preventing or catching EMC issues early in design with proper modeling and early testing. The technical program is designed cover everything from EMC fundamentals to advanced numerical techniques for prediction and control. There are five days of papers, workshops, tutorials and demonstrations.

The exhibition was very busy for the first couple of hours on the first day but seemed to slow for most of the rest of the day until happy hour. Most exhibitors were happy with the quality of the leads so far so we hope this continues through the week. We are shooting some videos of demonstrations and products from the leading companies and will include them in our show wrap up next week.

Update on Datastore Performance Status

If you have been running an App Engine application over the last few months, you will have noticed that performance of the Datastore has drastically improved. In fact, it quickly improved after the blog post we wrote in May acknowledging the performance issues. We chose to wait until this point to ensure that we could maintain the performance and quality of service. Thanks to a huge effort from the Datastore engineering team and our Production team, the metrics over the past month have made us confident that we have returned to a level of performance that we are proud to offer. With that in mind, we are now going to re-enable Datastore CPU usage billing.



On Tuesday, August 3rd, we will re-enable charging for Datastore CPU usage.



This does not mean that we are stopping work on Datastore performance and reliability-- quite the opposite, in fact. The issue has forced the team to step back and prioritize our long term roadmap for the Datastore. While we’re happy with our performance now, there are some very large changes to the Datastore in the pipeline that will continue to improve the App Engine platform. These include features such as a more highly replicated Datastore (now part of the roadmap) and improvements to the index building pipeline.



Thank you all for your patience and continued use of App Engine during this time. We’re excited to continue to serve our apps’ continued growth.



An Even Better Way to Find Places Nearby

With six updates in six months, Google Maps for Android has been getting plenty of new features, both big and small. A continued focus with each update has been on giving you better ways to find places nearby. In the most recent updates, Maps has gotten features like swiping between search results and info like photos, reviews, and more helpful content on the result pages. With today’s launch of Google Maps for mobile 4.4, we’re introducing an even easier way to find places around you: a dedicated Places icon that lets you quickly look up nearby places and pick a place to go using updated Place Pages, just like on your computer.

On Android-powered phones with Google Maps 4.4, you’ll find the new Places icon in the app launcher with the rest of your apps. Press and drag it right onto your home screen to use it when you’re looking for a restaurant, shoe store, movie theater or any other type of local business. You'll get a detailed list of all the nearest places and can choose one to learn more about it on its Place Page.



Search for several convenient types of places with the default categories or add your own for your most frequent searches. You can also use the search bar at the top to type or speak any query. I tend to use the “coffee” search a lot, but I’ve also looked for “gas stations” on the road, “ice cream shops” in my neighborhood, and even specific places like “Chelsea Market” on a recent trip to New York.

Of course, you’ll often want to learn more before deciding where to go. With updated Place Pages, you should be able to find all you need to know about a place, whether you’re wandering into a new restaurant or deciding from your couch. In addition to photos and reviews, Place Pages now have a bunch of new details, such as prices, parking and menu links to inform your quest for the perfect steak. You'll also notice that the search results list now highlights business opening hours in addition to compass direction and distance -- consider it your late night caffeine radar.



Google Maps for mobile 4.4 is available now for Android 1.6 and above. Just search for Google Maps in Market or tap here from your phone. The Place Page and search result updates are coming soon for BlackBerry users so keep an eye out for an update at m.google.com/maps (from your BlackBerry Browser) or on our Twitter and Facebook pages.

Visit our Help Center to learn more, ask questions in our Help Forum, or give us suggestions and vote on other people’s on the Mobile Product Ideas page.

Update: Google Maps for BlackBerry version 4.4 is now available with the new search results view and Place Page details. From your BlackBerry's Browser, go to m.google.com/maps to install it now.

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

Faster dialing with Google Voice on Android and Blackberry devices

(Cross-posted with the Google Voice Blog)

At Google we are obsessed with speed. Our mantra is faster = better. This is true for our Google Voice mobile apps as well. When you want to make a call, your phone should connect you as quickly as possible, whether you’re calling via Google Voice or not.

Today we are launching an enhancement to the Google Voice mobile app on Android and Blackberry phones, which makes placing calls much faster. We call this feature “direct access numbers.” Here’s how it works:

Until today, the Google Voice app had to make a request to the Google Voice server every time you wanted to make a call to send us the phone number you wanted to dial. Then the call would be connected via a Google Voice access number. With direct access numbers, we assign a unique phone number to every person you call. This means that we no longer need to use your data network to access the server each time you make a call, so calls will be placed much faster.

The updated Android app is available from Android Market starting today. For Blackberry users, you can download the app by visiting http://m.google.com/voice from your mobile device. You will need a valid Google Voice account to use the app, and at this time, Google Voice is available in the US only.

Update on the iPhone 4 Antenna Issue

By now most everyone has heard about the iPhone 4 antenna problems. Holding it in certain areas can either bridge the gap between two of the antennas embedded into the outside frame causing them to not work properly or covering the lower part of the phone can attenuate the signal resulting in poor reception. There is no software that can fix this physical problem although Apple was pushing this as a solution by reprogramming the sensitivity of the signal strength indicator (number of bars displayed).

There were numerous complaints and now there are lawsuits against Apple that they shipped a defective product and mis-represented its performance (by the way, there are many reports that they are hiring antenna engineers if you want a job there). The final nail seemed to come last Monday when Consumers Reports reported they are not recommending the iPhone 4 due to its issues.

The $30 bumper Apple sells can fix most of the issues but they earlier insisted that customers pay for one. There are even YouTube videos showing how to fix the problem with a band-aid which people are now selling! After being in denial for many weeks and trying to divert attention to the real antenna hardware problem, Apple seems to have come to their senses and is now going to give away free bumpers to its customers although they still are not admitting it is a design flaw. This is estimated to cost around $175 million but this is probably much less than a recall or all the lawsuits, etc. that will be filed in the future.

It is a shame as the new iPhone has improved sensitivity and works very well when held so that the antenna is not covered or shorted out. I originally thought this new antenna design was a great idea but leaving it exposed has shown to be a very bad idea. The iPhone 4 antenna in the phone frame is really a poor design and should have been caught/fixed during modeling or at least during testing. It is standard practice to test a phone in several different hand positions next to a phantom head so it is hard to believe they did not know about this flaw.

A Legal Right to Broadband!

At the beginning of this month, everyone in Finland has been given the legal right to broadband service making it equivalent to a utility available to most everyone in developed countries. The Finnish law means that from 1 July all telecommunications companies will be obliged to provide all residents with broadband lines that can run at a minimum 1 Mbps speed and has vowed to connect everyone to a 100 Mbps connection by 2015.

It is believed up to 96% of the population are already online and that only about 4,000 homes still need connecting to comply with the law so they are much closer to realizing this goal than any other country. Of course, they are in Nokia-land where wireless is their second language.

In the UK, the government has promised a minimum connection of at least 2 Mbps to all homes by 2012 but has stopped short of making this a right in law. The US broadband plan is being developed and funded but the broadband penetration is only about 64% so it is far behind Finland while S. Korea enjoys the fastest broadband speeds worldwide.

Follow Team HTC-Columbia on Google Maps and Then Let Others Follow You

In case you missed it, check out the Official Google Blog’s post about how Team HTC-Columbia is using Android-powered phones and a special version of the My Tracks app with SRM to share real-time data from the Tour de France. Head over to google.com/mytrackstour to follow along during the race and see riders’ real-time location along with their power, heart rate, cadence and speed right on Google Maps.



Want to record some of this data or share your location on Google Maps during your next big ride? Track your rides, runs, or walks in detail with the My Tracks app on your Android-powered phone. From many popular smartphones, you can share your location with friends using Google Latitude and then publish your location to the web with the Google Public Location Badge.

Upcoming App Engine conference appearances

Fresh from our exciting news from Google I/O last quarter (launch of Google App Engine for Business and new product developments), we now look ahead to the mid-summer months. Since I/O, we've already appeared at a number of events including the Google DevFest Australia and Philippines, PyCon AU, and the Malaysia Open Source Conference, with many more coming this month. There are several well-known large conferences (and many smaller ones too) that our team members will be attending and/or speaking at, so hopefully we'll get to meet you at one of them!









In addition to the ones listed above, Google will be hosting more DevFests in Asia and South America later this year. Keep an eye out for specific dates and locations on the Google DevFest home page. There are also 5 larger global Google Developer Day events in the fall. We would love to meet with App Engine developers at a DevFest, Developer Day, or any of the other conferences above!




See you around the world!






YouTube Mobile Gets a Kick Start

(Cross-posted with the YouTube Blog)

It’s well known that the mobile internet is huge and growing fast; what’s surprising is exactly how fast. According to a recent report, within 5 years more users will connect to the internet via mobile devices than desktop PCs. YouTube consumption on mobile devices has also grown considerably -- playbacks were up 160% in 2009 over the previous year. And we’re excited to announce that YouTube Mobile now receives more than 100 million video playbacks a day. This is roughly the number of daily playbacks that YouTube.com was streaming when we joined forces with Google in 2006.

We launched YouTube on mobile devices in 2007 with about 1,000 videos available on the mobile site (m.youtube.com). While this suddenly opened up the possibility to access videos on the go, our site, mobile browsers and the hardware had limitations that prevented the mobile experience from keeping up with YouTube on the desktop. Today, more than ever, we know that you want to be able to find and access your favorite videos wherever you are. That’s why we’ve been working hard to roll out an updated version of the mobile site.

Here's what's new about the new mobile site:
  • It's really fast.
  • The new user interface incorporates larger, more touch friendly elements, making it easier to access videos on the go.
  • It incorporates the features and functionality you’ve come to expect from the .com site, like search query suggestions, the options to create playlists,the ability to designate “favorite,” “like,” or “unlike” videos directly from your device.
  • As we make improvements to Youtube.com, you’ll see them quickly follow on our mobile site, unlike native apps which are not updated as frequently.
As the world continues to go mobile, we think this is a great improvement for users who want a more consistent YouTube across many devices, no matter where they are. We're launching in English only today, but will be rolling it out in other languages in the coming months. You can access the latest YouTube mobile site from your iPhone or Android browser. To learn more, visit m.youtube.com to check out the latest improvements and take a minute to watch this demo video:



RF/Microwave Calculator and Converter Apps

I recently came across this very nice microwave toolbox for Android mobile devices that Faust Nijhuis developed (posted on our LinkedIn Community). He has created a free lite version with a few useful calculators and a 1.99 euro version that has 6 calculators and 2 converters for the full toolbox. Below are a couple of sample screen shots from his web site.


MW calculator lite is the lite and free version of the microwave tool box with the following tools:
  • PI and T attenuator calculator
  • Reflectometer calculator
  • Mismatch error limits calculator

MW calculator is a microwave tool box with the following tools:

  • PI and T attenuator calculator
  • Reflectometer calculator
  • Mismatch error limits calculator
  • Microstrip calculator
  • Stripline calculator
  • Coplanar waveguide calculator
  • Power and voltage converter
  • Field intensity and power density converter

You will find the applications in the Android Market and more information can be found on his web site at http://www.mwave-design.nl/mw/index.php?title=Android.

At IMS 2010, Agilent launched the Agilent MicroWave calculator to help calculate the errors in microwave measurements. It consists of Directivity Error Calculator, Mismatch Error Limit Calculator, and Ratio-to-dB Calculator. The Directivity Error Calculator shows the accuracy of a reflection measurement of unknown impedance based upon the directivity of the coupler used for the measurement. The Mismatch Error Limit Calculator shows the potential error in a transmission measurement due to imperfect source match and load match. The Ratio-to-dB Calculator simply converts between voltage ratio, power ratio, and dB.

It can be downloaded at http://itunes.apple.com/us/app/microwave-calculator/id369705771?mt=8.

Please let us know if there are RF/microwave related tools that you would like to have in an app. What other mobile phone apps have you seen that would be useful to microwave engineers? This should be a very interesting area to watch as new apps are developed for our industry.

Upcoming Datastore Downtime

We have two scheduled upcoming maintenance periods for the Datastore:



  • July 7th, 2010 - 5pm-6pm Pacific Time (July 8th, 0:00 GMT) - Later today

  • July 14th, 2010 - 5pm-6pm Pacific Time (July 15th, 0:00 GMT)




As part of our on going Datastore reliability work, we'd like to inform developers that during the period between the two maintenance events listed above, we are expecting that Datastore performance will be impacted and applications will see higher read/write latencies. This maintenance and the higher latency in between are an unfortunate, but necessary step in our long-term plan towards completing the work to address the datastore latency issues (as described in our recent blog post). We recognize the inconvenience to applications and their users caused by this. For this reason, we continue to offer free datastore CPU usage until we are confident we have cleared these issues.




You can read more about the currently scheduled maintenance periods on the notification to the Downtime Notify list. As a reminder, be sure to sign up with the Downtime Notify list for alerts and updates on scheduled (or unplanned) maintenance, and follow @app_engine on Twitter for ongoing announcements.

No link between Mobile Phone Base Stations and Early Childhood Cancers

There is no association between risk of early childhood cancers and a mother�s exposure to a mobile phone base station during pregnancy, concludes a new study published on bmj.com last week. This is the first study to look at phone masts in Britain as a whole and is the largest of its kind.


Use of mobile phones has increased markedly in recent years and questions have been raised about possible health effects, including brain and other cancers, especially after prolonged use. Surveys also indicate high levels of public concern about the potential risks of living near mobile phone masts. Previous reports of apparent cancer clusters near mobile phone base stations are difficult to interpret due to small numbers and possible biases that could have affected the results. Also, any radiobiological explanation for such cancer excesses is lacking.



So researchers at Imperial College London set out to investigate the risk of early childhood cancers, such as brain tumours and leukaemia, and proximity to a mobile phone base station during pregnancy. Here is a link to the full story.

App Engine SDK 1.3.5 Released With New Task Queue, Python Precompilation, and Blob Features

Today we are happy to announce the 1.3.5 release of the App Engine SDK for both Python and Java developers.


Due to popular demand, we have increased the throughput of the Task Queue API, from 50 reqs/sec per app to 50 reqs/sec per queue. You can also now specify the amount of storage available to the taskqueue in your app, for those with very large queues with many millions of tasks. Stay tuned for even more Task Queue scalability improvements in the future.


Additionally, in this release we’ve also added support for precompilation of Python source files to match the same feature we launched for Java last year. For Python, you can now use precompilation to speed up application loading time and to reduce CPU usage for new app instances. You can enable precompilation by including the following lines in your app.yaml file:


derived_file_type:

- python_precompiled

This will start offline precompilation of Python modules used by your app when you deploy your application. Currently precompliation is off by default for Python applications, but it will be enabled by default in some future release. (Java precompilation has been enabled by default since the release of 1.3.1.)


To give you a taste of what this feature is like, we tested this on a modified version of Rietveld (which included a copy of Django 1.0.4 in the app directory, and which did not use the datastore in its base url). The latency and CPU usage results for the initial load of the application, after uploading a new version of the app and requesting the homepage, were:



Before precompilation enabled:

Test 1: 1450ms 1757cpu_ms

Test 2: 1298ms 1523cpu_ms

Test 3: 1539ms 1841cpu_ms

After precompilation enabled:

Test 1: 805ms 669cpu_ms

Test 2: 861ms 702cpu_ms

Test 3: 921ms 803cpu_ms

Of course, any individual app’s performance will vary, so we recommend that you experiment with the setting for your application. Please submit your feedback and results to the support group!


In addition to Task Queues and Python precompilation, we have made a few changes to the Blobstore in 1.3.5 We have added file-like interfaces for reading Blobs. In Python, this is supported through the BlobReader class. In Java, we have implemented the BlobstoreInputStream class, which gives an InputStream view of the blobs stored in Blobstore.


More information on this release can be found by reading the release notes for Python and Java.



PayPal introduces PayPal X Platform Toolkit for Google App Engine




Hello App Engine Developers!

My name is Praveen Alavilli (@ppalavilli) and I work as a developer evangelist for PayPal's X Platform at PayPal.com. I want to take the opportunity to introduce you to our new open source toolkit for Google App Engine that provides an easy way to integrate your Java apps running on App Engine with the new PayPal's Adaptive Payments API. Currently this is a Java toolkit explicitly for App Engine Java, but a Python version will be coming out soon.



Background

The Adaptive Payments API provides a set of core services offered by the PayPal X Open Global Payments Platform to enable developers to embed payments into their applications, services, and platforms. The Adaptive Payments APIs offer several new payments functionality like Split Payments and Preapprovals, that enable developers to implement a variety of monetization models - freemium, subscriptions, pay-per-use, value-added-services, micro-transactions, e-commerce, etc. in their applications built and running on the App Engine. Whether you are building an application for Businesses to process back-end disbursements or payouts to affiliates, or building a social or gaming app for Facebook / Twitter / Open Social, or building a Desktop gadget for premium content, or building a Geolocation app that only helps users find places and people around where they are but even help in transacting them, or building a Web2.0 AJAX app that mashes up content and services, or several more use cases enabled by App Engine, now you can use the PayPal X toolkit to enable payments in them as it fits the needs.



Using the toolkit

Getting started with App Engine toolkit is easy. You can either checkout the source code from svn and import it into your Eclipse project or simply download the prebuilt jar file and include it in your application's class path (/WEB-INF/lib). Similar to other APIs that you might have used, you would need PayPal API Credentials to authenticate your API requests. With the toolkit you simply create an "APICredential" object from one of your application initialization methods (in most cases from your Servlet init() method) and load the API Credentials that you have obtained from the PayPal Sandbox. (Please refer to PayPal's Sandbox guide for more detailed information on how to obtain them).


// Obtain the credentials from your configs
credentialObj = new APICredential();
credentialObj.setAPIUsername(getServletConfig()
.getInitParameter("PPAPIUsername"));
credentialObj.setAPIPassword(getServletConfig()
.getInitParameter("PPAPIPassword"));
credentialObj.setSignature(getServletConfig()
.getInitParameter("PPAPISignature"));

// setup your AppID from X.com
credentialObj.setAppId(getServletConfig()
.getInitParameter("PPAppID"));

// setup your Test Business account email
// in most cases this would be associated with API Credentials
credentialObj.setAccountEmail(getServletConfig()
.getInitParameter("PPAccountEmail"));

// add required error condition checks
//....



Once the APICredentialObj is initialized successfully, save it in the application's local context so you do not need to reinitialize it on every request.


At its core, the Adaptive Payments API provides 5 generic API methods: Pay, Pay Details, Preapproval, Preapproval Details, Cancel Preapproval, Refunds, and Convert Currency. The toolkit provides the base API Request classes required to make those API calls. To make it even simpler, the toolkit also provides a few functional API wrapper classes that not only abstracts the APIs in terms of the functionality exposed (SimplePay, ChainedPay, ParallelPay, CreateSimplePreapproval, CreatePreapprovalForPeriodicPayments, PreapprovedChainedPay, etc.) but also provides a few exceptions that helps in handling errors more easily than the generic API Responses.




A Simple example


To give you an example, let's say you are building a SaaS model application on App Engine that you charge your customers based on their usage. While on-boarding customers to use your app, you can use the Preapproval API to obtain authorization from your customers to charge them for the app/service based on their usage in the future. In this case you can simply use the 'CreateSimplePreapproval' to create and send a request as below:

try {

// CreateSimplePreapproval request to setup a simple
// preapproval with no Payment Period Set
CreateSimplePreapproval simplePreapproval =
new CreateSimplePreapproval();

// set the API Credentials object (as given in the code above)
simplePreapproval.setCredentialObj(credentialObj);

// starting date in yyyy-MM-dd format
simplePreapproval.setStartingDate("2010-06-25");

// ending date in yyyy-MM-dd format
// in this case it's for an year from the starting date
simplePreapproval.setEndingDate("2011-06-25");

// set max total amount of all Payments
simplePreapproval.setMaxTotalAmountOfAllPayments(52.00);

// set max amount for each payment - let's say $1
simplePreapproval.setMaxAmountPerPayment(1.00);

// set max number of payments allowed - (52 weeks)
simplePreapproval.setMaxNumberOfPayments(52);

// set where to send the user in case of a cancellation
simplePreapproval.setCancelUrl(req.getRequestURL() +
"?action=preapproval&cancel=1");

// set where to return the user after successful approval
simplePreapproval.setReturnUrl(req.getRequestURL() + "?
return=1&action=preapproval&preapprovalKey=${preapprovalKey}");

/* Set other required fields */
// ... //

// set memo for user's transaction history
simplePreapproval.setMemo("Preapproval for GAE Sample");

// send the request
PreapprovalResponse preapprovalResponse =
simplePreapproval.makeRequest();

} catch (//...exceptions go here...//) {
// handle exceptions as necessary

}



In this case, when the 'AuthorizationRequiredException' is thrown, your application would need to redirect the user to PayPal for authorizing the preapproval. The 'getAuthorizationUrl' method takes care of building the PayPal authorization url along with the Preapproval Key returned by the Preapproval API. Once the user authenticates and authorizes the preapproval request on PayPal.com, the user will be redirected back to your 'returnUrl' along with the preapprovalKey, which your application can verify by using the 'PreapprovalDetailsRequest' and store it in it's own app engine data store securely. From that point onwards, whenever the user needs to be charged for their usage of the application, the application can use one of the 'PreapprovedSimplePay' or 'PreapprovedParallelPay' or 'PreapprovedChainedPay' classes to make a payment on behalf of the user. Please refer to the sample apps to understand how to use the other classes provided by the toolkit to make Parallel,Chained or Simple Payments. For eg. the PicMartServlet.java in the PicMart sample app shows how you can make a parallel payment to two receivers at the same time.




Further examples

As mentioned earlier, if you are building a social game where users can buy digital goods (eg. micro-payments) and virtual currencies while playing a game, you can use the same Preapproval API to obtain authorization from them so you could charge their PayPal accounts as and when needed, without requiring them to re-enter their payment information or redirect to PayPal for authorizing the payments.

Other examples of using the toolkit can include:

  • An application that lets merchants or enterprises pay their suppliers, or manage affiliate networks

  • Applications to enable property owners to collect rental payments from tenants

  • With a mult-merchant marketplace, a simple payroll app enables employee salary payments in multiple countries

  • ...


As you can see, the toolkit's support of the Adaptive Payments APIs can easily enable all of these usecases.




Where to find more info


Please look at the sample code provided in the samples directory. The AdaptiveRequests.java class in AdaptiveSample and AdaptiveSampleFnAPI shows how to use the helper classes to send and receive requests. The PicMart sample app provides a simple example of how the Parallel Payment can be used in a Photo Printing app that let's users to buy prints of the pictures from Picasa Album of the photographer. This sample app uses the Picasa APIs to fetch the album and picture information from Picasa.





To learn more about the PayPal X Toolkit for App Engine, please visit: http://code.google.com/p/paypalx-gae-toolkit/ and to learn more about Adaptive Payments, please visit: https://www.x.com/community/ppx/adaptive_payments. You can find a lot of resources for developers like documentation, technical spec, sample apps, code, sdks, technical forums, technical support, etc.. on PayPal X Developer Network web site (https://www.x.com).


Posted by Praveen Alavilli (@ppalavilli), PayPal X Developer Network.

ADI Data Converters Buried Under South Pole Ice Cap

This ADI news release came out today and it is a very interesting piece of science so I have to share it here:

Buried two kilometers under solid ice on one of the coldest continents on Earth, Analog Devices� (ADI) data converters and amplifiers are helping scientists at the South Pole build the world�s largest telescope to search for the smallest subatomic particles known to humankind.

The innovative �underground� telescope project is called IceCube and uses a cubic kilometer of pure, ultra-translucent ice at the South Pole as a telescopic �window� or particle detector to search the universe for its smallest known particles, called neutrinos. Neutrinos are subatomic particles that lack an electric charge produced by the decay of radioactive elements and elementary particles. Neutrinos travel at near the speed of light and are so tiny that they can typically pass through solid matter without colliding with any atoms. However when neutrinos collide with an atom, light energy is emitted that can help detect the presence and direction of these sub-atomic particles.

IceCube will search for neutrinos from the most violent astrophysical sources, including events like exploding stars, gamma ray bursts, and cataclysmic phenomena involving black holes and neutron stars. The IceCube telescope is a powerful tool to search for dark matter, and could reveal new physical processes associated with the enigmatic origin of the highest energy particles in nature.

IceCube uses Antarctica�s ice sheet as the largest instrumented volume of ice/water in the world. Neutrinos passing through the ice sheet collide with atoms creating a blue light at impact that can be detected by IceCube�s digital optical modules (DOMS).

Analog Devices� data converters and amplifiers are installed in more than 5,000 of these DOMS. The DOMs, which are 13�inch-diameter glass pressure spheres, are deployed under the ice on a cable at depths of between 1.5 and 2.5 km. Over the next 25 years while embedded in ice, the DOMs will detect and transmit experimental data about particle collisions.

�We needed low-power, reliable products capable of providing the longevity needed for this project, especially on the main board in the DOMs. Design teams at Lawrence Berkeley National Laboratory (LBNL) and the University of Wisconsin-Madison used ADI data converters and amplifiers that fit our needs and requirements," said Jerry Przyblski, LBNL Design Engineer. �We used ADI products, such as ADCs (analog-to-digital converters), DACs (digital-to-analog converters) and amplifiers, in the DOMS and the communications system. So far, IceCube�s scientists have gathered data equal to thousands of DOM years of operation.�