Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RESTFul Service Framework for AppEngine

I am working on a project that involves mobile and web clients with Google's AppEngine PAAS. I would like to use RESTFul webservices with my AppEngine app.

I have looked over Stackoverflow for references to RESTFul service frameworks that can be used with AppEngine for both web (GWT) and mobile (Android) clients. Although Restlet seems to provide editions for AppEngine, GWT and Android, so far I've got it down to RestEasy mostly due to this question.

There have been questions previously that discuss RESTFul frameworks but I don't think the comparisons apply well to this, now quite common, case. It would be helpful to hear experienced developers' views on the frameworks available for this set of platforms and merits versus demerits of each.

like image 450
Saad Farooq Avatar asked Feb 26 '12 13:02

Saad Farooq


People also ask

What type of service model is Google Appengine using?

App Engine is a fully managed, serverless platform for developing and hosting web applications at scale. You can choose from several popular languages, libraries, and frameworks to develop your apps, and then let App Engine take care of provisioning servers and scaling your app instances based on demand.

What is App Engine standard environment?

The App Engine standard environment is based on container instances running on Google's infrastructure. Containers are preconfigured with one of several available runtimes. The standard environment makes it easy to build and deploy an application that runs reliably even under heavy load and with large amounts of data.

Is Google App Engine platform as a service?

Google App Engine (GAE) is a platform-as-a-service product that provides web app developers and enterprises with access to Google's scalable hosting and tier 1 internet service.

What is go App Engine?

Google App Engine is a service and a platform where you can develop and host web applications. You can learn more about Google App Engine at the official Google App Engine site. With App Engine integration, you can run and debug Google App Engine applications.


2 Answers

You might wish to consider using Google Cloud Endpoints, which was announced as a trusted tester feature for App Engine at Google I/O, and is now available to everyone. With Endpoints, you annotate simple Java (or Python) classes and methods to describe your API. For example, this is a simple class to get and retrieve a list of high scores from a Tic Tac Toe game:

@Api(name = "tictactoe")
public class ScoreEndpoint {
  @ApiMethod(name = "scores.get")
  public Score get(@Named("id") String id) {
    PersistenceManager pm = getPersistenceManager();
    Score score = pm.getObjectById(Score.class, id);
    pm.close();
    return score;
  }

  @ApiMethod(name = "scores.list")
  public List<Score> list() {
    PersistenceManager pm = getPersistenceManager();
    Query query = pm.newQuery(Score.class);
    return (List<Score>) pm.newQuery(query).execute();
  }
}

Features

  • Support for Java and Python runtimes
  • Built on Google's API infrastructure - it works with many of the same tools and libraries used for Google's own APIs, such as the APIs Explorer and APIs Console
  • Automatically-generated, statically-typed client libraries for Android and iOS - these libraries are using the same Google-authored Java and Objective-C libraries you would use to access other Google-provided APIs such as the Calendar API
  • Dynamically-typed JS client library - again, the same library you use to access other Google-provided APIs in JS
  • Built in support for OAuth 2
  • Integration with the Google Plugin for Eclipse - this allows you to automatically create an API based on a model, or an App Engine application to back an existing Android app
  • Support for local development - you can build and test your API using the App Engine development environment, just as with other App Engine features

Learn More

Check out the documentation for more details on using Endpoints.

You can also watch several talks from Google I/O:

  • Building Mobile App Engine Backends for Android, iOS and the Web
  • HTML5 and App Engine: The Epic Tag Team Take on Modern Web Apps at Scale
  • Building Android Applications that Use Web APIs
like image 83
Dan Holevoet Avatar answered Oct 09 '22 22:10

Dan Holevoet


I've been using spring restful services with lots of luck on GAE and have been consuming it with Android Native, Phonegap and IOS clients with no issues whatsoever.

http://blog.springsource.org/2009/03/08/rest-in-spring-3-mvc/

like image 32
DavidB Avatar answered Oct 09 '22 20:10

DavidB