Search code examples
google-app-enginerestrestful-architecture

Efficient web services using AppEngine


I'm trying to use AppEngine as sort of a RESTful web service. The service is supposed to do simple finds and puts from the Datastore so Objectify seems good for covering that part. It also does a few lookups to other services if data is not available in the Datastore'. I'm usingRedstone XMLRPC` for that part.

Now, I have a couple of questions about how to design the serving part in view of AppEngine' quotas (I guess one should think about efficiency in most case but AppEngine's billing make more people think about efficiency).

  1. First lets consider I use simple Servlets. In this case, I see two options. Either I create a number of servlets each providing a different service with Json passed to each of them or I use a single (or a fewer number of) service and determine the action to perform based on a parameter passed with the Json. Will either design have any significance on the number of hours, etc. clocked by AppEngine?

  2. What is the cost difference if I use a RESTful framework such as Restlet or RestEasy as opposed to the barebones approach ?

This question is something of a follow up to : Creating Java Web Service using Google AppEngine


Solution

  • It's not so important, because most costs are going to datastore, so frontend micro-optimisation doesn't matter.

    You can save there may be few cents, by choosing 'simple servet', but... is it your goal? It's much more important to make good data structures, prepare all required data in background, make good caching strategy, etc.