Google App Engine: How to uniquely identify JVM instances / measure parallelism?

advertisements

In a project heavily using Tasks, I would like to record the parallelism "from within".

On the console, I see that GAE is automatically launching new instances of JVMs (up to 10-12) when hundreds / thousands of tasks are enqueued. Then, they run fine.

But, I would like to record which task did run on which instance for tra├žability and measurement of parallelism.

Is there any GAE or System property that I could get to uniquely identify the JVM on which a given task is running ?

regards didier


To the best of my knowledge, there's no built in way to do this. What you can do, however, is to have a static variable that's initialized to something unique - such as a UUID. Thus, you can tell if two requests were handled by the same runtime if they have the same static UUID.