0

I have a Google App Engine System, with GWT 2.6.1. The system has the following design requirements:

  1. A single instance of a server component, whose task is only to update the datastore from external data feeds. Scalability in this case is most certainly undesirable.
  2. A web app that uses the same datastore to serve the clients. This must be scalable by design.

I have both components developed and running separately, with the correct configurations for instances, etc.
My questions is simple: how do I configure the 2 server applications to use the same datastore?

Thanks in advance.

Guido
  • 46,642
  • 28
  • 120
  • 174
Paul C. R.
  • 93
  • 7

2 Answers2

1

IMHO easiest (and probably better from the performance perspective) would be to have the 2 servers implemented as 2 separate services/modules of the same GAE application, fully sharing the datastore. See Service isolation.

But if you want to also have full data isolation you can have 2 separate GAE apps and configure one of them to allow access to the other one (or even any other app, even outside Google's hosting network), see How do I use Google datastore for my web app which is NOT hosted in google app engine?

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
0

Easiest and working solution would be creating 2 versions of a single service as they will be sharing the same datastore, memcache.

So you deploy both the components in same service with different versions to share the same datastore entities.

Rinsen S
  • 461
  • 3
  • 10
  • 26
  • Versioning was meant to be used as a development cycle convenience. Using them the way you (and many other similar SO answers, I know) suggest effectively writes off ability to version those "apps". And comes with (potentially extended) outages during deployment, see http://stackoverflow.com/questions/40192557/continuous-integration-deployment-delivery-on-google-app-engine-too-risky/40193364#40193364 – Dan Cornilescu Mar 03 '17 at 03:37
  • Related: http://stackoverflow.com/questions/9456971/any-issues-using-multiple-gae-app-versions-to-get-multiple-apps-to-share-the-sam – Dan Cornilescu Mar 03 '17 at 03:40
  • Versioning will not extend outages during deployment, its the best way to have multiple versions of your app running and you can easily perform A/B testing on it by splitting the traffic, multiple versions of service uses same shared resources – Rinsen S Mar 03 '17 at 03:48
  • Yes, but not if you're using the versions to implement different "apps" that are supposed to run independently. Whenever you want to update one of those apps you'd have to overwrite the **same version** - the one that you used to implement that particular app. – Dan Cornilescu Mar 03 '17 at 04:10
  • Thank you Risen and Dan. Interesting points. In effect we are talking about two separate projects with 2 appengine-web.xml configurations. Each will have the same application id, but a different version in each.
    I wil have to try this in the cloud and get back to you guys. I also need to investigate Dan's solution below with the services.
    – Paul C. R. Mar 03 '17 at 07:00
  • The versions work too, but it would seem that it is not designed for solving the issue of sharing a datastore. Thanks for the input anyway. – Paul C. R. Mar 03 '17 at 23:28
  • Rinsen, tried to plus one your answer but I don't have enough reputation at the moment. It says that it is recorded, but not shown publicly. – Paul C. R. Mar 05 '17 at 10:58
  • Oh !! I do no , I am also new here and looking to get some plus for answers to increase my score, if possible try it again !! Thanks !! – Rinsen S Mar 07 '17 at 05:38