ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shawn.du" <shawn...@neulion.com.cn>
Subject cache namespace support
Date Tue, 28 Feb 2017 01:16:25 GMT
<html>
<head>
    <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
</head>
<body>
<style>
    font{
        line-height: 1.5;
    }
</style>
<div style = 'font-family:"微软雅黑"; font-size: 16px; color:#000000; line-height:1.5;'>
    <div>
Hi,</div><div><br></div><div>I have a use case like below:</div><div><span
style="line-height: 1.5;">I want to store key-value caches in ignite, but each key-value
has a namespace. key are unique in a namespace.</span></div><div>Each cache
entry has the same data type for both key and value.</div><div>When query, We
always query by key and namespace. &nbsp;</div><div>sometimes, we query all
caches of a namespace or remove all entries in one namespace.</div><div><br></div><div>I
think there are two solutions:</div><div>#1 create cache for each namespace, like
use namespace as the cache name.</div><div>&nbsp; using the approach, there
may many caches in ignite. &nbsp;IMO, it is a bit dirty, I meant when using ignitevisor
to show caches</div><div>&nbsp; you will see many caches.&nbsp;</div><div>#2
create one cache, each cache entry has namespace,key and value. using (namespace,key) as the
cache key.</div><div>&nbsp; This solution is clean. but you have to create
a static class/complex configuration. also you have to use SQL to query all/remove all</div><div>&nbsp;
data in a namespace.</div><div><br></div><div>I think this is
a very common use case. Can ignite support it in &nbsp;lower layer for solution clean
and &nbsp;better performance?</div><div>welcome your comments.</div><div><br></div><div>
<div id="ntes-pcmail-signature" style="font-family:'微软雅黑'">
    <style type="text/css">
        a#ntes-pcmail-signature-default:hover {
            text-decoration: underline;
            color: #3593db;
            cursor: pointer;
        }
    </style>

                <div style="font-size:14px; padding: 0;  margin:0;">
                    <div style="font-family:&quot;微软雅黑&quot;; font-size:
13px; color:#000000">
    <style>
        font{
            line-height: 1.5;
        }
    </style>
<div id="ntes-pcmail-signature-default" style="font-size:14px; color:#000; text-decoration:
none;">Thanks</div><div id="ntes-pcmail-signature-default" style="font-size:14px;
color:#000; text-decoration: none;">Shawn</div>
</div>
                </div>

</div><br>
</div>
</div>
</body>
</html>

Mime
View raw message