-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dan,

On 1/19/15 11:46 AM, Daniel Mikusa wrote:
> On Mon, Jan 19, 2015 at 11:05 AM, Christopher Schultz < 
> ch...@christopherschultz.net> wrote:
>> 
>> Some things [memcached] cannot do:
>> 
>> 1. Replicate to other nodes. You can do sharding, but it's
>> pretty low-brow and the shards don't actually know about each
>> other. All of the smarts are in the client. The server doesn't do
>> any of this. Evidently, there are some flavors of memcached that 
>> have been hacked to provide replication to other nodes, but it's
>> not part of the main distribution and didn't seem ... safe.
>> 
>> 
> I believe the situation with Redis is similar.  There some ways to
> do this with the stable 2.x release, but those have their are
> drawbacks.  There's official clustering support in 3.0, which is
> still beta, though.  It's supposed to resolve these issues.

Interesting. I also considered Voldemort, but honestly I was looking
for something that was likely to be higher-performing than a Java hash
map :) (/This/ from a Java programmer!)

>> 2. Dump its database to disk. If you restart, you lose
>> everything.
>> 
>> 
> You can save state with Redis.  It's pretty flexible about how you 
> configure it too, giving you different trade-offs between
> durability and performance.

Cool.

>> 3. Allow you to browse. Basically, if you know an item's key, you
>> can fetch its value. If you don't, you are out of luck. You can't
>> just poke around looking for things. There is no equivalent of
>> "SELECT * LIMIT 5" just to see what's in there.
>> 
> 
> I think you'd be looking for the "KEYS" command.

Yeah, memcached does not have that. There are ways to hack-out some
keys but there is no command to list anything.

> http://redis.io/commands/keys
> 
> This is off topic, but it's really why I like Redis so I'm going to
> share. With Redis, not only can a key point to a value, but it can
> also point to other data structures like sets, lists, hashes and
> sorted sets.  Something I've found to be very handy.

Well, in memcached values are binary, so you can stuff anything you
want in there.

You can serialize a whole object tree if that's what you want to do. I
can imagine that memcached + JSON is a popular combination. We just
put plain-old binary values in as keys at this point, but assuming you
can serialize to bytes (like always!), you can store anything you want
in memcached.

But it's not like a formal column-store like Cassandra, etc. where the
storage mechanism understands a bit about the structures being stored.
It's basically an implementation of Map<byte[],byte[]> and we treat it
like it's Map<byte[],Integer> because we are not really even using the
values themselves; just the keys for quick lookup.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUvVnRAAoJEBzwKT+lPKRYi9wQAJJ6rYClvss+i4/sGGaCQQXZ
MJbVpI7tkcIaz/PFOcK7o5yJXl5F+trdMnfkIM2VGV21fvbRBe28u1c6EeA8yd8P
mmuXeLjZnOSPmKngR6LgtxSC8/IAba18DeuiDBkQ/Jgw207BXBZul8ELzm1H0ihF
B8GtWv5BgvASIl7r+8MX793rfBc2qDmyfV5f56EhyodZKPuBQ+nYBwZZWoNOZN38
NxC3bs9U5+MCimVPqU8CF11m+gJXaV/sK1wqrDFJP0watHHyLJ7kHpN35RU4TeSF
mYTYbQUxPKPaIZ+dPeo2yJZJadHZ4K3IX3vC9cgIz5sayTTl6esTMclzYCGMrFBI
BRj9EywYCSWdgo7ZG6p3lZPjmXSe/oEEAt00YolpnR/jyjkyzMT/k+GoS4+1n81A
QmV0U95i3i+D6E2RCR9YGa2O1yFhk5H9BuTYq+E831vrVP+XICP6vugICYdy5KUv
IPghVDlYoUuKSe7KDDNKvKnoLKC755OHg18spjlBRsTESVm1Ht1+yscaAtlbEwWB
TeZDfLsezIns6rp/9/qt6vB9g1zTZSNvepYB3cNKBabhj7lMd0K6Zdu4bvEpxLOO
dnrEXFzByG8vQ0mi/NAWcBBZJfcDMo4IHngqi3MDFUITHukxOg1TKa2238Rxi6If
3o5leMJ4BUfBBhnfKGn0
=JnfC
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to