VMware Cloud Community
AlexAllenExpedi
Enthusiast
Enthusiast

DynamicTypes - Retrieving types with thousands of records

Currently, I am working with the DynamicTypes library and generator package to build a plugin that calls a customer database.

I am unable to build the type without limiting the "all customers query" - https://<url>/customer

because there are too many customers to return and a timeout is reached.

If I limit the returns to 100 then i am able to build the plugin types out to completion.

However, when I search for customers that are not in the initial 100 I never get a result.

After I create the Type I need it to the search function to use /customer/name/{filterstring}.

Thoughts?

~Alex Allen C.

Reply
0 Kudos
2 Replies
cdecanini_
VMware Employee
VMware Employee

If the timeout is on the server side you may :  filter your query to make it faster. For example by adding a parent object such as "location" or anything that would make sense and effectively make sure the query is faster.

Another way would be to create several queries that would return a single array of your dynamic type object. With that said this may not perform very well for the end user having a customer drop down in its workflow.

You can speed it up for any request following the first one using the cache method included in the plug-in. With that said this will still be slow for the very first request after the vCO server has started and this adds complexity since you may have to do some cache management. For example if you do not flush cache entries then if new customer is created it will not be in the inventory until a new query is done.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
AlexAllenExpedi
Enthusiast
Enthusiast

In the end I did not use Dynamic Types. The user experience was simply not acceptable.  I used custom actions to predefined list of elements to resolve the matter.

Lost of code, but in the end it got the job done.

~Alex

Reply
0 Kudos