4

Is there a way to run my nodejs application locally so that I can simulate my application running in production App Engine without deploying it? For some reason my app behaves differently in the Google App Engine compared to my localhost.

I am getting tired of deploying my application to Google App Engine every time I make a change just to see if there's a bug.

baiwang
  • 41
  • 2

1 Answers1

0

You'll never get exactly the same behaviour on your local system and on the real GAE infrastructure. For once simply because the infrastructure on which you're running is different: OS, hardware and network performance/capabilities, performance/capabilities of the actual vs SDK-simulated google APIs and services your app may be using, timing, etc.

A few examples (they're from the standard env GAE, it's true, but it's fundamentally the same idea):

You should investigate the differences - you're more than welcome to ask questions about each one of them right here, on SO.

In general you'll find the differences falling in 2 categories:

  • plain performance differences, expected, but they may uncover actual problems in your code: race conditions, wrong timing assumptions, etc

  • functional differences - to find general areas where you want to perform testing on GAE rather than locally.

    For example I learned (the hard way) that the SDK datastore emulator doesn't emulate the contention logic from the real datastore - while locally my app was running fine, on GAE it was crawling miserably due to contention, I had to re-write a good portion of the logic to address it. See Contention problems in Google App Engine

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