Hello,

Right now I have a couple of caches associated with the kind of objects I
store. For instance I have one cache for products, one for sales, one for
stats, etc. I use the id of the product as the affinity key in all cases.

Some questions I have regarding this approach...

*1.* I get the impression I'm not doing it "the Ignite way", since I'm only
storing one kind of object (ie, objects of only one class) in each cache.
The approach I'm using is equivalent to having a PostgreSQL schema for
products, another one for sales and a third for stats. Is that right?

*2.* I believe it would make more sense to have only one cache (for
instance, "analytics") and save all objects there (products, sales and
stats). That would be equivalent to having one single scheme and inside it
one table for each class I store. Right?

*3.* Is there any problem in terms of performance or is it a bad practice
to have one cache with all products and one cache per product with all
related objects to that particular product? I think some queries would run
much faster that way since all objects in a certain cache are related to
the same product, there is no need to filter by sales or stats with a
certain product id.

*4.* What's the best approach or which one is more commonly used?

As a side note, in all 3 cases I'll use as the affinity key the id of the
product, except for the "products" cache in #3, which would be stored in a
single node. Also, right now I'm storing about 10k products but that number
increases as clients arrives, so I expect the cardinality to increase
rapidly.

Cheers,
Matt

Reply via email to