1

Just trying out the Java API for GCP (the compute lib). I'm making calls to the API from a servlet ...

Compute.Instances.Insert insert = compute.instances().insert("tester", "us-easts1-db", instance);
Operation o = insert.execute();

The docs read that this is an asynch call (non-blocking), but, this will ultimately mean there will be child thread(s) created, and the servlet is going to return a response without checking (or waiting for) the status of the operation. Can anyone confirm (I'm little lazy to dig through the source) that they've made such calls from a servlet and did not experience any issues with memory leaks or problems (such as connections not being closed) due to making the calls from a servlet?

I've read a ton of the docs and have the code for two sample compute apps, but have yet to see any example code showing API calls made from a servlet (and the compute API seems to be only in alpha right now).

0

I suggest you to ask your question on stackoverflow and/or ask your question directly to engineers on github as you should get much better result in term of answers.

Server Fault is for system administrators and desktop support professionals, people who manage or maintain computers in a professional capacity.

1
  • ok, thanks for the clarity - wasn't clear on the scope and relationship between these two sites – Patrick Grant Oct 18 '19 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.