Yakov,

Thanks for sharing your thoughts!

I agree that both configuration and CONFIG SET lack flexibility. Let’s forget 
about these approaches.

For specifying cache per connection, CLIENT SETNAME [cache_name] [1] can be 
another option. It can be done with config templates as you proposed too. What 
do you think about it?

With SELECT a user can specify only 8 caches, but generally I think it should 
be enough, since, as I mentioned in the previous message, this cache switch is 
needed mostly for STRING data (for HASH, SET etc. key names can be considered 
as cache names).
With the approach you proposed, a user
1. Specifies the cache configuration (template) with predefined name 
‘redis-ignite-internal-cache’
2. Issues ‘SELECT n’, and uses ‘redis-ignite-internal-cache-n’
Is that correct? 

I like the approach. Can you or anyone from the community advise on how/where 
to keep the cache number per connection? Couldn’t find something like 
connection session.
[1] https://redis.io/commands/client-setname

-- Roman


    On Thursday, May 18, 2017 8:50 PM, Yakov Zhdanov <yzhda...@apache.org> 
wrote:
 

 Roman,

I don't like implementing of special configuration type - you loose
flexibility in this case, e.g. adding cache will most likely be a pain or a
complete restart. CONFIG SET may work, but for redis this is some kind of
global configuration, so it is pretty far from, let's say, MySQL's USE
command. I would think this should work on per-connection basis, but CONFIG
SET seems to be global.

I would think about using SELECT command for this. I think it may work as
follows. By default client is connected to database '0'. Upon first request
from the client IgniteCache with name "redis-ignite-internal-cache-0" gets
created. Same for other databases - "redis-ignite-itnernal-cache-XX". User
can register a config template for these caches.

This approach seems to be more intuitive for Redis users.

Thoughts?

--Yakov


   

Reply via email to