We are using the multi-item model to store information about "products". Each product is an edge with 12 attributes on the edge. A "domain" is stored as a node, and each domain can have multiple products.
To satisfy a "get all products for a domain" call, we start with a domain node and ask for all edges (products in this case).
This results in 102 queries to Dynamo when there are 100 products in one domain. Each edge is retrieved with a Query API call to Dynamo. Ideally, we could use BatchGetItem to retrieve a large number of edges. The problem is that to use BatchGetItem we need to first get a list of "rk" values for each product attribute. Since those values are shared amongst all edges, we should be able to make 1 call to get the "rk" values, and then use those to create requests in BatchGetItem. I proved this with a quick and dirty proof of concept locally.
I'm wondering out loud if we want to bubble up the option to get BatchGetItem? Does it always use BatchGetItem? Once a threshold is crossed (a node has >= 20 edges), do we transition to BatchGetItem?
+1 to this idea.
We are using the multi-item model to store information about "products". Each product is an edge with 12 attributes on the edge. A "domain" is stored as a node, and each domain can have multiple products.
To satisfy a "get all products for a domain" call, we start with a domain node and ask for all edges (products in this case).
This results in 102 queries to Dynamo when there are 100 products in one domain. Each edge is retrieved with a Query API call to Dynamo. Ideally, we could use BatchGetItem to retrieve a large number of edges. The problem is that to use BatchGetItem we need to first get a list of "rk" values for each product attribute. Since those values are shared amongst all edges, we should be able to make 1 call to get the "rk" values, and then use those to create requests in BatchGetItem. I proved this with a quick and dirty proof of concept locally.
I'm wondering out loud if we want to bubble up the option to get BatchGetItem? Does it always use BatchGetItem? Once a threshold is crossed (a node has >= 20 edges), do we transition to BatchGetItem?