Hi all,
I am new to using VCD Java SDK API so this might be an easy one and I just haven't found the answer in the API docs and forums.
To provide some context to my question, I will briefly describe the application from which I am trying to make the calls to VCD.
It is a Java based server that itself responds to HTTP based RESTful requests. For some of these requests, it will need to talk to VCD and I am trying to use the Java SDK abstraction for this.
To be able to perform any operations using the SDK, a VcloudClient instance needs to be created and authenticated.
This authentication process takes 3-6 secs on average on the test environment I am using if I use the method: mVcloudClient.login(username, password).
However, I can also get a token from an authenticated session and then re-create the VcloudClient instance by setting this token on it using this method: mVcloudClient.setVcloudToken(token), in which case it takes usually under 1 sec to create the authenticated instance.
My question is related to how do I reduce the amount of time it takes to get an authenticated VcloudClient instance?
Are people using this method (setVcloudToken) as explained above to reduce the amount of time it takes to get an authenticated VcloudClient instance?
Or, you just somehow re-using the originally created VcloudClient instance in their client application by sticking it into a HttpSession for example?
If so, it doesn't mention that this object is Serializable so I think that will fail if the session needs to be persisted across a cluster, etc.
Or, is there another way that I am missing altogether that this API should be used so that there is not such a big overhead in getting a client reference object before a real operation has even been called?
Any help on this topic would be much appreciated.
Regards,
Aron Kramlik