Why is it called WorkflowServiceStubs ( plural )
( is this like a Factory which can be used to create the actual Stubs ? ( like WorkflowServiceBlocking
Does WorkflowServiceStubs hold the actual http/TCP connection object ?
is WorkflowServiceStubs thread safe ? ( Can multiple threads use WorkflowServiceStubs or objects created from it - like WorkflowServiceBlockingStub )
Are we supposed to call shutdown() after using it ? ( Noticed it is not Java Closeable )
( If we do not call shutdown(0, will it leak the underlying HTTP connection ? )
is there a way to cache the underlying http/TCP network connection, so that we will not need to connect/disconnect against each request ? ( Maybe using some kind of Object pooling )
Why is it called WorkflowServiceStub s ( plural )
( is this like a Factory which can be used to create the actual Stubs ? ( like WorkflowServiceBlocking
Yes, it can be used to get access to both blocking and future gRPC stubs.
Does WorkflowServiceStubs hold the actual http/TCP connection object ?
Yes, indirectly through gRPC library.
is WorkflowServiceStubs thread safe ? ( Can multiple threads use WorkflowServiceStubs or objects created from it - like WorkflowServiceBlockingStub )
Yes, it is thread safe.
Are we supposed to call shutdown() after using it ? ( Noticed it is not Java Closeable )
( If we do not call shutdown(0, will it leak the underlying HTTP connection ? )
You are supposed to create it once per process lifetime. Calling shutdown helps to cleanly close the TCP connections gRPC library keeps.
is there a way to cache the underlying http/TCP network connection, so that we will not need to connect/disconnect against each request ? ( Maybe using some kind of Object pooling )
It is already done assuming that you use a single instance of WorkflowServiceStubs for all your communication to Temporal service.