0

We have Java servlets up and running on GAE, using blobstore, datastore and other cloud services.

Currently, we're starting a migration process to cloud Endpoints and we've hit an issue: if we use a different GAE project, we would not be able to query regarding current datastore entities (to the best of my knowledge, Google doesn't want you to do this - see this question and the GAE terms of service - section 3.3d), so we need to use the same project for both.

I looked up whether it's possible to have one GAE instance running Java servlets and one instance running Endpoints, but I found no conclusive answer anywhere.

If we try to implement and something goes wrong, we're looking at a potentially major issue for our users, so we need to be sure beforehand.

Has anyone tried something similar, and can assure us that this works?

Community
  • 1
  • 1
Mor Blau
  • 420
  • 3
  • 15
  • 3
    It is unclear to me what you're asking. Can you forward multiple domains to a single app engine app? Sure you can. Can you forward the same domain name to two different apps? No, but that is entirely independent of app engine. You can have servlets and endpoints in the same app (effectively endpoints are servlets too) and you can separate them in modules. – konqi Apr 18 '16 at 11:34
  • You're right, I meant GAE project, not domain. Editing my question to clarify. – Mor Blau Apr 18 '16 at 12:45

1 Answers1

1

You have 2 options to run the old and the new code inside the same app (thus with no issues sharing access to the datastore) but as separate engine instances, so they can be developed/deployed/managed independently:

  • as different versions of the same app/module(s):

    • the old version remains the default, the new one can be accessed at a different URL during development (possibly via URL routing)
    • you can use traffic splitting to do live A/B testing on the new code and for gradual final migration until you make the new version the default
  • as different modules of the same app:

    • both can run (fully functional) side by side indefinitely, but you need to be more careful during development
    • traffic is routed to the modules in several possible ways
    • final migration is done by publishing the new URLs, eventually re-directing the old URLs and finally bringing down the old module code

The 2 approaches can even be combined, if needed, as the final solution described by the OP's in this somehow similar question (for the python environment, but java equivalents exist): Google App Engine upgrading part by part

Community
  • 1
  • 1
Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97